Module 15. Reasoning Models and Test-Time Compute
Try each exercise first. Expand worked answers or project guidance when needed; their open state is shared between RU/EN.
Download course files (.zip) 2588.1 KBThe archive preserves the source folder structure, both languages, and supporting files.
E1. Oracle coverage
Compute oracle coverage for at . Explain why the table does not describe a verifier.
Show answer and solution
Solution. Under independent attempts, no candidate is correct with probability , so oracle coverage is .
| coverage | |
|---|---|
| 1 | 0.250000 |
| 4 | 0.683594 |
| 8 | 0.899887 |
| 16 | 0.989977 |
This is the probability that a correct candidate exists; calculating it needs no verifier at all. It would equal system accuracy under perfect selection. The table specifies no real verifier TPR/FPR and therefore does not predict which candidate will be selected.
E2. Non-uniform distractors
Modify the exact voting model so that two distractors are common and four are rare. Compare it with the uniform-distractor case.
Show answer and solution
Solution. Make the comparison concrete by keeping and allocating the remaining 0.6 as (0.20, 0.20, 0.05, 0.05, 0.05, 0.05); the uniform baseline has six distractors at 0.10. In the multinomial-composition enumeration, replace only the probability vector and keep the tie rule fixed.
| unique mode, uniform | unique mode, skew | random tie, uniform | random tie, skew | |
|---|---|---|---|---|
| 1 | 0.400000 | 0.400000 | 0.400000 | 0.400000 |
| 3 | 0.352000 | 0.352000 | 0.472000 | 0.460000 |
| 5 | 0.509440 | 0.456640 | 0.595840 | 0.554380 |
| 9 | 0.671058 | 0.583120 | 0.737035 | 0.657549 |
| 17 | 0.856688 | 0.728538 | 0.889316 | 0.775702 |
Common distractors consolidate wrong votes and compete more often with the correct mode. Equal one-shot correctness therefore does not imply equal self-consistency gains.
E3. Noisy verifier
Plot the noisy-verifier curve through for TPR and FPR . Identify diminishing returns.
Show answer and solution
Solution. Use the module scenario : independently accept a correct candidate with probability 0.85 and an incorrect one with 0.10; select uniformly among accepted candidates and fall back to a random generated candidate if none are accepted. Exact enumeration gives:
| accuracy | |
|---|---|
| 1 | 0.400000 |
| 2 | 0.580000 |
| 4 | 0.752800 |
| 8 | 0.837403 |
| 16 | 0.849788 |
| 32 | 0.850000 |
| 64 | 0.850000 |
Gains diminish sharply around . The limit is . Its equality to TPR is a numerical coincidence; the limit is correctness conditional on acceptance. §7 already provides a counterexample: TPR gives a limit of .
E4. FP8 KV
Recompute the KV table for 48 layers, KV width 512, and fp8 storage.
Show answer and solution
Solution. FP8 uses one byte per element, and K and V are stored separately:
| Tokens | KV per request |
|---|---|
| 512 | 0.023438 GiB |
| 1,000 | 0.045776 GiB |
| 4,000 | 0.183105 GiB |
| 16,000 | 0.732422 GiB |
| 64,000 | 2.929688 GiB |
This is times smaller than the original 128 KiB/token scenario. It is payload only, excluding scales, alignment, allocator overhead, and runtime buffers.
E5 [project]. Adaptive policy
Design an adaptive policy for a chat/code/math workload. Specify the routing signal, stopping rule, and cost of each routing error.
Project demos and guidance
Demo for this project exercise: English project-demo notebook for Module 15, sections “Demo 1” and “Demo 2” as starting points for this module’s projects. It shows a compact reproducible example on small inputs, not a completed solution to the full-scale project.
E6 [project]. API passport
Build a reasoning passport for one current API model using only official documentation, and record the snapshot date.
Project demos and guidance
This is an independent project task. Use the module’s demonstration notebooks as guidance.
E7 [project]. Matched budget
Propose a matched-budget comparison between one long trajectory and eight short candidates.
Project demos and guidance
This is an independent project task. Use the module’s demonstration notebooks as guidance.
E8. Unit tests as a verifier
Explain how a unit-test suite can be both more reliable than an LLM judge and still incomplete.
Show answer and solution
Solution. With fixed inputs and a deterministic environment, a test reproducibly checks a stated requirement. Answer position and verbosity do not change its verdict, and a failure supplies a counterexample. A suite nevertheless checks only its recorded inputs and assertions. A program may overfit visible examples or violate uncovered edge cases, security requirements, or performance constraints. A nondeterministic environment can also make a test flaky. Passing therefore supports correctness within tested coverage; hidden cases, property tests, fuzzing, and review of the specification provide additional evidence.