Lesson deck
Fine-tuning: interview drills flashcards
Reviewing needs JavaScript. You can read every card in the list below.
Loading your cards...
Back to the lesson12 cards in this deck
Read all 12 cards as a list
- Front
- The 90-second answer to 'Should we fine-tune?'
- Back
- Sort the failure (knowledge to retrieval, behaviour to prompt first, cost to caching or a smaller model). A tune must beat the best prompt-plus-retrieval baseline on the newest base, held out. Test the break-even against caching. LoRA first, gate, canary, rollback, re-run when the base changes.
- Front
- What closing line shows judgement?
- Back
- "If the failure is stale facts, I would not tune at all." Name a case where you would not use the method.
- Front
- Full fine-tuning states for 8B and 34B?
- Back
- 16 bytes per parameter: 128 GB and 544 GB. A floor: activations, logits and overhead come on top.
- Front
- LoRA parameters for a stated config?
- Back
- Sum r × (d_in + d_out) over every adapted matrix. Hidden 3,072, 28 layers, MLP 8,192, rank 16, all linear: 26,148,864, about 0.82 percent of the base linear parameters, about 0.42 GB of states.
- Front
- QLoRA states for a 34B model, adapter 0.5 percent?
- Back
- 0.5 × 34 = 17 GB base, plus 2.72 GB adapter states, plus about 0.54 GB of constants: about 20.3 GB. Not a normal batch on 24 GB; activations and logits decide.
- Front
- ZeRO per-GPU states for 34B on 16 GPUs?
- Back
- Data parallel 544 GB; ZeRO-1 161.5; ZeRO-2 97.75; ZeRO-3 34 GB. Stage 3 costs about 1.5 times the communication.
- Front
- Training time from 6ND, and LoRA?
- Back
- FLOPs = 6 × N × D; time = FLOPs ÷ sustained rate. 8B, 100M tokens, 300 TFLOP/s: about 4.4 hours; LoRA about two thirds, roughly 3.0 hours. A memory trick more than a compute trick.
- Front
- DPO loss for beta 0.25, log-ratios +0.6 and -1.4?
- Back
- Margin = 0.25 × 2.0 = 0.5; loss = -ln sigmoid(0.5) ≈ 0.474. At beta 1.0 the loss is about 0.127: the pair looks solved sooner, so the model stays nearer the reference.
- Front
- The nine parts of a tuning-program answer?
- Back
- Clarify; baseline with caching; data; method; training plan; gate; serving and rollout; upkeep; alternatives and fallback.
- Front
- Clean loss, broken production JSON?
- Back
- Template mismatch, missing end token, truncation. Decode a batch, then compare the training and serving prompts.
- Front
- Task up, general ability down?
- Back
- Forgetting. Run the regression suite on base and tuned; lower strength, smaller adapter, mix general data.
- Front
- Score jumped 15 points after a data refresh?
- Back
- Leakage or duplicates between train and evaluation. Check overlap and re-split by group.