[GH-ISSUE #1135] k8v4: deterministic token repetition on sequential generation (RTX 5090, 0.1.40) — byte-identical across two quants #475

Closed
opened 2026-11-04 01:43:21 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @gravitomagnetic on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1135

Follow-up to my field report in #711 (comment 6016065570) — filing as an issue so it can be tracked.

Setup: RTX 5090 32 GB, Strata 0.1.40 source build, Qwen3.8-Flash-Next MoE (12 QSA layers), 1M ctx YaRN×4, --kv-resident 32768, --mtp --spec 4, --batch 2 --batch-mtp, vision on, driver 595.91.07, CUDA 13.4. A/B: --kv int8 vs --kv k8v4, fresh engine start per leg, temperature 0, enable_thinking: false.

Symptom: under k8v4, the decode probe "Count from 1 to 300, one number per line" repeats each integer:

int8:  1 2 3 4 5 6 7 8 9 10 11 12 13 …
k8v4:  1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 1…

Runs of four appear around 10–13. Deterministic at temp 0.

The sharpest clue: the corrupted output is byte-identical between IQ3_S and Q2_0 — two substrates sharing nothing about their weights (1.94 vs 1.32 MiB experts, different quantization). The only shared component is the k8v4 KV path, so the repetition is introduced by the value quantization/dequant itself, not by model weights or random distortion. That signature reads like a systematic grid/scale bias rather than inherent 4-bit noise — potentially fixable.

What is NOT affected: needle-in-haystack exact recall at ~200K tokens passes on both legs (keys stay INT8-exact, retrieval survives). Cold prefill is ~flat (−3%). Decode is actually +30–33% (98→130 IQ3_S, 151→197 Q2_0). So this is specifically short-range sequential generation — plausibly the recency signal in the value payload of the most recent cells ("what did I just emit").

Repro: the harness is in my last comment on #711; probes are cold-prefill / counting / needle. Single run per leg; the artifact reproduced identically in both quants' runs, so it is not a one-off.

Question for you: is this the expected distortion of rotated Q4_0 values at 32,768 resident cells, or worth a look at the dequant scale rounding? If expected, a line in the k8v4 docs ("avoid for enumeration/structured-output seats; retrieval unaffected") would help users choose.

Not tested yet: whether code, JSON, or other structured outputs show the same doubling.

Originally created by @gravitomagnetic on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1135 Follow-up to my field report in #711 (comment [6016065570](https://github.com/Niko1221/Strata/pull/711#issuecomment-6016065570)) — filing as an issue so it can be tracked. **Setup:** RTX 5090 32 GB, Strata 0.1.40 source build, Qwen3.8-Flash-Next MoE (12 QSA layers), 1M ctx YaRN×4, `--kv-resident 32768`, `--mtp --spec 4`, `--batch 2 --batch-mtp`, vision on, driver 595.91.07, CUDA 13.4. A/B: `--kv int8` vs `--kv k8v4`, fresh engine start per leg, temperature 0, `enable_thinking: false`. **Symptom:** under k8v4, the decode probe "Count from 1 to 300, one number per line" repeats each integer: ``` int8: 1 2 3 4 5 6 7 8 9 10 11 12 13 … k8v4: 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 1… ``` Runs of four appear around 10–13. Deterministic at temp 0. **The sharpest clue:** the corrupted output is **byte-identical between IQ3_S and Q2_0** — two substrates sharing nothing about their weights (1.94 vs 1.32 MiB experts, different quantization). The only shared component is the k8v4 KV path, so the repetition is introduced by the value quantization/dequant itself, not by model weights or random distortion. That signature reads like a systematic grid/scale bias rather than inherent 4-bit noise — potentially fixable. **What is NOT affected:** needle-in-haystack exact recall at ~200K tokens passes on both legs (keys stay INT8-exact, retrieval survives). Cold prefill is ~flat (−3%). Decode is actually **+30–33%** (98→130 IQ3_S, 151→197 Q2_0). So this is specifically short-range sequential generation — plausibly the recency signal in the value payload of the most recent cells ("what did I just emit"). **Repro:** the harness is in my last comment on #711; probes are cold-prefill / counting / needle. Single run per leg; the artifact reproduced identically in both quants' runs, so it is not a one-off. **Question for you:** is this the expected distortion of rotated Q4_0 values at 32,768 resident cells, or worth a look at the dequant scale rounding? If expected, a line in the k8v4 docs ("avoid for enumeration/structured-output seats; retrieval unaffected") would help users choose. Not tested yet: whether code, JSON, or other structured outputs show the same doubling.
Author
Owner

@taxah92 commented on GitHub (Oct 6, 2026):

A second data point, from the opposite side of the kernel table: the artifact does not reproduce on Volta. This is also the Volta evidence the 0.1.40 release notes ask for ("we now have a P100 for sm_60, but not Volta").

Rig: Tesla V100 SXM2 16 GB (sm_70), CUDA 12.4 distro toolkit, Ubuntu 26.04, EPYC 7532, one GPU, no layer split. Stock v0.1.40.1 tree plus two local patches: a build guard for CUDA <12.5 in vmm.cpp, and our copy of the k8v4 batch host-mirror fix from #1169 — neither touches the Q4_0 value dequant, and #1169 is a different failure (stale parked state, not repetition).

Config: Qwen3.8-Flash-Next IQ3_S (same quant as your first lane), --max-context 1048576 --rope-scaling yarn --rope-scale 4, --kv k8v4 --kv-resident 32768, --mtp --spec 3 --suffix-draft 3, no --batch, conversation parking on.

Probe: "Count from 1 to 300, one number per line", temperature 0, enable_thinking: false, max_tokens 900: counted 1..220+ clean, stopped by the token limit (finish=length), zero consecutive repeats, strict +1 sequence. Your artifact starts at the second number, so 220 clean numbers is a solid negative here.

What differs from your box: sm_70 vs sm_120 (different k8v4 dequant/attention paths), --spec 3 vs 4, no batch slots, 1M YaRN vs ~200K. IQ3_S is the shared constant — consistent with your conclusion that the bias is in the value path, not the weights; it just seems not to reach argmax on the Volta kernels. Worth checking whether it is sm_120-specific or needs the spec-4/batch interaction.

Caveat: same limitation as your report — only the counting probe was characterized here; code/JSON structured output under k8v4 on this rig is still under observation in real agent traffic.

<!-- gh-comment-id:6019396444 --> @taxah92 commented on GitHub (Oct 6, 2026): A second data point, from the opposite side of the kernel table: **the artifact does not reproduce on Volta.** This is also the Volta evidence the 0.1.40 release notes ask for ("we now have a P100 for sm_60, but not Volta"). **Rig:** Tesla V100 SXM2 16 GB (sm_70), CUDA 12.4 distro toolkit, Ubuntu 26.04, EPYC 7532, one GPU, no layer split. Stock `v0.1.40.1` tree plus two local patches: a build guard for CUDA <12.5 in `vmm.cpp`, and our copy of the k8v4 batch host-mirror fix from #1169 — neither touches the Q4_0 value dequant, and #1169 is a different failure (stale parked state, not repetition). **Config:** Qwen3.8-Flash-Next **IQ3_S** (same quant as your first lane), `--max-context 1048576 --rope-scaling yarn --rope-scale 4`, `--kv k8v4 --kv-resident 32768`, `--mtp --spec 3 --suffix-draft 3`, no `--batch`, conversation parking on. **Probe:** "Count from 1 to 300, one number per line", temperature 0, `enable_thinking: false`, `max_tokens 900`: counted **1..220+ clean**, stopped by the token limit (`finish=length`), **zero consecutive repeats**, strict +1 sequence. Your artifact starts at the second number, so 220 clean numbers is a solid negative here. What differs from your box: sm_70 vs sm_120 (different k8v4 dequant/attention paths), `--spec 3` vs 4, no batch slots, 1M YaRN vs ~200K. IQ3_S is the shared constant — consistent with your conclusion that the bias is in the value path, not the weights; it just seems not to reach argmax on the Volta kernels. Worth checking whether it is sm_120-specific or needs the spec-4/batch interaction. Caveat: same limitation as your report — only the counting probe was characterized here; code/JSON structured output under k8v4 on this rig is still under observation in real agent traffic.
Author
Owner

@gravitomagnetic commented on GitHub (Oct 6, 2026):

Cross-referencing #1188: our box is a second sm_120 positive, and their isolation matrix explains the part we couldn't.

Our #1135 runs had --kv-resident 32768 active in every leg — so both broken rows here (IQ3_S, Q2_0, RTX 5090) sit in exactly the cell #1188 identifies as the trigger: k8v4 + streaming, not k8v4 alone. Their row 3 (k8v4, --kv-resident 0, byte-identical to int8) predicts something we can test on this box and hadn't considered: the same k8v4 decode speedup with no repetition, if the streaming path is the bug. And their q4_0-clean row kills my "4-bit value payload is inherently blurry" framing — the pointer/payload asymmetry story was the wrong axis; it's the streamed-V dequant on Blackwell kernels.

Also adopting their extra symptom: short factual answers going verbose (16-32 tokens vs 6) — we only characterized the counting probe, and our needle recall passing at 200K matches their "needle: pass" rows exactly. Retrieval intact, generation degenerate, across both reports.

Plan on this 5090: run k8v4 with --kv-resident 0 (max-context lowered to fit) as a fourth leg — if clean, we confirm #1188's isolation on sm_120 hardware independently of their 5080, and the suspect narrows to the streamed k8v4 kernel path shared by both Blackwell cards, with @taxah92's clean Volta rows pinning it to sm_120 specifically. Will post the leg here.

<!-- gh-comment-id:6020467510 --> @gravitomagnetic commented on GitHub (Oct 6, 2026): Cross-referencing #1188: our box is a second sm_120 positive, and their isolation matrix explains the part we couldn't. Our #1135 runs had `--kv-resident 32768` active in every leg — so both broken rows here (IQ3_S, Q2_0, RTX 5090) sit in exactly the cell #1188 identifies as the trigger: **k8v4 + streaming**, not k8v4 alone. Their row 3 (k8v4, `--kv-resident 0`, byte-identical to int8) predicts something we can test on this box and hadn't considered: the same k8v4 decode speedup with no repetition, if the streaming path is the bug. And their q4_0-clean row kills my "4-bit value payload is inherently blurry" framing — the pointer/payload asymmetry story was the wrong axis; it's the streamed-V dequant on Blackwell kernels. Also adopting their extra symptom: short factual answers going verbose (16-32 tokens vs 6) — we only characterized the counting probe, and our needle recall passing at 200K matches their "needle: pass" rows exactly. Retrieval intact, generation degenerate, across both reports. Plan on this 5090: run k8v4 with `--kv-resident 0` (max-context lowered to fit) as a fourth leg — if clean, we confirm #1188's isolation on sm_120 hardware independently of their 5080, and the suspect narrows to the streamed k8v4 kernel path shared by both Blackwell cards, with @taxah92's clean Volta rows pinning it to sm_120 specifically. Will post the leg here.
Author
Owner

@gravitomagnetic commented on GitHub (Oct 6, 2026):

Follow-up as promised: ran the #1188 row-3 cross-check on this 5090 (sm_120) — k8v4 with --kv-resident 0 is clean. The bug tracks the streamed path, not the format.

Leg config: IQ3_S, --kv k8v4 --kv-resident 0 --max-context 262144 --rope-scale 1 (YaRN dropped since 262K needs no scaling), same probes as our first table, greedy, enable_thinking:false:

probe k8v4 + streamed (this morning) k8v4 + --kv-resident 0 (now)
counting 1..300 1 2 2 3 3 4 4… degenerate clean to cap (88+ strict +1, zero repeats)
1–60 in words not run 156 tokens, all 60 words, zero repeats — byte-count identical to #1188's clean rows
three colors not run 6 tokens (Red, Blue, Green) — #1188's verbose-16-32 symptom absent
needle @200K pass pass
cold prefill 200K 3,276 t/s 3,339 t/s
decode (counting) 130 t/s 91 t/s
expert slots 8,238 (15.62 GiB) 6,796 (12.90 GiB)

So on sm_120: k8v4 format alone = clean; k8v4 + --kv-resident = the deterministic repetition from #1135/#1188. Combined with @taxah92's clean Volta rows (streaming ON, sm_70), the suspect is the streamed k8v4 dequant/attention path on Blackwell kernels specifically.

One config consequence worth stating: the +30% decode we measured this morning was entangled with the buggy path. Turning streaming off fixes the repetition but costs ~1,400 expert slots (full KV at 262K lives in VRAM) and decode drops to 91 t/s — below int8+streamed (98). So today's honest ranking on a 32 GB sm_120 card at long context: int8 + streamed remains the best config; k8v4's speed win only exists in the configuration that's broken. If the streamed-k8v4 kernel bug gets fixed, 130 t/s + 22.8% less KV RAM becomes available and we flip immediately — happy to re-run this exact leg on any candidate build.

Raw JSON: kv_nostream_k8v4_20261006_1236.json (lane: RTX 5090, driver 595.91.07, CUDA 13.4, 0.1.40 source build).

<!-- gh-comment-id:6021182827 --> @gravitomagnetic commented on GitHub (Oct 6, 2026): Follow-up as promised: ran the #1188 row-3 cross-check on this 5090 (sm_120) — **k8v4 with `--kv-resident 0` is clean.** The bug tracks the streamed path, not the format. Leg config: IQ3_S, `--kv k8v4 --kv-resident 0 --max-context 262144 --rope-scale 1` (YaRN dropped since 262K needs no scaling), same probes as our first table, greedy, `enable_thinking:false`: | probe | k8v4 + streamed (this morning) | k8v4 + `--kv-resident 0` (now) | |---|---|---| | counting 1..300 | `1 2 2 3 3 4 4…` degenerate | **clean to cap** (88+ strict +1, zero repeats) | | 1–60 in words | not run | **156 tokens, all 60 words, zero repeats** — byte-count identical to #1188's clean rows | | three colors | not run | **6 tokens** (`Red, Blue, Green`) — #1188's verbose-16-32 symptom absent | | needle @200K | pass | pass | | cold prefill 200K | 3,276 t/s | 3,339 t/s | | decode (counting) | 130 t/s | 91 t/s | | expert slots | 8,238 (15.62 GiB) | **6,796 (12.90 GiB)** | So on sm_120: k8v4 format alone = clean; k8v4 + `--kv-resident` = the deterministic repetition from #1135/#1188. Combined with @taxah92's clean Volta rows (streaming ON, sm_70), the suspect is the **streamed k8v4 dequant/attention path on Blackwell kernels specifically**. One config consequence worth stating: the +30% decode we measured this morning was entangled with the buggy path. Turning streaming off fixes the repetition but costs ~1,400 expert slots (full KV at 262K lives in VRAM) and decode drops to 91 t/s — *below* int8+streamed (98). So today's honest ranking on a 32 GB sm_120 card at long context: **int8 + streamed remains the best config**; k8v4's speed win only exists in the configuration that's broken. If the streamed-k8v4 kernel bug gets fixed, 130 t/s + 22.8% less KV RAM becomes available and we flip immediately — happy to re-run this exact leg on any candidate build. Raw JSON: `kv_nostream_k8v4_20261006_1236.json` (lane: RTX 5090, driver 595.91.07, CUDA 13.4, 0.1.40 source build).
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Fixed in 0.1.40.2: same cause as #1188 (K8V4 with --kv-resident lost the cells the batched append wrote). Credit to Benjamin Larsson (PR #1264). Please retest.

<!-- gh-comment-id:6038016636 --> @Niko1221 commented on GitHub (Oct 7, 2026): Fixed in 0.1.40.2: same cause as #1188 (K8V4 with --kv-resident lost the cells the batched append wrote). Credit to Benjamin Larsson (PR #1264). Please retest.
Author
Owner

@gravitomagnetic commented on GitHub (Oct 8, 2026):

Update from the 5090 reference machine: Benjamin's #1264 fix is in 0.1.40.2, and we've now re-run the k8v4 leg properly (interleaved protocol, 3 matched pairs, engine 0.1.41).

The fix verifies on sm_120: count-to-300 clean (zero repeats, 3/3), needle recall at 200K 3/3, no crash-loop.

But the perf case from our Oct 6 table was an artifact of the bug itself — the repeated tokens (2 2 3 3 4 4…) were accepted by MTP speculation nearly for free, inflating the broken k8v4 leg. With the fix, on our config: decode ties int8 within noise (256-tok greedy 202.4/203.0/202.6 vs 201.8/200.5/199.8 tok/s), the 2.8 GiB pinned-RAM saving buys +146 expert slots (8310-8311 vs 8164-8165) which add nothing measurable at ~90% hit, and the streaming path costs a consistent ~3% on 200K prefill (59.8-59.9 s vs 57.9-58.1 s). int8 stays our daily KV.

Full tables + protocol note (blocked runs drift ~30% by the last leg — interleave at small n) in bench PR #1592, folder bench/results/2026-10-08-community-rtx5090-1m-agent-interleaved/.

<!-- gh-comment-id:6064442132 --> @gravitomagnetic commented on GitHub (Oct 8, 2026): Update from the 5090 reference machine: Benjamin's #1264 fix is in 0.1.40.2, and we've now re-run the k8v4 leg properly (interleaved protocol, 3 matched pairs, engine 0.1.41). **The fix verifies on sm_120**: count-to-300 clean (zero repeats, 3/3), needle recall at 200K 3/3, no crash-loop. **But the perf case from our Oct 6 table was an artifact of the bug itself** — the repeated tokens (`2 2 3 3 4 4…`) were accepted by MTP speculation nearly for free, inflating the broken k8v4 leg. With the fix, on our config: decode ties int8 within noise (256-tok greedy 202.4/203.0/202.6 vs 201.8/200.5/199.8 tok/s), the 2.8 GiB pinned-RAM saving buys +146 expert slots (8310-8311 vs 8164-8165) which add nothing measurable at ~90% hit, and the streaming path costs a consistent ~3% on 200K prefill (59.8-59.9 s vs 57.9-58.1 s). int8 stays our daily KV. Full tables + protocol note (blocked runs drift ~30% by the last leg — interleave at small n) in bench PR #1592, folder `bench/results/2026-10-08-community-rtx5090-1m-agent-interleaved/`.
Author
Owner

@dany4ok commented on GitHub (Nov 6, 2026):

Community benchmark: INT8 vs Q4_0 vs K8/V4 on Gyro-S / RTX 5070 Ti

Hardware: Windows 10, NVIDIA RTX 5070 Ti (16 GB VRAM), 32 GB RAM, Ryzen 7 7700X. Software/config: Strata engine 0.1.57, Qwen3.8-Flash-Next Gyro-S, one request at a time (parallel=1), max context 131072, --spec 4, --kv-resident 32768, VRAM reserve 512 MiB. Tests were sequential real codex exec tasks, not synthetic API-only tests. Each variant ran for at least 60 seconds including load/benchmark; K8/V4 active benchmark was 122.34 s.

Variant Short Read-only tool Expert cache Free VRAM Cold prompt read Task switch Decode
INT8 5.01 s 35.72 s 7144 slots / 7150 MiB ~225 MiB; 382 MiB after restore 16,396 tok / 12.700 s = 1291 tok/s — ~63.1 tok/s
Q4_0 15.57 s 36.17 s 7337 / 7344 MiB 549 MiB 16,406 tok / 11.024 s = 1488 tok/s 15,604 reused + 810 new / 1.216 s = 666 tok/s ~50-61 tok/s; peaks ~72
K8/V4 15.85 s 46.33 s 7718 / 7725 MiB 58 MiB 16,408 tok / 11.926 s = 1376 tok/s 15,604 reused + 812 new / 1.296 s = 626 tok/s ~64-67 tok/s; peaks ~75-79

K8/V4 included three real Codex tasks: short 15.85 s, read-only tool 46.33 s, and long generation 52.92 s, for 122.34 s active benchmark time.

Cache and prompt switching

  • Prompt text is normally processed from RAM/VRAM, not directly from SSD.
  • Resident KV window: 32768 cells in VRAM; remainder streamed from pinned RAM.
  • Observed KV streaming hit rates: about 96-99.7% VRAM hits. SSD activity was mainly model/expert loading or misses, not normal prompt-cache reading.
  • With a preserved common prefix, switches reused about 15.6K tokens and read only about 0.8K new tokens. Cold full-prompt reads were about 1.3-1.5K tok/s; cached switches took about 1.2-1.3 s for the new tail.

Conclusions

K8/V4 provided the most expert-cache capacity and slightly higher raw decode, but 58 MiB free VRAM is too close to paging/instability on this 16 GB card. Q4_0 improved memory headroom but showed no clear real-client wall-time win. INT8 was selected and restored as the final stable configuration.

Codex returned exit code 0. Reproduction caveats: non-fatal missing-model-metadata fallback warning and non-fatal GitHub Copilot MCP authentication warning. This is a community benchmark; happy to rerun a tighter interleaved A/B protocol if useful.

<!-- gh-comment-id:6673923837 --> @dany4ok commented on GitHub (Nov 6, 2026): ## Community benchmark: INT8 vs Q4_0 vs K8/V4 on Gyro-S / RTX 5070 Ti **Hardware:** Windows 10, NVIDIA RTX 5070 Ti (16 GB VRAM), 32 GB RAM, Ryzen 7 7700X. **Software/config:** Strata engine 0.1.57, Qwen3.8-Flash-Next Gyro-S, one request at a time (`parallel=1`), max context 131072, `--spec 4`, `--kv-resident 32768`, VRAM reserve 512 MiB. Tests were sequential real `codex exec` tasks, not synthetic API-only tests. Each variant ran for at least 60 seconds including load/benchmark; K8/V4 active benchmark was 122.34 s. | Variant | Short | Read-only tool | Expert cache | Free VRAM | Cold prompt read | Task switch | Decode | |---|---:|---:|---:|---:|---:|---:|---:| | INT8 | 5.01 s | 35.72 s | 7144 slots / 7150 MiB | ~225 MiB; 382 MiB after restore | 16,396 tok / 12.700 s = 1291 tok/s | — | ~63.1 tok/s | | Q4_0 | 15.57 s | 36.17 s | 7337 / 7344 MiB | 549 MiB | 16,406 tok / 11.024 s = 1488 tok/s | 15,604 reused + 810 new / 1.216 s = 666 tok/s | ~50-61 tok/s; peaks ~72 | | K8/V4 | 15.85 s | 46.33 s | 7718 / 7725 MiB | 58 MiB | 16,408 tok / 11.926 s = 1376 tok/s | 15,604 reused + 812 new / 1.296 s = 626 tok/s | ~64-67 tok/s; peaks ~75-79 | K8/V4 included three real Codex tasks: short 15.85 s, read-only tool 46.33 s, and long generation 52.92 s, for 122.34 s active benchmark time. ### Cache and prompt switching - Prompt text is normally processed from RAM/VRAM, not directly from SSD. - Resident KV window: 32768 cells in VRAM; remainder streamed from pinned RAM. - Observed KV streaming hit rates: about 96-99.7% VRAM hits. SSD activity was mainly model/expert loading or misses, not normal prompt-cache reading. - With a preserved common prefix, switches reused about 15.6K tokens and read only about 0.8K new tokens. Cold full-prompt reads were about 1.3-1.5K tok/s; cached switches took about 1.2-1.3 s for the new tail. ### Conclusions K8/V4 provided the most expert-cache capacity and slightly higher raw decode, but 58 MiB free VRAM is too close to paging/instability on this 16 GB card. Q4_0 improved memory headroom but showed no clear real-client wall-time win. INT8 was selected and restored as the final stable configuration. Codex returned exit code 0. Reproduction caveats: non-fatal missing-model-metadata fallback warning and non-fatal GitHub Copilot MCP authentication warning. This is a community benchmark; happy to rerun a tighter interleaved A/B protocol if useful.
Author
Owner

@dany4ok commented on GitHub (Nov 6, 2026):

Additional benchmark context from the same session

These are earlier real-task measurements on the same RTX 5070 Ti / 32 GB RAM system. They are included as context for task switching and throughput, including the analysis of the apparent ~8-second delay.

One request vs two concurrent requests

  • Gyro-S with two active requests: about 25-30 tok/s total, not 68 tok/s per request. With 64K context plus batch-MTP, about 14 tok/s/request and 28 tok/s total.
  • Coder IQ1_M: one request about 52.4 tok/s; two simultaneous requests about 25 tok/s total (roughly 12-13 tok/s/request).
  • Two slots caused substantially lower expert-cache residency and more RAM/paging pressure. The practical recommendation for this GPU is one active request, with helper/second tasks taking turns.

Context, speculation and VRAM tests

  • Gyro-S clean engine baseline: approximately 63.4 / 72.0 / 73.8 tok/s across repeated requests; median about 72 tok/s. A longer monitor sample averaged about 69.8 tok/s, with an observed range of roughly 59.8-79.8 tok/s and a peak around 79.8 tok/s.
  • A larger VRAM reserve of 1856 MiB produced approximately 57.3 / 62.5 / 66.4 tok/s (median 62.5), so it was slower and was not retained.
  • 96K context with spec=4 produced approximately 63.0-79.9 tok/s in the observed requests and was more promising than increasing the reserve, but the full baseline was later restored.
  • 96K context with spec=2 produced approximately 49-52 tok/s and was slower than spec=4.
  • The final restored configuration is the original 131072 context, spec=4, INT8, one request.

Prompt size and queue effects

  • Real requests commonly carried roughly 28K-76K input tokens.
  • Observed examples: 39,153 tokens read in about 15.5 s and 72,085 tokens read in about 29.3 s.
  • In a live switch test contaminated by real traffic, one switch took about 36.3 s and another about 234.6 s; one request reached the 300 s guard limit. This showed that large prompts and queued/concurrent work dominated client-visible latency.
  • The engine's prompt prefill was much faster when the common prefix was already in KV cache; task switching then read only the new tail.

The apparent ~8-second delay

  • The investigation did not find a fixed 8-second timer in the guard or engine.
  • The original guard values were IDLE_S = 30 seconds and MAX_WAIT_S = 300 seconds. The apparent values around 8 seconds were the time needed by the preceding request to finish, not an artificial 8-second sleep.
  • After the previous request completed, a one-slot handoff test showed the next request waiting about 0.22 s for a 0.25 s request, rather than 30 seconds.
  • In a live two-chat test, the observed turns were about 5.4 s and 6.3 s, with handoff immediately after the first completed.
  • The much longer 36-235 s switch times appeared when large prompts, tool calls, queued work, and competing requests were involved. Therefore the perceived "8-second limit" was a request-completion/queue effect, not a fixed throttle.

Guard and task-switch experiments

  • The original one-request guard was restored for the final configuration. It uses one active request, IDLE_S=30 and MAX_WAIT_S=300.
  • A temporary one-slot handoff variant removed the artificial idle wait while preserving parallel=1; an isolated gate test measured request B waiting about 0.22 s behind a 0.25 s request A.
  • The temporary optimization was not kept in the final state because the complete original baseline was explicitly restored afterward.
  • The final host load was performed through Strata's official /api/native/operations load API, avoiding an independent engine that the host could not see.

Baseline and reproducibility details

  • Final baseline: Gyro-S, engine 0.1.57, 131072 context, --kv int8, --spec 4, --kv-resident 32768, --vram-reserve-mib 512, one request (parallel=1), no --batch 2, and no --batch-mtp.
  • The model was loaded through the Strata host and verified ready before real Codex tasks were run.
  • Codex used codex exec sequentially with read-only sandbox tasks. The model metadata fallback warning and GitHub Copilot MCP authentication warning were non-fatal; benchmark tasks returned code 0.
  • A Codex context experiment temporarily used 98304 context and a 75000 auto-compact threshold, but this was rolled back to the complete 131072 baseline.
  • The journal records the full setup, backups, timings and engine observations; no API keys or secrets were included in the shared results.

Takeaway

For this hardware, the largest practical gains came from keeping one active request, preserving/reusing the prompt prefix, avoiding unnecessary context growth, and preventing queue/paging pressure. Raw decode speed alone did not predict the end-to-end Codex task time.

<!-- gh-comment-id:6674104869 --> @dany4ok commented on GitHub (Nov 6, 2026): ## Additional benchmark context from the same session These are earlier real-task measurements on the same RTX 5070 Ti / 32 GB RAM system. They are included as context for task switching and throughput, including the analysis of the apparent ~8-second delay. ### One request vs two concurrent requests - Gyro-S with two active requests: about **25-30 tok/s total**, not 68 tok/s per request. With 64K context plus batch-MTP, about **14 tok/s/request** and **28 tok/s total**. - Coder IQ1_M: one request about **52.4 tok/s**; two simultaneous requests about **25 tok/s total** (roughly 12-13 tok/s/request). - Two slots caused substantially lower expert-cache residency and more RAM/paging pressure. The practical recommendation for this GPU is one active request, with helper/second tasks taking turns. ### Context, speculation and VRAM tests - Gyro-S clean engine baseline: approximately **63.4 / 72.0 / 73.8 tok/s** across repeated requests; median about **72 tok/s**. A longer monitor sample averaged about **69.8 tok/s**, with an observed range of roughly 59.8-79.8 tok/s and a peak around 79.8 tok/s. - A larger VRAM reserve of **1856 MiB** produced approximately **57.3 / 62.5 / 66.4 tok/s** (median 62.5), so it was slower and was not retained. - **96K context with spec=4** produced approximately 63.0-79.9 tok/s in the observed requests and was more promising than increasing the reserve, but the full baseline was later restored. - **96K context with spec=2** produced approximately 49-52 tok/s and was slower than spec=4. - The final restored configuration is the original **131072 context, spec=4, INT8, one request**. ### Prompt size and queue effects - Real requests commonly carried roughly **28K-76K input tokens**. - Observed examples: 39,153 tokens read in about 15.5 s and 72,085 tokens read in about 29.3 s. - In a live switch test contaminated by real traffic, one switch took about 36.3 s and another about 234.6 s; one request reached the 300 s guard limit. This showed that large prompts and queued/concurrent work dominated client-visible latency. - The engine's prompt prefill was much faster when the common prefix was already in KV cache; task switching then read only the new tail. ### The apparent ~8-second delay - The investigation did **not** find a fixed 8-second timer in the guard or engine. - The original guard values were `IDLE_S = 30` seconds and `MAX_WAIT_S = 300` seconds. The apparent values around 8 seconds were the time needed by the preceding request to finish, not an artificial 8-second sleep. - After the previous request completed, a one-slot handoff test showed the next request waiting about 0.22 s for a 0.25 s request, rather than 30 seconds. - In a live two-chat test, the observed turns were about 5.4 s and 6.3 s, with handoff immediately after the first completed. - The much longer 36-235 s switch times appeared when large prompts, tool calls, queued work, and competing requests were involved. Therefore the perceived "8-second limit" was a request-completion/queue effect, not a fixed throttle. ### Guard and task-switch experiments - The original one-request guard was restored for the final configuration. It uses one active request, `IDLE_S=30` and `MAX_WAIT_S=300`. - A temporary one-slot handoff variant removed the artificial idle wait while preserving `parallel=1`; an isolated gate test measured request B waiting about 0.22 s behind a 0.25 s request A. - The temporary optimization was not kept in the final state because the complete original baseline was explicitly restored afterward. - The final host load was performed through Strata's official `/api/native/operations` load API, avoiding an independent engine that the host could not see. ### Baseline and reproducibility details - Final baseline: Gyro-S, engine 0.1.57, 131072 context, `--kv int8`, `--spec 4`, `--kv-resident 32768`, `--vram-reserve-mib 512`, one request (`parallel=1`), no `--batch 2`, and no `--batch-mtp`. - The model was loaded through the Strata host and verified ready before real Codex tasks were run. - Codex used `codex exec` sequentially with read-only sandbox tasks. The model metadata fallback warning and GitHub Copilot MCP authentication warning were non-fatal; benchmark tasks returned code 0. - A Codex context experiment temporarily used 98304 context and a 75000 auto-compact threshold, but this was rolled back to the complete 131072 baseline. - The journal records the full setup, backups, timings and engine observations; no API keys or secrets were included in the shared results. ### Takeaway For this hardware, the largest practical gains came from keeping one active request, preserving/reusing the prompt prefix, avoiding unnecessary context growth, and preventing queue/paging pressure. Raw decode speed alone did not predict the end-to-end Codex task time.
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#475
No description provided.