Repository navigation
fix(serving): the decode knee is the model's, not the lane's — a boot before any lane reports its model reads the remembered model's knee (card 29e4ab34) - #4234
Merged
joelteply merged 2 commits intoSep 19, 2026
Conversation
… before any lane reports its model reads the remembered model's knee (card 29e4ab34) Measured 2026-09-19 17:20:35Z on the M5 (7b69109): for the thirteen seconds between boot and the adopted lane reporting its model, current_serving().active_model was None, so the knee lookup keyed on "" (serving.decode_knee.clamped: clamped false, knee 17, model ""), the roster's 17 runtimes went unclamped into the demand, the plan said 8 lanes under the transient boot budget (32-35 GB) and relaunched the warm adopted 1 x 161k lane into 8 x 49k; at 17:20:48Z the 27B's knee of 2 arrived and it relaunched again to 2 x 67k. Three geometries in two minutes, the adopted lane wasted, the KV pages cold twice. The knee is a property of the model on this box. knee_model(active, remembered) = the model a lane is serving, else the model this box served last (served_window_store); the lookup keys on that. A reported model still wins; a box that remembers nothing plans the roster, as before. One pure fn, one test pinning the window. Receipt on the M5: serving.decode_knee.clamped at boot names the 27B and clamps 17 -> 2 before any launch; a boot that adopts a lane keeps it or relaunches ONCE to the steady geometry; serving.geometry.settled fires once per boot. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
|
APPROVE — reviewed at exact head 208238b. The rule is right and the test pins the stair (17 → 2 with the remembered knee, 17 without). One nit, not a condition: the call site evaluates the remembered geometry eagerly — served_window_store::load_geometry() is a disk read on every plan tick, taken even when a lane has reported its model and the value is discarded. knee_model(active, || remembered) with or_else keeps the read to the boot window it is for. Merge with the batch after 18:20Z as you laid out. |
…ot window, never on every plan tick (Cormac's nit on #4234) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
|
Nit taken at ec1ba5a: |
joelteply
deleted the
fix/the-knee-is-the-models-not-the-lanes-a-boot-reads-the-remembered-model
branch
September 19, 2026 18:47
joelteply
added a commit
that referenced
this pull request
Sep 19, 2026
… outlier — one 145k prompt ever sent sized every boot to 2 × 179k (card 29e4ab34) (#4237) * fix(serving): the window follows the roster's TYPICAL prompt, not the outlier — one 145k prompt ever sent sized every boot to 2 x 179k (card 29e4ab34) Measured 2026-09-19 19:37Z on the M5 (8eab259): the boot planned 2 lanes (the knee, #4234, clamped 17 -> 2 before any launch) but at a 179,258 window: serving.reconcile.window "kept-window-exceeds-physical-fit kept_window 181114 bound_to 179258". 181,114 = 144,891 x 1.25 - the largest prompt any resident ever sent, with headroom - while the roster's typical prompt is 51,242 (the remembered typical_prompt_tokens). The lanes already follow the typical prompt (the per-lane floor); the window followed the PEAK, so the remembered 67,584 could not "cover" the target and was discarded, the boot's transient budget (the device prior, 44 GB) fit 2 x 179k, the launch took 44 GB of serving on a box whose steady budget is 27 GB, available went to 0, Eco entered, and the plan collapsed to one lane. window_target now takes the typical sent prompt with headroom when one is known (measured this boot, or remembered from the last serve - TypicalPrompt::Remembered already seeds sent_median at boot), else the peak with headroom, else the untrimmed demand; capped by the demand as before. On the M5: target 64,052, the remembered 67,584 covers it, the boot serves 2 x 67,584 verbatim and never relaunches into the transient budget. A single outlier prompt is that turn's cost (trimmed to the window); it does not size the box. Tests: the_window_follows_the_sent_prompt... pins the M5 numbers (64,052; the remembered window covers it); lanes_multiply_to_the_roster_at_the_typical_prompt_not_the_outlier now asserts the outlier-only plan is WIDER with no more lanes than the typical plan. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * test(serving): the outlier test keeps its original assertions — without a median the plan packs lanes at the bootstrap floor, so its window is the narrower one; the target change does not alter that Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
What the M5 showed (7b69109, 17:20Z today)
serving.decode_knee.clampedat 17:20:35Z:clamped=false knee=17 model="" roster_lanes=17— no lane had reported its model yet (the adopted lane was still being recorded), so the knee read as unknown and the roster's 17 runtimes went unclamped into the demand. The plan said 8 lanes under the transient boot budget and relaunched the warm adopted 1 × 161k lane into 8 × 49k. At 17:20:48Z the 27B's knee of 2 arrived (clamped=true knee=2) and it relaunched again to 2 × 67,340. Three geometries in two minutes; the adopted lane was wasted; KV pages cold twice.Fix
The knee is a property of the model on this box, not of whether a lane is ready.
knee_model(active, remembered)— the model a lane is serving, else the model this box served last (the remembered geometry inserved_window_store) — is what the knee lookup keys on. A reported model still wins; a box that remembers nothing plans the roster, as before.Test
a_boot_before_any_lane_reports_its_model_reads_the_remembered_models_knee— the boot window plans the last model; a serving lane's model wins; nothing remembered = the roster; and with the remembered knee (2) the roster of 17 is clamped at boot, without it not.Receipt on the M5 after deploy
serving.decode_knee.clampedat boot names the 27B and clamps 17 → 2 before any launch; a boot that adopts a lane keeps it or relaunches once to the steady geometry;serving.geometry.settledfires once per boot.Refs: card 29e4ab34 (the rest of it — demand counting runtimes seated elsewhere, and the cap holding until the first settle — stays open), #4227, #4230.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo