Fine-Tuning Mathematics
Adapting a pretrained model: the low-rank hypothesis behind LoRA, the memory arithmetic that decides what fits on your GPU, and what is actually known about forgetting.
Level 2 — Advanced
- Low-Rank Adaptation11 min
LoRA's parameterisation, why B starts at zero and the update is scaled by α/r, and the low-rank hypothesis that the method rests on but does not prove.
Trainable parameter countZero initialisation preserves the pretrained functionThe α/r scaling makes updates rank-invariant in magnitude - The Memory Arithmetic of Training9 min
Sixteen bytes per trainable parameter, the activation bill, and why checkpointing every √L layers is exactly the right thing to do.
Sixteen bytes per trainable parameterActivation memory scales with batch, sequence and depthOptimal uniform checkpointing uses √L segments
Level 3 — Graduate
Problems (11)
Open in the browser| Solved | Problem | Type | Difficulty | Time |
|---|---|---|---|---|
| Adapter parameter counts | Numerical | 15 min | ||
| When activations dominate | Numerical | 30 min | ||
| Will this fine-tune fit? | Numerical | 30 min | ||
| Bounding how far the adapted model moves | Proof | 30 min | ||
| Optimal checkpointing frequency | Proof | 30 min | ||
| The α/r scaling | Proof | 30 min | ||
| Why exactly one factor starts at zero | Proof | 30 min | ||
| Derive the EWC objective | Proof | 1 hour | ||
| Implement LoRA and measure the spectrum run | Coding | 3 hours | ||
| Prove Eckart–Young–Mirsky abyss | Proof | 1 hour | ||
| The information matrix equality abyss | Proof | 1 hour |