[GH-ISSUE #5327] [Engine] Qwen3.8 q2_0 decode ~2.4x slower at 1M context since 0.1.56 (0.1.55 full speed) - single RTX 3090, Linux #3176

Open
opened 2026-11-07 14:38:40 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @pjgmobile on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5327

Summary

Qwen3.8-Flash-Next GSQ-RCO Q2_0 decodes ~2.4x slower on engine 0.1.57 than on 0.1.54 here — same pack, same lane config, same request; the only change is the engine binary.

Hardware / setup

  • RTX 3090 24 GB (the engine places the model on this one card; the 3060 in the box is unused by this lane), 64 GB RAM, Linux, driver 580.126.20
  • App v0.2.11; compared the repo-local engine/ binary (BUILD.json says 0.1.54) against the 0.1.57 component (~/.local/share/strata/components/engine/0.1.57-linux-x86_64-cuda-cuda13)
  • Model: Qwen3.8-Flash-Next-GSQ-RCO Q2_0 (2 shards; the 28.8 GB lookup shard stays memory-mapped)
  • Identical lane args both arms: --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp <drafter> --max-context 1048576 --rope-scaling yarn --rope-scale 4 --kv int8 --kv-resident 32768, layer split auto (single card)

Method

One request per run: a real coding-agent payload (system prompt + 12 tool schemas + a task prompt), ~11.4k prompt tokens, max_tokens 65536, streamed. Decode speed = client-side token count over the 60-90 s window after first token. Two runs per engine, lane restarted between arms, machine rebooted before the session, no other GPU processes.

Results

engine run 1 run 2
0.1.54 116.7 tok/s 119.9 tok/s
0.1.57 45.7 tok/s 54.3 tok/s

During the 0.1.54 runs the serve log shows a healthy profile: decode expert cache hit 97.8%, KV streaming 99.94% of block reads from VRAM, suffix drafting active, conversation-cache restore of the 11.4k prompt in ~36 ms.

Notes

  • The lane config had been pointing at the repo-local engine/ binary, so component updates only took effect once the exe path was switched to the component — that's how the difference surfaced.
  • The 0.1.55 and 0.1.56 components are also installed here; I can bisect which version introduced it, and can share logs/configs.
  • Unsloth UD-IQ1_M (needs 0.1.57 for the new expert formats) measures ~32.6 tok/s on the same method, so it is currently paying the same regression.

Filed programmatically by an automated agent on behalf of the reporter.

Originally created by @pjgmobile on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5327 ## Summary Qwen3.8-Flash-Next GSQ-RCO Q2_0 decodes ~2.4x slower on engine 0.1.57 than on 0.1.54 here — same pack, same lane config, same request; the only change is the engine binary. ## Hardware / setup - RTX 3090 24 GB (the engine places the model on this one card; the 3060 in the box is unused by this lane), 64 GB RAM, Linux, driver 580.126.20 - App v0.2.11; compared the repo-local `engine/` binary (BUILD.json says 0.1.54) against the 0.1.57 component (`~/.local/share/strata/components/engine/0.1.57-linux-x86_64-cuda-cuda13`) - Model: Qwen3.8-Flash-Next-GSQ-RCO Q2_0 (2 shards; the 28.8 GB lookup shard stays memory-mapped) - Identical lane args both arms: `--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp <drafter> --max-context 1048576 --rope-scaling yarn --rope-scale 4 --kv int8 --kv-resident 32768`, layer split auto (single card) ## Method One request per run: a real coding-agent payload (system prompt + 12 tool schemas + a task prompt), ~11.4k prompt tokens, `max_tokens 65536`, streamed. Decode speed = client-side token count over the 60-90 s window after first token. Two runs per engine, lane restarted between arms, machine rebooted before the session, no other GPU processes. ## Results | engine | run 1 | run 2 | |---|---|---| | 0.1.54 | 116.7 tok/s | 119.9 tok/s | | 0.1.57 | 45.7 tok/s | 54.3 tok/s | During the 0.1.54 runs the serve log shows a healthy profile: decode expert cache hit 97.8%, KV streaming 99.94% of block reads from VRAM, suffix drafting active, conversation-cache restore of the 11.4k prompt in ~36 ms. ## Notes - The lane config had been pointing at the repo-local `engine/` binary, so component updates only took effect once the exe path was switched to the component — that's how the difference surfaced. - The 0.1.55 and 0.1.56 components are also installed here; I can bisect which version introduced it, and can share logs/configs. - Unsloth UD-IQ1_M (needs 0.1.57 for the new expert formats) measures ~32.6 tok/s on the same method, so it is currently paying the same regression. Filed programmatically by an automated agent on behalf of the reporter.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6663458007 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6663492827 --> @github-actions[bot] commented on GitHub (Nov 5, 2026): Thanks, this follows the format now.
Author
Owner

@pjgmobile commented on GitHub (Nov 5, 2026):

Update with a context-size isolation on the same lane/model/method (engine 0.1.57, Q2_0):

context rope decode (60-90s window)
1048576 yarn x4 45.7 / 54.3 tok/s
262144 yarn x4 95.5 tok/s
262144 none 93.7 tok/s

So on 0.1.57 the big factor is the 1M window (~2x), not YaRN (yarn vs none is within noise at 262k). Note 0.1.54 measured 116.7/119.9 tok/s at 1048576 on the same method, so there may also be a smaller component present at 256k, or the context penalty starts below 262k. Happy to bisect context sizes or engine versions (0.1.55/0.1.56 components are installed) if useful.

<!-- gh-comment-id:6663823438 --> @pjgmobile commented on GitHub (Nov 5, 2026): Update with a context-size isolation on the same lane/model/method (engine 0.1.57, Q2_0): | context | rope | decode (60-90s window) | |---|---|---| | 1048576 | yarn x4 | 45.7 / 54.3 tok/s | | 262144 | yarn x4 | 95.5 tok/s | | 262144 | none | 93.7 tok/s | So on 0.1.57 the big factor is the 1M window (~2x), not YaRN (yarn vs none is within noise at 262k). Note 0.1.54 measured 116.7/119.9 tok/s at 1048576 on the same method, so there may also be a smaller component present at 256k, or the context penalty starts below 262k. Happy to bisect context sizes or engine versions (0.1.55/0.1.56 components are installed) if useful.
Author
Owner

@pjgmobile commented on GitHub (Nov 5, 2026):

Second model confirming the context-size trigger — Unsloth UD-IQ1_M (also engine 0.1.57, same lane/method; this quant needs 0.1.57 for the new expert formats):

context decode (60-90s window)
1048576 33.0 / 32.3 tok/s
262144 95.9 / 99.2 tok/s

~3x at 262k, landing level with the Q2_0 numbers above. So the 1M-window penalty is not model-specific. (For scale, the same method gives GSQ-RCO Q2_0 on engine 0.1.54 116.7/119.9 tok/s at 1048576.)

<!-- gh-comment-id:6663989751 --> @pjgmobile commented on GitHub (Nov 5, 2026): Second model confirming the context-size trigger — Unsloth UD-IQ1_M (also engine 0.1.57, same lane/method; this quant needs 0.1.57 for the new expert formats): | context | decode (60-90s window) | |---|---| | 1048576 | 33.0 / 32.3 tok/s | | 262144 | 95.9 / 99.2 tok/s | ~3x at 262k, landing level with the Q2_0 numbers above. So the 1M-window penalty is not model-specific. (For scale, the same method gives GSQ-RCO Q2_0 on engine 0.1.54 116.7/119.9 tok/s at 1048576.)
Author
Owner

@pjgmobile commented on GitHub (Nov 5, 2026):

Bisect result — the 1M-context regression was introduced in 0.1.56, not 0.1.57. All four installed engines, same lane/model/method, context 1048576:

engine decode (60-90s window)
0.1.54 116.7 / 119.9 tok/s
0.1.55 116.4 tok/s
0.1.56 51.9 tok/s
0.1.57 45.7 / 54.3 tok/s

So the cliff is between 0.1.55 and 0.1.56 — per #5328 that is the engine from PR #5140. At 262144 context 0.1.57 measures 93.7-95.5 tok/s here, so the regression is specific to (or strongly amplified by) the 1M window.

Note this looks distinct from #5328: that one measures a small uniform 0.1.56→0.1.57 regression (5-13%) at 128-256K contexts on Ada/Windows, whereas this one is large (~2.3x), 1M-specific, present already in 0.1.56, on Ampere/Linux. Two separate changes are likely involved. Happy to re-test anything on 0.1.55/0.1.56 if it helps pin the commit.

<!-- gh-comment-id:6664446191 --> @pjgmobile commented on GitHub (Nov 5, 2026): Bisect result — the 1M-context regression was introduced in **0.1.56**, not 0.1.57. All four installed engines, same lane/model/method, context 1048576: | engine | decode (60-90s window) | |---|---| | 0.1.54 | 116.7 / 119.9 tok/s | | 0.1.55 | 116.4 tok/s | | 0.1.56 | 51.9 tok/s | | 0.1.57 | 45.7 / 54.3 tok/s | So the cliff is between 0.1.55 and 0.1.56 — per #5328 that is the engine from PR #5140. At 262144 context 0.1.57 measures 93.7-95.5 tok/s here, so the regression is specific to (or strongly amplified by) the 1M window. Note this looks distinct from #5328: that one measures a small uniform 0.1.56→0.1.57 regression (5-13%) at 128-256K contexts on Ada/Windows, whereas this one is large (~2.3x), 1M-specific, present already in 0.1.56, on Ampere/Linux. Two separate changes are likely involved. Happy to re-test anything on 0.1.55/0.1.56 if it helps pin the commit.
Author
Owner

@pjgmobile commented on GitHub (Nov 7, 2026):

Found the mechanism with per-boot stderr captures (engine stderr through a wrapper exe) — it is a host-RAM decision, not a VRAM or drafting one. Two boots, same machine, same lane, same model, same hot page cache, 8 minutes apart:

Engine 0.1.54 (fast, decode 121.9 tok/s in the first 30 s):

strata generate: the expert arena needs 31.64 GiB of RAM and 12.87 GiB is available; waiting up to 20 s for it (another engine still exiting?) - 0 s so far (STRATA_ARENA_RAM_WAIT_S changes this)
... (waits 20 s, RAM does not appear)
strata generate: WARNING: the expert arena needs 31.64 GiB of RAM but 12.99 GiB is available (18.66 GiB short, after waiting) ...
strata generate: expert arena read through the file cache (buffered (not Windows))
strata generate: expert arena: cudaHostRegister PORTABLE ok; hugetlb 2 MB pages
strata mtp: draft layer loaded, 836 MiB of VRAM

It warns, then builds the arena through the file cache anyway, and decodes at full speed.

Engine 0.1.58 (slow, 44-49 tok/s), identical shortfall:

strata generate: not enough RAM for the expert arena (it needs 31.64 GiB and 12.78 GiB is available (18.86 GiB short, after waiting)): this run reads the experts from the file, like --mmap-experts (slower; the answers are the same). To get the arena back, free that RAM and start again
strata mtp: draft layer loaded, 838 MiB of VRAM
strata serve: conversation cache off: not enough free RAM to park conversations

Same want (31.64 GiB), same available (~12.9 GiB), opposite decision: 0.1.56+ falls back to file-tier expert reads and decode lands at 45-57 tok/s. strata mtp: draft layer loaded appears in BOTH slow and fast boots, so the drafter is not involved. The earlier VRAM/spill-ladder theories are out.

This also explains the isolation table:

  • Why 1M specifically: at 1M the KV is "32768 of 1048576 cells per QSA layer in VRAM, the K/V in 12.38 GiB of pinned RAM" — the pinned KV is what takes the box's available RAM below the arena line at 1M, while the same boots at 262144 pass it. The trigger is host-RAM headroom, not window-size code.
  • Why one 0.1.58 boot ran full speed (116.3 tok/s): it booted right after other large models had evicted this model's files from the page cache, so available RAM was higher, the check passed, and the arena was built. Every boot with the model's 66 GB of files already hot in page cache measured ~12.8 GiB available and fell back — including on a freshly rebooted machine (the boot's own load re-fills the cache before the arena check).
  • Version boundary: the bisect table stands (0.1.55 = 116.4, 0.1.56 = 51.9 at 1M). The changed behavior between them is this decision: warn-and-proceed became refuse-and-fallback on the same shortfall.

The 0.1.54 warning even points at the trade-off itself ("the load may swap or be stopped by the OS ... #4051") — on this box neither happens; the file-cache-backed arena decodes at 116-122 tok/s for hours.

Suggestion: restore the 0.1.55 behavior when the shortfall can be served through the file cache (or make the fallback opt-in), or at minimum print the fallback on stdout so serving setups see the 2.4x decode loss instead of discovering it in throughput.

<!-- gh-comment-id:6712297767 --> @pjgmobile commented on GitHub (Nov 7, 2026): Found the mechanism with per-boot stderr captures (engine stderr through a wrapper exe) — it is a host-RAM decision, not a VRAM or drafting one. Two boots, same machine, same lane, same model, same hot page cache, 8 minutes apart: **Engine 0.1.54 (fast, decode 121.9 tok/s in the first 30 s):** ``` strata generate: the expert arena needs 31.64 GiB of RAM and 12.87 GiB is available; waiting up to 20 s for it (another engine still exiting?) - 0 s so far (STRATA_ARENA_RAM_WAIT_S changes this) ... (waits 20 s, RAM does not appear) strata generate: WARNING: the expert arena needs 31.64 GiB of RAM but 12.99 GiB is available (18.66 GiB short, after waiting) ... strata generate: expert arena read through the file cache (buffered (not Windows)) strata generate: expert arena: cudaHostRegister PORTABLE ok; hugetlb 2 MB pages strata mtp: draft layer loaded, 836 MiB of VRAM ``` It warns, then builds the arena through the file cache anyway, and decodes at full speed. **Engine 0.1.58 (slow, 44-49 tok/s), identical shortfall:** ``` strata generate: not enough RAM for the expert arena (it needs 31.64 GiB and 12.78 GiB is available (18.86 GiB short, after waiting)): this run reads the experts from the file, like --mmap-experts (slower; the answers are the same). To get the arena back, free that RAM and start again strata mtp: draft layer loaded, 838 MiB of VRAM strata serve: conversation cache off: not enough free RAM to park conversations ``` Same want (31.64 GiB), same available (~12.9 GiB), opposite decision: 0.1.56+ falls back to file-tier expert reads and decode lands at 45-57 tok/s. `strata mtp: draft layer loaded` appears in BOTH slow and fast boots, so the drafter is not involved. The earlier VRAM/spill-ladder theories are out. This also explains the isolation table: - **Why 1M specifically**: at 1M the KV is "32768 of 1048576 cells per QSA layer in VRAM, the K/V in 12.38 GiB of pinned RAM" — the pinned KV is what takes the box's available RAM below the arena line at 1M, while the same boots at 262144 pass it. The trigger is host-RAM headroom, not window-size code. - **Why one 0.1.58 boot ran full speed (116.3 tok/s)**: it booted right after other large models had evicted this model's files from the page cache, so available RAM was higher, the check passed, and the arena was built. Every boot with the model's 66 GB of files already hot in page cache measured ~12.8 GiB available and fell back — including on a freshly rebooted machine (the boot's own load re-fills the cache before the arena check). - **Version boundary**: the bisect table stands (0.1.55 = 116.4, 0.1.56 = 51.9 at 1M). The changed behavior between them is this decision: warn-and-proceed became refuse-and-fallback on the same shortfall. The 0.1.54 warning even points at the trade-off itself ("the load may swap or be stopped by the OS ... #4051") — on this box neither happens; the file-cache-backed arena decodes at 116-122 tok/s for hours. Suggestion: restore the 0.1.55 behavior when the shortfall can be served through the file cache (or make the fallback opt-in), or at minimum print the fallback on stdout so serving setups see the 2.4x decode loss instead of discovering it in throughput.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3176
No description provided.