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
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. Front
    Clean loss, broken production JSON?
    Back
    Template mismatch, missing end token, truncation. Decode a batch, then compare the training and serving prompts.
  11. Front
    Task up, general ability down?
    Back
    Forgetting. Run the regression suite on base and tuned; lower strength, smaller adapter, mix general data.
  12. Front
    Score jumped 15 points after a data refresh?
    Back
    Leakage or duplicates between train and evaluation. Check overlap and re-split by group.