Contents
Map

Quiz · 09 · Post-Training & Fine-Tuning

47 questions from 10 pages

These are the Check Yourself questions from each page of the module, collected in course order. Each heading links back to the page the questions test. All module quizzes →

SFT & Parameter-Efficient Fine-Tuning

Check yourself
0 / 5 answered
  1. LoRA with rank 8 is applied to a 4096 × 11008 projection. How many trainable parameters does it add?
  2. Why is B initialised to zero in LoRA?
  3. Your support bot must reflect a policy that changes weekly. Fine-tune or RAG?
  4. Why mask the prompt tokens out of the SFT loss?
  5. What does prepare_model_for_kbit_training do, and what happens if you skip it?

Preference Optimization

Check yourself
0 / 4 answered
  1. In the DPO loss, what does the reference model π_ref provide?
  2. You have 200,000 thumbs-up/thumbs-down ratings on single responses but no side-by-side pairs. Which method fits the data?
  3. Raising DPO's β from 0.05 to 0.5 mostly does what?
  4. Why can't DPO alone produce a strong reasoning model the way GRPO-style RL did?

RL for LLMs

Check yourself
0 / 4 answered
  1. What does GRPO use in place of PPO's value model?
  2. Every response in a GRPO group gets reward 1. What is the learning signal from that prompt?
  3. Why did RL with verifiable rewards make large-scale reasoning RL practical?
  4. Dr. GRPO removes GRPO's per-response length normalization. What bias did that normalization introduce?

Reasoning Models & Test-Time Compute

Check yourself
0 / 4 answered
  1. What rewards did DeepSeek-R1-Zero use?
  2. Why does the R1 pipeline include a small cold-start SFT stage before RL?
  3. You need a strong 7B reasoning model and have access to a much larger reasoning model. What did DeepSeek find works better: RL on the 7B model, or SFT on the large model's traces?
  4. Why shouldn't a model's visible chain of thought be treated as an audit trail?

HuggingFace Ecosystem

Check yourself
0 / 5 answered
  1. Which padding side does batched generation with a decoder-only model need?
  2. You set pad_token = eos_token and build labels by setting -100 wherever input_ids == pad_token_id. What goes wrong?
  3. Why does a mismatched tokenizer/model pairing not throw an error?
  4. What happens if you skip apply_chat_template and just concatenate strings yourself for an instruction model?
  5. Why is datasets Arrow-backed instead of just loading a Python list/dict?

LoRA & QLoRA Hands-On

Check yourself
0 / 6 answered
  1. lora_alpha = 32 and r = 16. What multiplies the adapter's output?
  2. You need one base model to serve 40 customer-specific fine-tunes. What do you do?
  3. Why does prepare_model_for_kbit_training matter for QLoRA?
  4. When would you choose adapter-only serving over merging?
  5. What's the tradeoff of a higher LoRA rank?
  6. Can you merge a QLoRA adapter straight back into the 4-bit quantized base?

Instruction Data & Training Runs

Check yourself
0 / 7 answered
  1. Why does the training loop use DataCollatorForSeq2Seq rather than default_data_collator?
  2. Training loss falls to near zero during epoch 1 on a 500-example dataset. Most likely?
  3. What does setting a label to -100 actually do mechanically?
  4. Why mask the prompt tokens instead of just weighting them lower?
  5. You see loss oscillating without trending down - what are the two most likely first things to try?
  6. Why is overfitting harder to spot in fine-tuning than in typical ML training?
  7. Training loss looks great (steadily decreasing, ends near zero) but the fine-tuned model performs worse than the base model on held-out prompts. What happened?

Benchmarking Base vs Tuned

Check yourself
0 / 6 answered
  1. Why call torch.cuda.synchronize() before reading the timer?
  2. A tuned model beats few-shot prompting by 1.5 points on 60 eval items. What do you conclude?
  3. Why exclude the first generate() call from a latency benchmark?
  4. Why measure peak VRAM instead of computing it from parameter count?
  5. A fine-tune scores well on the eval set but users report worse real-world behavior - what's the most likely explanation?
  6. Give one clear signal that RAG, not fine-tuning, is the right fix.

QLoRA Fine-Tune

Check yourself
0 / 3 answered
  1. The benchmark compares base and tuned models. Where must the evaluation examples come from?
  2. Why does benchmark.py run warm-up generations before timing?
  3. The tuned model is better on the task but 20% slower. What is the most likely reason if the adapter was not merged?

SFT, DPO & GRPO with TRL

Check yourself
0 / 3 answered
  1. Your DPO run logs a loss of 0.693 at step 0. What does that tell you?
  2. In GRPO logs, the correctness reward's std within groups is 0 for most prompts. What is happening, and what should you change?
  3. Why merge the LoRA adapter after each stage?