Flavio Copes explains LLM training stack

flaviocopes.com32 min read

This article details the comprehensive modern training stack for large language models, breaking down the mechanics, math, and budgets behind pre-training, mid-training, post-training, and fine-tuning. The author explains how raw transformer models evolve from next-token predictors into instruction-following assistants using techniques like causal language modeling, RoPE scaling, SFT, RLHF, DPO, and GRPO. Additionally, the post compares full fine-tuning, LoRA, and QLoRA, and demonstrates a hands-on commit classification experiment implemented in NumPy. Open article →