Repository navigation
serve-amd.sh: SSM_SLOTS defaults to 8 so hybrid models reuse cached prefixes (TTFT after 8k context 3.2–3.8× lower) - #311
Merged
Conversation
…ched prefix (TTFT after 8k context 3.2-3.8x lower) SSM_SLOTS=0 (the old default) disables the Marconi SSM snapshot pool. A hybrid model then can't restore a prefix-cache hit, so every multi-turn request recomputed its whole history. With 8 (the engine raises it to cover MAX_SEQ_LEN): - Flash-Next, framework f165 / f168, 1 user, MTP, x2: TTFT after 8k 10.0 -> 3.15 s, after 16k 21.3 -> 5.76 s; hits restored 4/4 vs 0/4 - 27B, strix s177 (main de0ac8e), x2: TTFT after 8k 35.3 -> 9.25 s, after 16k 68.7 -> 10.5 s Cost: a cold prompt pays for the snapshot saves (Flash-Next 2k 1.82 -> 2.34 s; 27B 2k 5.7 -> 6.6 s). The checkpoint interval (16/64/128, f166) and ATLAS_SSM_TAIL_MIDCHUNK (f168) don't move it. Accuracy: agentic-webserver 45/50 with it on (f167, prefix caching on); earlier --ssm-cache-slots 8 gates scored 46-48/50. Decode speed is unchanged. Co-Authored-By: Claude Opus 5.5 <[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.
SSM_SLOTS=0(the old default) disables the Marconi SSM snapshot pool. Hybrid models (27B and Flash-Next both have GDN layers) then can never restore a prefix-cache hit, and the log says so:Prefix cache hit: 7344 tokens (459 blocks) but no SSM snapshot — recomputing all KV. Every multi-turn request recomputed its full history. My A/Bs at MAX_BATCH 8 always setSSM_SLOTS=8, which is why this only surfaced in the MAX_BATCH 1 headline runs.ATLAS_SSM_TAIL_MIDCHUNK(f168) both measured identical. It is a follow-up lever.--ssm-cache-slots 8gates scored 46–48/50 (f92/f93/f103/f109).SSM_SLOTS=0restores the old behaviour. Recipe-only change.🤖 Generated with Claude Code