Compare LoRA r=8 vs r=64 on a 13B model on the quality-vs-cost curve
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Sketch how the quality-vs-cost tradeoff actually looks when sweeping LoRA rank from r=8 to r=64 on a 13B model fine-tuned on a typical instruction dataset. Be concrete about how trainable parameters, wall-clock training time, quality, and overfit risk move with rank.
Params scale 8x from r=8 to r=64, but wall time only grows ~1.4x. Quality plateaus around r=16 to 32; r=64 mostly helps when data is large or the shift is broad.
Imagine adding lanes to a highway. Going from one lane to two cuts traffic dramatically. Going from two to four still helps. But going from four to eight on a quiet road just adds asphalt nobody uses, and on a road with too few drivers, extra lanes invite people to weave around oddly and create chaos. Rank works the same way for a small training set. Adding capacity helps up to a point, then stops helping, and on a small road with low traffic, extra capacity starts learning the quirks of the specific drivers instead of generalising. The trick is finding the right number of lanes for the road you actually have.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: how params, wall-clock time, memory, and adapter size each scale with rank, where the quality plateau sits, why r=64 mostly disappoints on small data, and the production decision framework.
| Axis | r=8 | r=32 | r=64 |
|---|---|---|---|
| Trainable params (q,k,v,o on 13B) | ~13M | ~52M | ~105M |
| Wall-clock (relative) | 1.0x | ~1.2x | ~1.4x |
| Adapter checkpoint | ~25 to 100 MB | ~100 to 400 MB | ~200 to 800 MB |
| Typical quality vs full FT | Underfits hard tasks | Close, often within 1 pt | Marginal lift over r=32 |
| Overfit risk (small data) | Low | Moderate | High under 5k examples |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Picking r=64 because higher rank sounds more capable. On most instruction datasets the gain over r=32 is invisible, and on small data the extra capacity actively hurts via overfitting.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.