Skip to content

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
AzeezIsh merged 1 commit into
mainfrom
fix/serve-amd-ssm-slots-default
Nov 1, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/serve-amd-ssm-slots-default

Conversation

@AzeezIsh

@AzeezIsh AzeezIsh commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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 set SSM_SLOTS=8, which is why this only surfaced in the MAX_BATCH 1 headline runs.

TTFT, 1 user, MTP, Gufo depth protocol slots 0 (old) slots 8 (new)
Flash-Next (framework f165/f168, ×2), 1.85k new after 8k 10.02 s 3.15 s
Flash-Next, after 16k 21.28 s 5.76 s
27B (strix s177, ×2), after 8k 35.3 s 9.25 s
27B, after 16k 68.7 s 10.5 s
Flash-Next, cold 1.87k prompt 1.82 s 2.35 s
27B, cold 1.87k prompt 5.7 s 6.6 s
  • Flash-Next prefix hits restored 4/4 (vs 0/4).
  • Decode tok/s is unchanged.
  • The cold-prompt cost comes from the snapshot path itself: the checkpoint interval (16/64/128, f166) and ATLAS_SSM_TAIL_MIDCHUNK (f168) both measured identical. It is a follow-up lever.
  • Accuracy: agentic-webserver 50 iterations, prefix caching on, via serve-amd with slots 8: 45/50 (f167). Earlier --ssm-cache-slots 8 gates scored 46–48/50 (f92/f93/f103/f109).
  • SSM_SLOTS=0 restores the old behaviour. Recipe-only change.

🤖 Generated with Claude Code

…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant