Repository navigation
fix(serving): a device delta at or below the weights is no reading, and an absent per-token rate is not printed as 0 - #4956
Merged
joelteply merged 1 commit intoOct 11, 2026
Conversation
…nd an absent per-token rate is not printed as 0 The 5090, 2026-10-11 19:40Z (core f595618): serving.footprint.measured printed source=device_delta anon_bytes=0 per_token_measured=0 ratio=0.0 every minute, for a lane serving 67,584 tokens of KV. device_delta_beyond_weights saturated `now - baseline - weights` to 0 when the trough baseline already held the weights (or another engine), and the probe printed `measured.unwrap_or(0)`. So the planner's per-lane footprint stayed the estimate while the log read like a measurement (BigMama: "absence rendered as a measurement"). - A delta that does not exceed the weights returns None (checked subtraction) and falls through to engine_props, the engine's own /props memory_breakdown, which needs no baseline. A serving.footprint.device_delta_unread probe names the baseline, now and weights that refused it. - per_token_measured prints "none" when there is no rate, never 0. - The existing discrete-arm test gains the two saturating cases (a baseline that held the weights, and exactly the weights beyond the baseline). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Review (BigMama): diff only, CI pending (3 pass, 3 pending at 5f5e216).
Approving on green. Receipt (BigMama, after the deploy carrying it): |
Contributor
Author
|
Approve at 5f5e216 (BigMama), diff and CI: 7/7 green (windows-msvc check, the core lib tests, hygiene ratchets, ts-rs drift and the rest). |
joelteply
deleted the
b5230492/serving-a-device-delta-at-or-below-the-w
branch
October 11, 2026 20:05
joelteply
added a commit
that referenced
this pull request
Oct 11, 2026
…d the hybrid upper bound is named BigMama on #4961: unattributed_bytes printed 0 for an unread delta, the absence-as-measurement shape #4956 removed, so it prints none. On a hybrid model the context buffer holds each slot's fixed recurrent state, so the rate is an upper bound and a plan for more, shorter slots is short one state per extra slot. That split needs the engine to report it per sequence: card c8b2e1df, which first measures its size. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Oct 12, 2026
…n KV over its tokens; the rest of the device delta is unattributed (#4961) * fix(serving): on a discrete GPU the per-token cost is the engine's own KV over the tokens it holds, and the rest of the device delta is probed as unattributed BigMama's 5090 receipt (build 6148, 2026-10-11): the device delta read 85.8 KB/token where the engine's own context bytes read 46.4 KB. The delta holds every tenant of the GPU (the embedding lane's 1.75 GiB lease) and the engine's unreported overhead. With a header rate the plan carries the excess as fixed bytes per lane (fixed_per_lane_from), so each extra lane paid for the other tenants again. Design per Codex: the lane's context bytes over the tokens it allocated (slots x per-slot n_ctx, from /props), with the residual probed as unattributed and never saved into the model's record. The device delta still speaks for an engine without memory_breakdown. The three /props readers become one fetch. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(serving): an unread device delta prints no unattributed bytes, and the hybrid upper bound is named BigMama on #4961: unattributed_bytes printed 0 for an unread delta, the absence-as-measurement shape #4956 removed, so it prints none. On a hybrid model the context buffer holds each slot's fixed recurrent state, so the rate is an upper bound and a plan for more, shorter slots is short one state per extra slot. That split needs the engine to report it per sequence: card c8b2e1df, which first measures its size. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(serving): an engine that did not answer /props is no reading, never a device-delta stand-in Codex on #4961: a 500 ms /props miss and an engine without memory_breakdown both read as None, so a single miss wrote the tenant-charged device-delta rate back under the same model record and undid the correction. An unanswered engine now records no sample (serving.footprint.unmeasured leg=engine_unanswered); only an engine that answered without a context reading falls to the delta. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(serving): only an engine WITHOUT memory_breakdown falls to the device delta; a present but unusable one is no reading Codex on #4961: EngineContext::from_props returned None both for an engine predating the field and for a present breakdown or slot geometry that is malformed, zero or overflowing, and both fell to the tenant-charged delta. EngineContextReading::of tells the three apart (Read, Absent, Invalid). Invalid records no sample (serving.footprint.unmeasured leg=engine_breakdown_invalid). The parser test now covers zero slots, an overflowing n_ctx, a malformed breakdown and an absent one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(serving): an engine's error reply or a non-props body is no reading, never a legacy engine Codex on #4961 (92ffdb7): engine_props() parsed the body without checking the status, and EngineContextReading::of called any JSON without memory_breakdown Absent. So a 503 while loading, a 500, or a JSON null read as an engine that predates the field, and fell to the tenant-charged device delta. engine_props now rejects an unsuccessful status before parsing. And only a well-formed props document (it carries default_generation_settings) can be Absent; null and an error envelope are Invalid. The parser test adds both. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * fix(serving): legacy and reading share one slot-geometry parse, so a null geometry is no legacy engine Codex on #4961 (0d44a51): {default_generation_settings: null} still passed as a well-formed legacy props document. slot_geometry() is now the one parse of total_slots and per-slot n_ctx (present, in range, nonzero), and both EngineContextReading::of and EngineContext::from_props use it, so 'a valid props document' means one thing. The parser test adds the null-geometry case. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
Why
On the 5090, 2026-10-11 19:40Z, core f595618 (from BigMama's probe lines),
serving.footprint.measuredprintedsource=device_delta anon_bytes=0 per_token_measured=0 ratio=0.0every minute. That was for a lane serving 67,584 tokens of KV, which cannot be zero bytes beyond its weights.device_delta_beyond_weights(serving_daemon.rs) computesnow - baseline - weightsand saturates it to 0 when the trough baseline already held the weights (or another engine). The probe then printedmeasured.unwrap_or(0). The planner's per-lane footprint stayed the estimate, while the log read like a measurement.What
None(checked subtraction) and falls through toengine_props, the engine's own/propsmemory breakdown, which needs no baseline. Aserving.footprint.device_delta_unreadprobe names the baseline, now and weights that refused it.per_token_measuredprintsnonewhen there is no rate.Measured
This can only be measured after deploy on the 5090. The check:
serving.footprint.measuredreads eitherdevice_deltawith a non-zeroanon_bytes, orengine_propswith a real number, plus adevice_delta_unreadline naming the inputs. It must never showper_token_measured=0. Owner: Cormac, with BigMama reading the 5090 probes.Not in this PR
Two more readings from the same probe lines are carded separately:
bound_by="host-fit"is a catch-all for "served window under demand", whatever actually bound it;at_restplan (31,693) and the reconcile plan (68,394) disagree in the same second.Not compiled locally (IntelMac builds in CI).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE