Repository navigation
docs: les-plan.md — LES ideas on the NVMe/host tier's decode (design + experiment plan) - #112
Conversation
…e, ranked levers with derived bands, experiment design and worker tasks Co-authored-by: midagedev <[email protected]>
There was a problem hiding this comment.
Verdict: MUST_FIX: The plan names the wrong gate for its split-path FAIL-first and contains an incorrect derivation.
Must fix
1. Name the gate that exercises the split path (kind B)
docs/research/les-plan.md:236 says a landing-order sum in the split path makes gate-union red. That recipe runs only --test union, whose calls use experts_union_into; it never enters serve_step_split.
The existing split-path bit-identity test calls experts_step_union_into at crates/model/src/moe.rs:4391. justfile:832 runs it under gate-ops via --lib.
Correct the attribution now so the implementation plan uses the gate that reaches the mutant. Replace the FAIL-first bullet with:
- Sum the split path in landing order: run `gate-ops`'s existing split-path bit-identity test and confirm it goes red.Also attribute the split-path contract at line 228 to gate-ops. Keep gate-union for the ordinary union contract; no additional split-path test is needed for this correction.
2. Correct the miss-layer derivation (kind B)
docs/research/les-plan.md:103 evaluates 48 × (1 − exp(−4/48)) as 3.5. It is 3.837868. The value feeds the gain bands and the replay's open/close threshold at line 139.
Correcting the arithmetic before the experiments prevents judging a replay against a threshold derived from the wrong value. Use:
L = 48 × (1 − exp(−f/48)) ≈ 3.84 at f = 4 [derived].
The recall bar is r ≥ 0.58 / (3.837868 × 0.49) ≈ 0.3084; round up to 0.31 [derived].Propagate this L through the dependent bands and use the corrected recall bar consistently in the candidate and experiment tables. Alternatively, retain 3.5 only as a separately stated assumption, without claiming it evaluates the printed formula.
Non-blocking
⚠ Charge C1's handoff per miss layer: docs/research/les-plan.md:115.
The assumed 0.05–0.15 ms/job costs 1.48–4.43 ms/token at G's 29.5 miss layers. The +7..+9 % band omits that cost.
Use gain = L × (min(t_hits, t_fill) − t_handoff) and recompute E3's band before using it to judge a run.
Checked
Duplicates: 0 new implementation items; no dryer pairs. The split-path test already exists.
Complexity: no functions changed.
Silent failure: no executable code added.
Tests: none changed; static tracing confirms gate-union misses the split path and gate-ops includes its bit-identity test. No mutant was executed.
Gates: no existing pins, thresholds or cases changed.
Performance: documentation only; no hot path changed.
Escape catalog: C1–C4 do not match this diff.
Notes
dryer and crapper did not run because no Rust file changed. No build or gate was run.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
There was a problem hiding this comment.
Since the last review:
- Split-path gate attribution: fixed at docs/research/les-plan.md:237.
- Miss-layer derivation and replay cutoff: fixed at docs/research/les-plan.md:103 and docs/research/les-plan.md:139.
- C1 handoff cost per miss layer: fixed at docs/research/les-plan.md:115, including E3's revised band.
Verdict: CLEAN: The earlier findings are resolved, and the documentation changes introduce no blocking defect.
Checked
Duplicates: 0 new implementation items checked; no dryer pairs. The plan reuses the existing split-path test.
Complexity: no functions changed; no crapper results.
Silent failure: 0 new executable sites; no error handling changed.
Tests: none changed. gate-ops includes the existing split-path test, which calls experts_step_union_into and compares output bits against experts_into at crates/model/src/moe.rs:4394. The split path sums at moe.rs:1937. No mutant was executed.
Gates: planned replay cutoff corrected from 0.34 to 0.31; no executable gate or pin changed. At recall 0.31, predicted hidden time is 0.583 ms, above the stated 0.58 ms ruler.
Performance: documentation only; no hot path changed.
Escape catalog: C1–C4 do not match the diff.
Notes
dryer and crapper did not run because no Rust file changed. No build or gate was run; the PR supplies no new GPU gate evidence.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
What and why
This PR adds
docs/research/les-plan.md, a design and experiment plan with no engine code. It covers which ideas from LES (Lookahead Expert Scheduling) give a measurable decode speedup on the paged-expert path in 0.3.3, and how a separate worker builds and measures each one.Current state on main
d90151ed:Chain::Step, draft off) still waits for every miss before computing. It fills synchronously on the compute pool (moe.rs:2600-2610→nvtier.rs:2211-2266).Chain::Cols) already compute resident experts first. Their misses go to the reader at a step rank (4d6dbeb2,moe.rs:1850-1939).Kind::Prefetch.O_DIRECTpreads, one per stacked tensor (nvtier.rs:1409-1418,:2354-2373). A single miss therefore reads at QD 1.Ranked levers. Bands are derived from the refill card's admissible 42.21 tok/s shape and the gate plan:
Contiguous repacking and GPU-visible writes predict about 0 on the discrete box. Mixed precision and the draft stage are maintainer questions.
The doc also gives the counters to add, the ablation order, pass/fail per experiment, how outputs stay bit-identical, tasks T0–T8 with the files each touches, and six questions for the maintainer. Nothing in it touches a release, a default or a public API.
Code shape
serve_step_splitrather than adding a one-column copy.cargo fmtandcargo clippyare clean on what I touched: no Rust was touched.Duplication found or removed: none.
What I ran
Read-only code analysis and arithmetic. No build, gate or box run; every number is tagged [measured, source], [derived] or [assumption].
Hardware (if the change is for a machine)
None.