Course project · separate human review
The Instrumented Generator
Implement and test a bounded generator, measure its phases, and justify one cache or execution design choice.
Working conditions
Local Python execution and learner-authored code are required. The fixed toy model is untrained, not a language-quality benchmark. Supplied public tests are practice; retain your first attempt and additional tests. A human reviewer inspects the code and asks for an unfamiliar prompt and fault response.
Your source and task pack
Authored fictional material for this project. It is separate from lesson practice.
- G1 · Implement learner.generate_ids using the supplied scorer. Preserve the 0–16 output cap and separate EOS/limit reasons. Add a cancellation callback checked before each model call; cancelled runs keep only tokens already selected.
- G2 · Use new prompts [2,0,1] and [1,2,0,1] at limits 0,1,6. These project prompts are distinct from the default walkthrough. Run cached/uncached references, compare every score, then compare your loop tokens and stopping reasons. Add your own changed-prefix and immediate-EOS tests.
- G3 · Instrument validation/preparation, prefill, first selection, later decode and total generation. For zero/one-token results report undefined metrics as unavailable. Keep serialization and disk-write measurements separate from the original boundary.
- G4 · Run at least five repeats for each matched setting, retaining all raw reports and environmental details. Summarize median and range; report any different output lengths or stop reasons before making a timing comparison. Operation counts are not milliseconds.
- G5 · Reviewer challenge: change an earlier prefix token or cancel after one accepted token. Explain the result, demonstrate no stale cache reuse and document what is not measured (imports, model loading, rendering and external service overhead).
What a reviewer should check
- The runtime stops within its cap independently of scorer behavior and preserves cancellation semantics.
- Every compared score agrees within the stated tolerance; token-only equality is insufficient.
- Cache provenance includes exact prefix and model identity; invalid reuse is rejected.
- Timers define actual events, and zero/one-token rates are honestly unavailable.
- All repeats and costs are retained; no local toy result is presented as a vendor or language-quality benchmark.
- A reviewer can run and change the learner implementation independently of the supplied reference.
The site does not automatically grade writing, reasoning, policy compliance or independence. No project answers are supplied by the practice coach or five-minute review.
Your evidence
Loading saved work… Backups are available in My Learning.
This records your declaration, sends nothing and awards no passing assessment. Editing any response clears the declaration. A reviewer must inspect the evidence; filled fields do not establish quality.
Back to Build the Loop, Measure the Wait · My Learning and full progress backup