ELLMEngineering Large
Language Models
Download PDF

Chapter 67

Diagnostic Question Bank

On this page

Use these questions after implementing the relevant mechanism. Write the failing invariant and the smallest discriminating experiment before consulting the answer criteria.

Update and recovery failures

Q1 — Advanced: two ranks see one and eight supervised targets. Their mean losses are averaged. Derive the weight of the first target and compare with the global token objective. Where must correction occur if gradients are loss-scaled and clipped?

Q2 — Advanced: a checkpoint restores equal logits but diverges after one AdamW step. Enumerate the state needed to distinguish optimizer, data, schedule, and numerical causes.

Execution and state failures

Q3 — Implementation: full-prefix logits match until cached one-token decode begins. The rectangular attention mask has shape [1,P+1]. Which alignment would expose only the first key, and what reference comparison isolates it?

Q4 — Advanced: a fork shares a partially filled KV page. One branch appends, the other is cancelled. Specify ownership and contents at each transition, then add a recurrent layer and explain what rollback now requires.

Q5 — Advanced: a low-bit model fits twice as many requests but useful throughput falls. Separate kernel, traffic, scheduling, and quality hypotheses; choose measurements that do not discard failed requests.

Q6 — Cross-layer: a rollback discards prefix reuse and lowers capacity from 80 to 45 requests/s while 60/s continue to arrive. What temporary admission or routing policy prevents an unbounded queue?

Application and evidence failures

Q7 — Implementation: the model returns a valid source identifier with an unsupported statement. Which checks passed, which failed, and which independent evidence could establish the actual task outcome?

Q8 — Cross-layer: both candidate and baseline have unchanged marginal accuracies, but the count of discordant paired outcomes increases. What changes in the adoption analysis? Can a lower token price settle the decision?

Q9 — Generative modeling: a flow-matching training loss falls, but sampling moves toward noise. Which time convention, velocity sign, solver update, and broadcast axes should be checked against a known analytic flow?

Answer criteria: update and recovery

For question 1, the first target receives weight one half instead of one ninth. Preserve loss sums and the global valid-target denominator across the whole accumulation window; reconcile with the collective's sum/average convention, unscale as required, and clip the intended global gradient. For question 2, use next-step replay to compare optimizer moments/step, schedule, batch/cursor, accumulation state, random state, and precision/scaler behavior. A weights-only inference match does not establish training continuation.

Answer criteria: execution and state

For question 3, a triangle aligned to local query index zero can expose only key zero; the query's logical position is P, so all eligible keys through P must be visible. Compare full-prefix and cached results at several chunk lengths. For question 4, copy the shared partial page before a divergent append, retain references for the survivor, and reclaim only at zero owners. A recurrent layer additionally needs its state at the committed boundary or replay. For question 5, report accepted quality and deadline-qualified work alongside traffic, kernel time, queueing, and total memory. For question 6, route or reject at least the sustained excess while cold capacity is 45/s; reserve capacity for recovery and account for deadlines rather than admitting the entire nominal arrival rate.

Answer criteria: application and evidence

For question 7, identifier validity and perhaps authority passed; entailment or business correctness remains unestablished. Use source-grounded verification or a task-specific independent check. For question 8, paired uncertainty grows with discordance for the same marginal difference. Include verifier/retry/idle costs and quality gates before deciding; token price alone is not cost per successful task.

For question 9, bind the endpoints first: this book uses noise at zero and data at one, target x_1-x_0, and positive Euler increments. Compare the sampler with the analytic Gaussian field before attributing the failure to the transformer. A reverse time convention requires a correspondingly consistent target and integration direction.