Repository navigation
[Docs] The ~165 ms is the expert-slot refill: 0.319 ms per lent slot, on the TTFT path - #19
Merged
Merged
Conversation
… on the TTFT path No build was needed: engine 0.1.59 already prints the prompt path under STRATA_TRACE. Per request it shows prompt start, lent N slots, read N tokens in X ms, refill, prompt done - and the refill is the answer. tokens read refill lent slots refill per slot 127 252 ms 71.7 ms 225 0.319 457 432 ms 82.6 ms 259 0.319 1609 1245 ms 188.2 ms 589 0.320 - the refill runs AFTER the read and BEFORE "prompt done", so the first token waits for it: 72 ms short prompt, 188 ms at 1.6k; - it is one PCIe transfer per lent expert slot at 0.319 ms/slot, the same rate at all three sizes to within 0.3 %; - the read itself carries 109 ms of fixed work (109 + 0.706 ms/token); - 109 + 72 + 56 of cache bookkeeping accounts for the 165 ms section 6 could not name, so nothing is unexplained at this resolution. It also reconciles section 6 with the dispatch: pinning the cache on (conv_route shadow) raises TTFT 148-234 ms but read+refill only 7-29 ms, so the cache-on cost is checkpoint work inside the prompt span, not in the read. Both measurements were right about different parts of it. The lever: the refill does not have to be synchronous. It reclaims slots the NEXT request lends again, and decode needs its own experts - moving it after the first token takes 72-188 ms off TTFT for a few lines of engine change. That is now item 1. Also records the blocked cross-weight check: the Q2_0 pack (34 GB, copied to NVMe for this) cannot start - duplicate split shard, then "native (IQ) pack needs --native", then "11158 experts neither in VRAM nor mirrored", because its 48x512 expert shape needs its own profile where the shipped one is 48x256. Three failure logs shipped as evidence.
This was referenced Nov 15, 2026
Merged
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 ~165 ms of per-request fixed cost unnamed and said naming it needed a phase timer and a build. It did
not: engine 0.1.59 already prints the prompt path when
STRATA_TRACEis set, and it names the missing phase.The expert-slot refill runs after the prompt read and before
prompt done, so the first token waits for it — 72 mson a short prompt, 188 ms at 1.6 k — at a constant 0.319 ms per lent expert slot. The read itself carries 109 ms of
fixed work (
109 ms + 0.706 ms/token). 109 + 72 + 56 ms of cache bookkeeping is the 165 ms.That also reconciles §6 with the dispatch: pinning the cache on raises TTFT by 148–234 ms but raises
read + refillbyonly 7–29 ms, so the cache-on cost is checkpoint work inside the engine's prompt span, not in the read.
The lever: the refill does not have to be synchronous — it reclaims slots the next request lends again, and decode
needs its own experts. Moving it after the first token is 72–188 ms off TTFT for a few lines of engine change. It is now
item 1 of §4.
Related discussion
Approach
STRATA_TRACE=1, six samples per size, and parsed the promptpath per request (
strata-trace-split.pypairs each trace block with its prompt line).conv_route: shadowto separate the cache-on cost from the read, which is how the§6 discrepancy was found rather than smoothed over.
at it; the ranked list gains the refill as item 1 and closes the phase-timer item as "done, no build".
Validation
Passed:
the mechanism checkable by anyone with the logs.
read … 1246.9 ms→refilled 589 slots … 188.0 ms→prompt done, with the ladder's TTFT (1,463 ms at 1,610 tokens) matching read + refill + ~21 ms of server.:8095 http=200, engine 0.1.58, after each of the three runs.failure logs.
Failed:
STRATA_TRACEprints no admission trace at--batch 0(that block is batch-only), so the first attempt lookedlike the env had not reached the engine. The prompt path is what the question needed; the caveat is in §9.
duplicate split shard number(PLE shard doubled as the sibling), thenis a native (IQ) pack: it needs --native,then
REFUSED: 11158 experts are neither in VRAM nor mirrored. Root cause of the last one: the Q2_0 pack declares48×512 experts where the shipped profile is 48×256, so it needs its own calibration.
Not run:
Limits
could hold more than one thing.