Fine-Tuning interview question

Generative AIFine-TuningModel Compressionhard

From the same logits, a teacher LLM gives these next-token probabilities after "I want to ___ my subscription" (restricted to five candidate tokens): cancel 85.0%, end 11.5%, pause 2.6%, upgrade 0.9%, eat 0.03% at temperature 1, and 40.3%, 24.4%, 16.8%, 12.9%, 5.5% at temperature 4. Why does logit (soft-label) distillation at T = 4 usually give the student more signal per example than sequence-level distillation on the teacher's generated text, and what does it normally require?

  1. AAt T = 4 the teacher samples end or pause far more often, so the student sees several phrasings per prompt; it works with any API teacher, since only a sampling temperature setting is needed.
  2. BEach position carries the teacher's full distribution (end is plausible, eat is not), and T > 1 lifts those small probabilities into the loss; it needs teacher logits and a shared vocabulary.
  3. CSoft labels need no shared vocabulary because probabilities are normalised; it is sequence-level distillation that needs teacher logits, to weight each generated token by the teacher's confidence.
  4. DSoft targets carry more signal because their entropy is lower than a one-hot label's, so every gradient step points more precisely at the top token cancel and the student converges faster.
Show the answer and explanation

Correct answer: B, Each position carries the teacher's full distribution (end is plausible, eat is not), and T > 1 lifts those small probabilities into the loss; it needs teacher logits and a shared vocabulary.

Explanation Fine-Tuning

In logit distillation (Hinton et al., 2015) the student matches the teacher's full distribution at every position, via a KL loss on the softened distributions softmax(z / T), often plus the usual hard-label loss.

Why soft targets carry more information: generated text gives only a hard label ("the next token was cancel"). The teacher's distribution also says that end and pause are reasonable and eat is nonsense. This "dark knowledge" is extra supervision at every token, so a small student learns more per example, with lower-variance gradients.

Temperature: at T = 1 the small alternatives barely register (upgrade 0.9%, eat 0.03%); at T = 4 they become 12.9% and 5.5%, since each probability is raised to the power 1/T and renormalised. Soft-target gradients scale roughly as 1/T², so the soft loss is multiplied by T². Nothing is sampled: T only softens the distributions inside the loss.

Requirements: the teacher's full logits (in practice a self-hosted teacher; most APIs return at most a few top log-probabilities) and the same tokenizer and vocabulary, so the distributions align token by token. Cross-tokenizer methods exist but need extra alignment.

Sequence-level distillation (Kim and Rush, 2016) fine-tunes the student on teacher-generated text with plain cross-entropy: it works with API-only teachers, but every token is a hard label.

Why the other options fail: sampling end or pause more often still yields hard labels; a one-hot label has zero entropy, so soft targets have higher entropy, not lower; and logit distillation, not the sequence-level kind, needs logits and a shared vocabulary.

Interview tip: use sequence-level distillation for API teachers, and add a KL term on logits when you host an open-weight teacher with the same tokenizer.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Generative AI questions

  1. A retail client wants a customer-facing assistant over ~5,000 public help-center pages and product PDFs, live in six weeks, with a team of two engineers.…
  2. To save tokens, a bank adds an LLM extractor after retrieval that keeps only the sentences relevant to the question from each of the top 8 chunks. Context…
  3. A telecom's support assistant has no reference answers for live traffic, so the team wants implicit signals as quality proxies: the user rephrases the…
  4. A retailer trained a LoRA adapter on acme-8b (the base model). The serving team loads it onto acme-8b-instruct, which has the same architecture. It loads…
  5. Which statement about the HNSW parameters M, efConstruction and efSearch is correct?