| Format | Bits | Range | Use |
|---|---|---|---|
| fp32 | 32 | ±3.4×10^38 | Master weights, optimizer states |
| bf16 | 16 | Same as fp32 | Forward/backward pass (standard) |
| fp16 | 16 | ±65504 | Older GPUs, needs loss scaling |
| fp8 (E4M3) | 8 | ±448 | H100/B100 matmuls, ~2× throughput |
| Optimizer | Memory per param | Used by | Status |
|---|---|---|---|
| SGD+M | 1 state | RL fine-tuning | Niche |
| AdamW | 2 states (m, v) | GPT-4, Llama 3, Gemini | Dominant |
| Muon | 1 state + orthog. | Kimi K2 | Emerging |
| SOAP | 2 states + precond. | Research | Experimental |
| Model | Params | Tokens | Chinchilla ratio |
|---|---|---|---|
| Chinchilla | 70B | 1.4T | 1× (optimal) |
| Llama 2 7B | 7B | 2T | ~14× |
| Llama 3 8B | 8B | 15T | ~94× |
| SmolLM3 3B | 3B | 11T | ~183× |
| Method | Math form | Function | Limitation |
|---|---|---|---|
| SFT | MLE on curated data | Instruction prior | Bounded by demo quality |
| RLHF (PPO) | max E[r] − β·D_KL | Online preference shaping | Expensive; RM hacking |
| DPO | Contrastive log-ratio | Efficient preferences | Static; no exploration |
| GRPO | Group-normalized advantage | RL without value fn | Discards clipped tokens |
| CISPO | Clip IS; all tokens | Efficient RL | Needs reliable reward |
| RLVR | Binary verifier ∈ {0,1} | Emergent reasoning | Verifiable domains only |
| Phase | Objective | Duration | Thesis angle |
|---|---|---|---|
| Pre-training | Next-token prediction (cross-entropy) | Weeks–months, trillions of tokens | Compression; no phase transitions |
| Annealing | Consolidation on high-quality data | Final 1–5% of tokens | Surfaces latent capabilities |
| Domain adaptation | Distribution shift to target domain | 50–100B tokens | Amplifies existing patterns |
| Context extension | RoPE rescaling + long-context data | ~1B tokens | Composable local patterns |
| SFT | Instruction prior + format | 1–3 epochs, 100K–1.5M examples | Low-rank surface steering |
| RLHF / DPO | Preference alignment | Days | Policy head, not cognition |
| RLVR / GRPO | Verifiable reasoning RL | Days–weeks | Selection or creation? Open |
| Test-time compute | Inference-time search | Per-query | Search over repertoire |
trl, peft, or transformers. Reading the actual
~200-line training loop is the fastest way to see that "reasoning" alignment is a thin
policy layer bolted onto a next-token predictor, not a new cognitive engine.lm_head. The training objective is one line:
cross-entropy on the shifted sequence. There is no "understanding" module — world
knowledge is whatever the Pile compresses into the weights.| Stage | From-scratch implementation | Thesis angle |
|---|---|---|
| Pre-training | Cross-entropy on the Pile, r50k_base tokenizer, HDF5 token stream | Compression; the foundation is a predictor |
| SFT | Supervised fine-tune on Alpaca / Dolly | Format prior — surfaces the instruction-following pattern |
| Reward Model | Pairwise preference head on Anthropic HH-RLHF / UltraFeedback | Learned proxy — the exact surface reward hacking exploits |
| PPO / DPO | Hand-written policy optimization against the reward / preferences | Policy head, not cognition |
| GRPO / RLVR | Group-relative verifiable RL on GSM8K (correctness reward) | Selection or creation? The open question, runnable locally |