fix(pager): re-land prefill→decode boundary warm-start — orphaned by #2074's early auto-merge - #2075
Merged
Merged
Conversation
… ahead of decode (#282) Joel's steer: predict which experts will be hot BEFORE the inference needs them. Measured on the RUN-1 fixture, the strongest signal is not a prediction at all — prefill routing IS the decode hot set, extracted early: the prefill union covers 66% of every decode token's experts (vs 58% for full decode recency), and the prefill TAIL alone covers 47% at a third of the size. Stability selectors lose badly ("in all prefill batches" = 1.4%) — recency-of-context dominates even within one prompt, the same law RUN-1/RUN-2 measured across prompts. The cache-dynamics problem is the big prefill batches (8637 experts vs ~4416 slots) churning out decode-relevant experts before decode starts — so the moment to act is the boundary. - segment::PrefillBoundaryDetector — classifies the first decode-sized segment (size < 0.8× min seen) from segment sizes alone; fires once; decode-only serves never fire. Pinned against the fixture's exact sizes. - Driver publishes the plan IMMEDIATELY at the boundary (bandit is already seeded by the prefill batches) instead of waiting rewrite_every decode tokens — the warm-start window opens at decode token 1. Fixture replay verified live: boundary fires between the 3854 prefill tail and the first 1472 decode token; published plan carries 256 tier-0 pins + default_tier for the cold tail. 16/16 tests, clippy clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #2074 auto-merged after its FIRST commit; the second commit (dd001fa — PrefillBoundaryDetector + driver boundary warm-start publish) was pushed to the branch moments later and got orphaned by the squash. Canary compiled and tested green without it (the two commits were independent), so nothing broke — but the warm-start extractor announced on #general was not actually on canary. This cherry-picks it cleanly.
Content identical to dd001fa (fixture-validated: boundary fires between the 3854-expert prefill tail and the first 1472 decode token; warm-start plan publishes with tier-0 pins + default_tier). 16/16 crate tests green.
Process note: when pushing follow-up commits to a PR that has auto-merge armed, verify the PR is still OPEN first — auto-merge races the push.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo