Repository navigation
[Docs] The 0-slot cache profile saves nothing and severs chat (retracts a 58 ms claim) - #18
Merged
Merged
Conversation
The last non-engine lead from section 6 was that a start-up --prompt-cache 0
looked 58 ms cheaper per request than the router's cache-off path. It does
not survive a matched-size rerun, and the profile it suggested is not
offerable.
real tokens deployed 0 slots difference
126 546.1 ms 350.0 ms -196.1 ms (the reference was
still cache-on, 102 ms park)
456 537.3 ms 539.7 ms +2.4 ms
1608 1463.3 ms 1471.3 ms +8.0 ms
Where both arms serve with the cache off the times are equal; the 196 ms at
126 tokens is the cache-on state, not the slots. The earlier 324-vs-382
comparison had cache-on samples in its median.
And a 0-slot server cannot serve chat: the router's cache-on value comes
from the start-up arguments, so there is nothing to switch back to. C2
2.482 s, C3 2.390 s, R2 2.111 s - every turn re-reads its context, against
0.587 / 0.549 / 2.330 on the deployed config.
So section 6's fourth finding is retracted in place rather than quietly
deleted, the ranked item closes, and what is left needs a phase timer in
the request path - a build.
Also records the harness fault that cost a window: SRV_ARGS reaches
serve/server.py only, so an engine argument like --prompt-cache has to be
rewritten in the config's args list, not passed as a server flag.
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.
Problem and result
Section 6 left one lead: a start-up
--prompt-cache 0measured 58 ms cheaper per request than the router'scache-off path at 75 tokens, suggesting a one-shot deployment profile. The rerun does not support it, and the profile is
not offerable anyway.
Retraction: the 58 ms was an artefact. The 382 ms figure it was compared against was a median that included the
reference arm's first samples while the cache was still on (the
batch_afterhysteresis), so it measured the cache-onstate. At sizes where both arms serve cache-off they are equal within noise.
And 0 slots cannot serve chat. The router's
cache_oncomes from the start-up arguments, so a server started at 0has no value to switch back to:
C22.482 s,C32.390 s,R22.111 s — every turn and repeat re-reads its context,against 0.587 / 0.549 / 2.330 deployed.
That closes the last non-engine lead. The remaining ~165 ms inside prefill needs a phase timer in the request path,
which means a build.
Related discussion
Approach
--prompt-cache 0in the engine'sargument list, three samples at 126 / 456 / 1,608 real tokens plus the mixed traffic shape.
hysteresis, which is exactly how the earlier artefact was produced — here that is visible and labelled instead of
being averaged away.
fourth finding is retracted in place with a pointer to the rerun, and the ranked item closes.
Validation
Passed:
126-token row differs by 196 ms with a 102 ms park recorded in the same request, which accounts for half of it and is
the cache-on state, not the slots.
at 2.4 / 2.4 / 2.1 s with 0 slots — a mechanism (
cache_onread from start-up args), not a timing wobble.:8095 http=200, engine 0.1.58, after both.Failed:
--prompt-cache 0throughSRV_ARGS, whichreaches
serve/server.py, and the server rejected an engine argument (argparse error, no engine line in the log). Theretry rewrote the config's
argslist instead; the failed log is shipped beside the good one.Limits
to kill a 58 ms claim but not to measure a 5 ms one.