[GH-ISSUE #2500] Long generation ratchets to !×256 at the default 20,000 spin bound — 2× Arc Pro B60 (xe), 4,331 host-served experts, engine 0.1.44 #1017

Closed
opened 2026-11-04 01:47:45 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @MaineTim on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2500

The server's repeat-stop message points at #606; this is a different failure — the #606 tell is
checked in the signature below.

What happens

On a two-card layer split with 4,331 experts served by the host, long generations collapse into a
single-token repeat: initial lucid output, partial draft-accept throughout, then !×256 at some window, ended
by repeat_stop_tokens. Short requests in the same session are clean. The outcome follows the config,
not the drive or the card state — same box, same boot, same model:

engine config result
--ple-io direct, default 20,000 bound garbage from the first window, 6/6 requests over two days, byte-identical fingerprint; drafts accepted 100% (124/124, 126/126); 21.7–43.5 tok/s
direct, STRATA_SPIN_MAX=200000 clean: 334 + 4,876 tok, 65.9/66.4 % accepted, 15.3/28.3 tok/s
direct, STRATA_SPIN_MAX=40000 clean: 2,705 tok (541 windows), 65.9 %, 24.7 tok/s
direct, STRATA_SPIN_MAX=30000 req 1 clean (637 tok); req 2 lucid to ~5,688 tok, then !×256 (5,944 total; 31.5 tok/s)
--ple-io mmap, default 20,000 bound, short clean: 635 + 483 tok, 65.9/66.4 %, 17.3/26.4 tok/s
--ple-io mmap, 20,000 bound, long (3 requests) req 1 clean (810 tok, 72.2 %); req 2 lucid to ~3,000 tok, then !×256 (3,037 total; 30.8 tok/s; 68.5 %); req 3 ("continue" on the ratcheted conversation) lucid to ~2,660 tok, then !×256 (5,889 total; 34.4 tok/s; 69.9 %)
--ple-io mmap, 20,000 bound, long, second independent run (3 requests) req 1 clean (564 tok, 67.0 %); req 2 lucid to ~6,004 tok, then !×256 (6,260 total; 31.2 tok/s; 69.0 %); req 3 ("continue") lucid to ~1,176 tok, then !×256 (1,432 total; 36.5 tok/s; 73.0 %)

Token positions are exact (server CLI log); window counts are estimates at ~5 tok/window, so: first
ratchet at window 1 (direct 20k), ~608 and ~1,200 (mmap 20k, two independent runs), ~1,138 (direct 30k),
0 over 541 windows (direct 40k).
Single events, so the rates are wide-bracket estimates, not a CDF.

Signature (why this is not #606)

  • Lucid prefix, then a step into the repeat; draft-accept stays partial (68–72 %) up to the ratchet —
    not the 100 %-of-everything collapse.
  • A fresh short prompt answers cleanly before and after — the #606 tell. The q8_1 clamps are in
    0.1.44.
  • The ratchet is per-conversation: continuing a ratcheted conversation ratchets again (req 3 above); a
    fresh conversation starts clean.
  • Drive state exonerated within the measured range: the drive was in its fast state (PLE random 4 KiB
    65,267–66,155 rows/s) in every run, garbage included. The one slow-state observation (13,955 rows/s,
    cold) predates all of them.
  • mmap does not remove the tail: two independent long runs, first ratchet at ~window 608 and ~1,200 vs
    ~1,138 at direct 30k — so it is not only PLE direct-IO drive contention. I have not attributed the
    residual.

Environment

  • 2× Intel Arc Pro B60 24 GB (8086:e211), xe driver, --layer-split 25 (card 0: layers 0–24; card 1:
    25–47 + head). PCIe probes at start: 3.1 GB/s (card 0), 14.0 GB/s (card 1).
  • Ryzen 5 5600XT (AVX2-only — engine line "this CPU has no AVX-512 … run on AVX-2"), 64 GB DDR4.
  • NVMe: WDC WDS100T2B0B (WD Black SN770 1 TB), DRAM-less. Measured: PLE random 4 KiB 13,955 rows/s
    (slow, once, cold) / 65,267–66,155 (fast, every run); expert shard fill 0.45–0.62 GB/s.
  • CachyOS, kernel 7.2.9-1-cachyos. Compute runtime (NEO) 26.35.39758; sycl-ls:
    [level_zero:gpu] Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.17.39758] on both cards;
    oneAPI/SPCL 2026.21.7.0.24_160000. rusticl 26.2.4-arch3.1 present, not selected.
  • Engine 0.1.44 at ed4773eb, SYCL AOT build (bmg-g21), sycl/serve/server_intel.py, one slot.

Engine config (the long run; the baseline differs only in --ple-io direct / the spin bound):

--pack …/pack-ud-iq4_xs --native …/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
--expert-profile …/expert-profile-ud-iq4_xs.bin --expert-cache auto --stream-experts
--ple-io mmap --layer-split 25 --prefill auto --max-context 32768 --vram-reserve-mib 1024
--spec 4 --spec-min-p 0.5 --mtp …/mtp/rt

env: STRATA_VERIFY_DEVICE_PLAN=1 STRATA_VERIFY_NO_HOST=0 STRATA_STAGE_TRIM=1 STRATA_STAGER_THREADS=12 SYCL_CACHE_PERSISTENT=0 ONEAPI_DEVICE_SELECTOR=level_zero:*
(no STRATA_SPIN_MAX in any mmap run)

Load: 8,036 slots / 18.08 GiB on card 0; 4,764 of the missing experts mirrored in 10.63 GiB pinned
host memory; 7,445 of 11,776 profiled pairs on card 1; 4,331 experts served by the host;
1,633 MiB of VRAM free; verify windows captured, no faults before the first request.

All runs under one boot (uptime -s 2026-10-09 19:37:32); dmesg clear and no devcoredump through
the last run.

Prompts (identical first prompt in every run, same thinking setting): "Tell me about the seven seas."
/ "Expand, and be detailed." / "continue".

Not tested

Slow drive state; --ple-io mmap + STRATA_SPIN_MAX=40000; 40k over more than 541 windows; one card.

Notes

  1. The verify path has no per-window "wait ran to its bound" report (contrast ep_check in #1798):
    the first expired window here was silent, and everything above was reconstructed from the output.
    A one-line report, or an env switch to enable one, would make this class self-diagnosing.
  2. For a layout with a large host-served share on xe, is STRATA_SPIN_MAX=40000 a sound permanent
    setting, or should the bound follow the host-served count / mirror size?

Full engine logs and per-request server CLI output for every row of the table are available on request.

All test configs run natively and data collected on host. Data collated and summarized by Qwen 3.8.

Originally created by @MaineTim on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2500 The server's repeat-stop message points at #606; this is a different failure — the #606 tell is checked in the signature below. ## What happens On a two-card layer split with 4,331 experts served by the host, long generations collapse into a single-token repeat: initial lucid output, partial draft-accept throughout, then `!`×256 at some window, ended by `repeat_stop_tokens`. Short requests in the same session are clean. The outcome follows the config, not the drive or the card state — same box, same boot, same model: | engine config | result | |---|---| | `--ple-io direct`, default 20,000 bound | garbage from the first window, **6/6 requests over two days**, byte-identical fingerprint; drafts accepted 100% (124/124, 126/126); 21.7–43.5 tok/s | | direct, `STRATA_SPIN_MAX=200000` | clean: 334 + 4,876 tok, 65.9/66.4 % accepted, 15.3/28.3 tok/s | | direct, `STRATA_SPIN_MAX=40000` | clean: 2,705 tok (541 windows), 65.9 %, 24.7 tok/s | | direct, `STRATA_SPIN_MAX=30000` | req 1 clean (637 tok); req 2 lucid to ~5,688 tok, then `!`×256 (5,944 total; 31.5 tok/s) | | `--ple-io mmap`, default 20,000 bound, short | clean: 635 + 483 tok, 65.9/66.4 %, 17.3/26.4 tok/s | | `--ple-io mmap`, 20,000 bound, long (3 requests) | req 1 clean (810 tok, 72.2 %); req 2 lucid to ~3,000 tok, then `!`×256 (3,037 total; 30.8 tok/s; 68.5 %); req 3 ("continue" on the ratcheted conversation) lucid to ~2,660 tok, then `!`×256 (5,889 total; 34.4 tok/s; 69.9 %) | | `--ple-io mmap`, 20,000 bound, long, second independent run (3 requests) | req 1 clean (564 tok, 67.0 %); req 2 lucid to ~6,004 tok, then `!`×256 (6,260 total; 31.2 tok/s; 69.0 %); req 3 ("continue") lucid to ~1,176 tok, then `!`×256 (1,432 total; 36.5 tok/s; 73.0 %) | Token positions are exact (server CLI log); window counts are estimates at ~5 tok/window, so: first ratchet at window 1 (direct 20k), ~608 and ~1,200 (mmap 20k, two independent runs), ~1,138 (direct 30k), 0 over 541 windows (direct 40k). Single events, so the rates are wide-bracket estimates, not a CDF. ## Signature (why this is not #606) - Lucid prefix, then a step into the repeat; draft-accept stays partial (68–72 %) up to the ratchet — not the 100 %-of-everything collapse. - **A fresh short prompt answers cleanly before and after** — the #606 tell. The q8_1 clamps are in 0.1.44. - The ratchet is per-conversation: continuing a ratcheted conversation ratchets again (req 3 above); a fresh conversation starts clean. - Drive state exonerated within the measured range: the drive was in its fast state (PLE random 4 KiB 65,267–66,155 rows/s) in every run, garbage included. The one slow-state observation (13,955 rows/s, cold) predates all of them. - mmap does not remove the tail: two independent long runs, first ratchet at ~window 608 and ~1,200 vs ~1,138 at direct 30k — so it is not only PLE direct-IO drive contention. I have not attributed the residual. ## Environment - 2× Intel Arc Pro B60 24 GB (8086:e211), xe driver, `--layer-split 25` (card 0: layers 0–24; card 1: 25–47 + head). PCIe probes at start: 3.1 GB/s (card 0), 14.0 GB/s (card 1). - Ryzen 5 5600XT (AVX2-only — engine line "this CPU has no AVX-512 … run on AVX-2"), 64 GB DDR4. - NVMe: WDC WDS100T2B0B (WD Black SN770 1 TB), DRAM-less. Measured: PLE random 4 KiB 13,955 rows/s (slow, once, cold) / 65,267–66,155 (fast, every run); expert shard fill 0.45–0.62 GB/s. - CachyOS, kernel 7.2.9-1-cachyos. Compute runtime (NEO) 26.35.39758; `sycl-ls`: `[level_zero:gpu] Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.17.39758]` on both cards; oneAPI/SPCL 2026.21.7.0.24_160000. rusticl 26.2.4-arch3.1 present, not selected. - Engine **0.1.44 at `ed4773eb`**, SYCL AOT build (`bmg-g21`), `sycl/serve/server_intel.py`, one slot. Engine config (the long run; the baseline differs only in `--ple-io direct` / the spin bound): ``` --pack …/pack-ud-iq4_xs --native …/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf --expert-profile …/expert-profile-ud-iq4_xs.bin --expert-cache auto --stream-experts --ple-io mmap --layer-split 25 --prefill auto --max-context 32768 --vram-reserve-mib 1024 --spec 4 --spec-min-p 0.5 --mtp …/mtp/rt ``` env: `STRATA_VERIFY_DEVICE_PLAN=1 STRATA_VERIFY_NO_HOST=0 STRATA_STAGE_TRIM=1 STRATA_STAGER_THREADS=12 SYCL_CACHE_PERSISTENT=0 ONEAPI_DEVICE_SELECTOR=level_zero:*` (no `STRATA_SPIN_MAX` in any mmap run) Load: 8,036 slots / 18.08 GiB on card 0; 4,764 of the missing experts mirrored in 10.63 GiB pinned host memory; 7,445 of 11,776 profiled pairs on card 1; **4,331 experts served by the host**; 1,633 MiB of VRAM free; verify windows captured, no faults before the first request. All runs under one boot (`uptime -s` 2026-10-09 19:37:32); `dmesg` clear and no devcoredump through the last run. Prompts (identical first prompt in every run, same thinking setting): "Tell me about the seven seas." / "Expand, and be detailed." / "continue". ## Not tested Slow drive state; `--ple-io mmap` + `STRATA_SPIN_MAX=40000`; 40k over more than 541 windows; one card. ## Notes 1. The verify path has no per-window "wait ran to its bound" report (contrast `ep_check` in #1798): the first expired window here was silent, and everything above was reconstructed from the output. A one-line report, or an env switch to enable one, would make this class self-diagnosing. 2. For a layout with a large host-served share on xe, is `STRATA_SPIN_MAX=40000` a sound permanent setting, or should the bound follow the host-served count / mirror size? Full engine logs and per-request server CLI output for every row of the table are available on request. All test configs run natively and data collected on host. Data collated and summarized by Qwen 3.8.
Author
Owner

@MaineTim commented on GitHub (Oct 15, 2026):

Follow-up on note 2 (STRATA_SPIN_MAX for large host-served layouts): I measured mmap + STRATA_SPIN_MAX=40000 on the same box, engine, and layout as the issue — same run protocol (59-token control, then the long-prompt continuation, same thinking setting).

  • control request: 1,702 tokens, clean
  • long request: lucid to 17,513 tokens, then !×256 (17,769 total; 34.7 tok/s; drafts accepted 9,837 of 13,749 = 71.5%) — first ratchet at ≈ window 3,500 (estimate at ~5 tokens/window, as in the issue)

So the 40,000 bound pushes the first ratchet out ~3–5× (the two independent 20,000 runs ratcheted at ~608 and ~1,200 windows; direct 30,000 at ~1,138), but it is not a floor — a single tail event at ~3,500 windows of exposure, consistent with the direct 40,000 run that was clean over 541 windows. Throughput is unaffected: 34.7 tok/s is the fastest long generation measured on this box (30.8/31.2 at mmap 20,000; 24.7 at direct 40,000).

One correction to the issue's "per-conversation" bullet: a "continue" on the ratcheted conversation ran 11,921 tokens clean at 40,000 (≈ 2,400 windows, natural stop, the ! burst sitting in context — the model flagged it in its own thinking). The per-conversation persistence in the 20,000 runs may have been per-window re-sampling at a higher rate rather than persistent state; I don't have enough events to separate the two.

So as measured data for note 2: 40,000 is a large improvement over the default on this layout but still not safe in the absolute sense. I can test 80,000 next if that helps answer whether the bound should follow the host-served count.

<!-- gh-comment-id:6181185209 --> @MaineTim commented on GitHub (Oct 15, 2026): Follow-up on note 2 (`STRATA_SPIN_MAX` for large host-served layouts): I measured mmap + `STRATA_SPIN_MAX=40000` on the same box, engine, and layout as the issue — same run protocol (59-token control, then the long-prompt continuation, same thinking setting). - control request: 1,702 tokens, clean - long request: lucid to 17,513 tokens, then `!`×256 (17,769 total; 34.7 tok/s; drafts accepted 9,837 of 13,749 = 71.5%) — first ratchet at ≈ window 3,500 (estimate at ~5 tokens/window, as in the issue) So the 40,000 bound pushes the first ratchet out ~3–5× (the two independent 20,000 runs ratcheted at ~608 and ~1,200 windows; direct 30,000 at ~1,138), but it is not a floor — a single tail event at ~3,500 windows of exposure, consistent with the direct 40,000 run that was clean over 541 windows. Throughput is unaffected: 34.7 tok/s is the fastest long generation measured on this box (30.8/31.2 at mmap 20,000; 24.7 at direct 40,000). One correction to the issue's "per-conversation" bullet: a "continue" on the ratcheted conversation ran 11,921 tokens clean at 40,000 (≈ 2,400 windows, natural stop, the `!` burst sitting in context — the model flagged it in its own thinking). The per-conversation persistence in the 20,000 runs may have been per-window re-sampling at a higher rate rather than persistent state; I don't have enough events to separate the two. So as measured data for note 2: 40,000 is a large improvement over the default on this layout but still not safe in the absolute sense. I can test 80,000 next if that helps answer whether the bound should follow the host-served count.
Author
Owner

@skipzx-lab commented on GitHub (Oct 15, 2026):

Same failure on a single card, and a way to reproduce it on demand that may help settle note 2.

Setup: 1× Arc Pro B60 24 GB (xe), Xeon W-2155, 30 GB RAM, kernel 7.0, engine 0.1.44.1 (296b59d2), Coder IQ1_M, --resident-experts, STRATA_VERIFY_NO_HOST=0 (the CPU computes the experts the card lacks and the GPU waits for them at every layer), default spin bound. In normal use: five !×256 events in ~12 hours of agent work, at 28K-86K context, after 529-9,487 generated tokens. Short prompts stayed clean. The engine had ~0.7 GB of its memory in swap, so a stall on the CPU side was the suspect.

Repro: freeze the engine's container while it generates, so the CPU half stalls and the GPU's bounded wait runs out:

# 0.2 s freeze every 4 s, 20 times, during one long request
for i in $(seq 20); do sleep 4; docker pause <engine container>; sleep 0.2; docker unpause <engine container>; done

Results (one ~5K-token prompt, 2,000-2,500 token sampled generation each):

STRATA_SPIN_MAX freezes result
1,000 0.2 s !×256 after 276 tokens
500,000 0.2 s 2,500 tokens clean
500,000 1.0 s !×256 after 745 tokens
2,000,000 1.0 s 2,000 tokens clean

The bound needs to outlast the longest CPU stall rather than scale with the host-served count. On this card, 500,000 reads lasts somewhere between 0.2 and 1 s. With no freezes, 2,000,000 decoded at the same speed as 1,000 (3,000 tokens in 94-101 s, 10K prompt). The spin only runs long when the CPU is late. No xe resets or errors in the log at 2,000,000. I did not try freezes of several seconds, since a spin past the driver's job timeout is what the 20,000 default was protecting against. So 2,000,000 trades rare garbage for a small risk of a reset on a very long stall. I'm running with it now.

Notes:

  1. A one-line report when a wait hits its bound (your note 1) would have made this self-diagnosing. The #879 non-finite guard isn't in the SYCL port either, so the only signal is the repeat stop.
  2. For an xe + STRATA_VERIFY_NO_HOST=0 layout, it may be worth setup writing a larger bound, since there every window waits on the CPU by design.
<!-- gh-comment-id:6185137234 --> @skipzx-lab commented on GitHub (Oct 15, 2026): Same failure on a single card, and a way to reproduce it on demand that may help settle note 2. **Setup:** 1× Arc Pro B60 24 GB (xe), Xeon W-2155, 30 GB RAM, kernel 7.0, engine 0.1.44.1 (`296b59d2`), Coder IQ1_M, `--resident-experts`, `STRATA_VERIFY_NO_HOST=0` (the CPU computes the experts the card lacks and the GPU waits for them at every layer), default spin bound. In normal use: five `!`×256 events in ~12 hours of agent work, at 28K-86K context, after 529-9,487 generated tokens. Short prompts stayed clean. The engine had ~0.7 GB of its memory in swap, so a stall on the CPU side was the suspect. **Repro:** freeze the engine's container while it generates, so the CPU half stalls and the GPU's bounded wait runs out: ```bash # 0.2 s freeze every 4 s, 20 times, during one long request for i in $(seq 20); do sleep 4; docker pause <engine container>; sleep 0.2; docker unpause <engine container>; done ``` **Results** (one ~5K-token prompt, 2,000-2,500 token sampled generation each): | `STRATA_SPIN_MAX` | freezes | result | |---|---|---| | 1,000 | 0.2 s | `!`×256 after 276 tokens | | 500,000 | 0.2 s | 2,500 tokens clean | | 500,000 | 1.0 s | `!`×256 after 745 tokens | | 2,000,000 | 1.0 s | 2,000 tokens clean | The bound needs to outlast the longest CPU stall rather than scale with the host-served count. On this card, 500,000 reads lasts somewhere between 0.2 and 1 s. With no freezes, 2,000,000 decoded at the same speed as 1,000 (3,000 tokens in 94-101 s, 10K prompt). The spin only runs long when the CPU is late. No xe resets or errors in the log at 2,000,000. I did not try freezes of several seconds, since a spin past the driver's job timeout is what the 20,000 default was protecting against. So 2,000,000 trades rare garbage for a small risk of a reset on a very long stall. I'm running with it now. Notes: 1. A one-line report when a wait hits its bound (your note 1) would have made this self-diagnosing. The #879 non-finite guard isn't in the SYCL port either, so the only signal is the repeat stop. 2. For an `xe` + `STRATA_VERIFY_NO_HOST=0` layout, it may be worth setup writing a larger bound, since there every window waits on the CPU by design.
Author
Owner

@MaineTim commented on GitHub (Oct 15, 2026):

@skipzx-lab,

Thank you for your reproduction and on-demand trigger technique.

I was unable to force a ratchet by pausing the engine process in a native run on this box (in a multi-gpu configuration). One scope note up front: a native kill -STOP freezes the engine's process only — the Python frontend kept running — whereas docker pause freezes the whole container.

Two data points to add to the conversation:

1. The ladder at 10,000. STRATA_SPIN_MAX=10000 (mmap, otherwise the production config): both requests ratcheted in their thinking phase — the first prompt lucid to 245 then !×256 (20.8 tok/s), and a second request (sharing only the 59-token prompt prefix, no ratcheted content in context) lucid to 249 then !×256 (40.9 tok/s). First ratchet at ≈ window 41–49 (estimate at ~5–6 tokens/window, as before), 2/2. So halving the bound from 20,000 to 10,000 moves the first ratchet from ~608/~1,200 windows to ~41–49 — an order of magnitude shorter tail, not 2×. Per-window expiry: ≈2×10⁻² at 10k, 8.3–1.6×10⁻³ at 20k, ~1.7×10⁻⁴ at 40k (measured). The tail is steep below the ~20k–30k arrival class: 10k is not usable for any real workload on this layout (~80% per 500 tokens).

2. The freeze didn't reproduce here (native process STOP/CONT) — at tested durations up to 30 s. At STRATA_SPIN_MAX=40000 I ran one 32,688-token generation (29.7 tok/s, 1,101 s, decode cache 98.2% — ≈63 host-served lookups per window, so nearly every window waits on the host answer) and froze the engine's process mid-generation with kill -STOP/kill -CONT (the native equivalent of your docker pause) seven times, at 0.05, 0.1, 0.2, 0.5, 1.0, 10 and 30 s — the last two far longer than the bound's spin time (tens of ms by the doorbell code's own round-trip measurement; we never calibrated our own scale). Every freeze: the server visibly stopped, then picked back up cleanly. The same generation had 0 natural ratchets over ≈5,400 windows, consistent with the 40k rate.

Two readings I can't yet separate: (i) the freeze almost never catches the in-flight window waiting on an uncommitted host answer — on this two-card layout the host runs ahead of the waiting stage by design, so the ratchet risk per freeze is a function of where in the window cycle the STOP lands, not of the freeze duration; or (ii) an expired window during a process freeze self-heals — the payload buffer still holds the previous window's complete answer because the host was frozen before committing anything, whereas a natural expiry follows a partially committed recompute. I can run a burst of many short freezes with per-trial records to tell the two apart if that is useful.

A question for your box, since your data is the bound-vs-freeze-duration curve: on your single-card setup, does a long freeze eventually ratchet even at a large bound? I.e. at bound 500,000 (where 0.2 s was clean for you), does a 5 s or 30 s pause ratchet? That would tell us whether the freeze threshold is "spin time vs freeze time" on your layout or something else.

Not tested: the 80,000 bound under freezes; per-second tok/s around each freeze (the 40k server CLI output was not saved — the per-trial freeze.sh durations and wall-time windows are recorded); the driver job-timeout question (long spin past the xe timeout).

As time allows, I'll try to spin up a docker container and reproduce your results there.

<!-- gh-comment-id:6196930111 --> @MaineTim commented on GitHub (Oct 15, 2026): @skipzx-lab, Thank you for your reproduction and on-demand trigger technique. I was unable to force a ratchet by pausing the engine process in a native run on this box (in a multi-gpu configuration). One scope note up front: a native `kill -STOP` freezes the engine's process only — the Python frontend kept running — whereas `docker pause` freezes the whole container. Two data points to add to the conversation: **1. The ladder at 10,000.** `STRATA_SPIN_MAX=10000` (mmap, otherwise the production config): both requests ratcheted in their thinking phase — the first prompt lucid to 245 then `!`×256 (20.8 tok/s), and a second request (sharing only the 59-token prompt prefix, no ratcheted content in context) lucid to 249 then `!`×256 (40.9 tok/s). First ratchet at ≈ window 41–49 (estimate at ~5–6 tokens/window, as before), 2/2. So halving the bound from 20,000 to 10,000 moves the first ratchet from ~608/~1,200 windows to ~41–49 — an order of magnitude shorter tail, not 2×. Per-window expiry: ≈2×10⁻² at 10k, 8.3–1.6×10⁻³ at 20k, ~1.7×10⁻⁴ at 40k (measured). The tail is steep below the ~20k–30k arrival class: 10k is not usable for any real workload on this layout (~80% per 500 tokens). **2. The freeze didn't reproduce here (native process STOP/CONT) — at tested durations up to 30 s.** At `STRATA_SPIN_MAX=40000` I ran one 32,688-token generation (29.7 tok/s, 1,101 s, decode cache 98.2% — ≈63 host-served lookups per window, so nearly every window waits on the host answer) and froze the engine's process mid-generation with `kill -STOP`/`kill -CONT` (the native equivalent of your `docker pause`) seven times, at 0.05, 0.1, 0.2, 0.5, 1.0, 10 and 30 s — the last two far longer than the bound's spin time (tens of ms by the doorbell code's own round-trip measurement; we never calibrated our own scale). Every freeze: the server visibly stopped, then picked back up cleanly. The same generation had 0 natural ratchets over ≈5,400 windows, consistent with the 40k rate. Two readings I can't yet separate: (i) the freeze almost never catches the in-flight window waiting on an *uncommitted* host answer — on this two-card layout the host runs ahead of the waiting stage by design, so the ratchet risk per freeze is a function of where in the window cycle the STOP lands, not of the freeze duration; or (ii) an expired window during a process freeze self-heals — the payload buffer still holds the previous window's complete answer because the host was frozen before committing anything, whereas a natural expiry follows a partially committed recompute. I can run a burst of many short freezes with per-trial records to tell the two apart if that is useful. A question for your box, since your data is the bound-vs-freeze-duration curve: on your single-card setup, does a *long* freeze eventually ratchet even at a large bound? I.e. at bound 500,000 (where 0.2 s was clean for you), does a 5 s or 30 s pause ratchet? That would tell us whether the freeze threshold is "spin time vs freeze time" on your layout or something else. Not tested: the 80,000 bound under freezes; per-second tok/s around each freeze (the 40k server CLI output was not saved — the per-trial `freeze.sh` durations and wall-time windows are recorded); the driver job-timeout question (long spin past the xe timeout). As time allows, I'll try to spin up a docker container and reproduce your results there.
Author
Owner

@skipzx-lab commented on GitHub (Oct 15, 2026):

@MaineTim thanks for the ladder, the 10k → 40k per-window rates are really useful.

On the freeze: our docker pause is the same scope as your kill -STOP. On this box the Python server runs on the host and only the engine is in the container, so the pause froze the engine process alone, with the frontend still running.

On your question, partial data so far: at bound 500,000 a 1.0 s freeze did ratchet (!×256 after 745 tokens, ten 1 s freezes 5 s apart), while 0.2 s freezes (twenty, 4 s apart) stayed clean over 2,500 tokens. So on this single-card layout it looks like "spin time vs freeze time": 500,000 reads runs out somewhere between 0.2 and 1 s here, and a freeze longer than that ratchets. That fits your reading (i) too. With the CPU computing every missing expert (STRATA_VERIFY_NO_HOST=0, one card), nearly every window waits on an answer the host hasn't committed yet, so a freeze almost always lands on a waiting window. Your two-card layout lets the host run ahead.

I'll run 5 s and 30 s freezes at 500,000 later, when the card is free (it's in use right now), and post the results. At 500,000 the spin is under a second, so a long freeze only makes it expire early and can't approach the driver's job timeout. I'll keep long freezes off the 2,000,000 bound, since I don't know how close that spin gets to the timeout.

<!-- gh-comment-id:6203053016 --> @skipzx-lab commented on GitHub (Oct 15, 2026): @MaineTim thanks for the ladder, the 10k → 40k per-window rates are really useful. On the freeze: our `docker pause` is the same scope as your `kill -STOP`. On this box the Python server runs on the host and only the engine is in the container, so the pause froze the engine process alone, with the frontend still running. On your question, partial data so far: at bound 500,000 a **1.0 s** freeze did ratchet (`!`×256 after 745 tokens, ten 1 s freezes 5 s apart), while 0.2 s freezes (twenty, 4 s apart) stayed clean over 2,500 tokens. So on this single-card layout it looks like "spin time vs freeze time": 500,000 reads runs out somewhere between 0.2 and 1 s here, and a freeze longer than that ratchets. That fits your reading (i) too. With the CPU computing every missing expert (`STRATA_VERIFY_NO_HOST=0`, one card), nearly every window waits on an answer the host hasn't committed yet, so a freeze almost always lands on a waiting window. Your two-card layout lets the host run ahead. I'll run 5 s and 30 s freezes at 500,000 later, when the card is free (it's in use right now), and post the results. At 500,000 the spin is under a second, so a long freeze only makes it expire early and can't approach the driver's job timeout. I'll keep long freezes off the 2,000,000 bound, since I don't know how close that spin gets to the timeout.
Author
Owner

@MaineTim commented on GitHub (Oct 17, 2026):

@skipzx-lab,

I finally got a chance to run the container attempt and a scripted per-trial freeze test, and the freeze does ratchet on my native box — the 0/7 in my last comment was under-exposure, not a different result. Your scope point is confirmed: an isolation probe shows the trigger is the engine process alone, which is exactly what your pause was freezing. Results summarized by Qwen 3.8:

1. Scope: the engine process, not the container or the frontend. Each scope was frozen separately, one variable at a time, 15 timed trials per arm (0.25/0.5 s freezes, every action wall-stamped):

  • engine process only (kill -STOP): ratchets — in the container (2 near-trial ratchets in 34 freezes) and natively (4, below)
  • python frontend only (server process frozen, engine running): clean — 15 trials plus a full 32,000-token generation, zero ratchets

So docker pause reproduces because it contains the engine freeze; the whole-container scope was never the discriminator, which matches your setup (server on the host, engine alone in the container). The probe container was a host snapshot, not portable; the native numbers are the clean ones. Privilege-free repro, no docker needed: kill -STOP <engine>, 0.25–0.5 s, kill -CONT.

2. Native confirmation — the step lands on the first window after resume. Four native ratchets at the 40,000 bound, each adjudicated from the raw stream (the garbage detector's flag time lags by ≥64 run tokens ≈ 2 s, so the step position is read from the run head, not the flag):

  • Oct 16 22:23 and Oct 17 06:27 / 06:32 (three clean events): the last lucid token sits at the freeze boundary, and the post-resume stream is ! from the first token (run head ~100–150 ms after SIGCONT in the container events, ~2–3 tokens past the boundary in the native ones)
  • Oct 16 22:26: run head at the first-window-after-resume center estimate, with ±~10 windows of record uncertainty — corroborating, less clean

Per-freeze rate: 2/34 in the container (≈6 %, CI ~1–15 %), 4/40 native (≈10 %; includes seven earlier 0.05–30 s freezes), pooled ≈8 % per 0.25–0.5 s freeze at the 40,000 bound on my layout. Single freezes frequently do nothing — the probability is per window caught, not per freeze. The chance alternative (a natural ratchet landing on a trial) is ~10⁻³–10⁻⁵ per pair of runs at the observed natural rate; four independent events make it negligible.

3. Reconciliation with your bound-vs-freeze-duration curve. A hypothesis that fits both boxes' data: a freeze ratchets only if the GPU is spinning in the in-flight window's doorbell wait, the host answer is still uncommitted, and the wait's remaining spin budget is shorter than the freeze — the GPU keeps burning budget while the host is stopped. Your 500,000 bound's spin time (0.2–1 s) sits exactly inside your 0.2 s/1.0 s pair, and 2,000,000's exceeds a 1 s freeze, so it stayed clean. On my box the 40,000 budget is tens of ms, so a 0.25–0.5 s freeze always outlasts it; the per-freeze risk reduces to the fraction of windows caught mid-wait with an uncommitted answer — small at my two-card layout (~8 %) and larger on your single-card one, where nearly every window waits on the host. What sets that fraction here (landing phase in the window cycle, or which card's in-flight window) is still open.

4. A ratcheted engine poisons the next conversation even for a fresh request. A new prompt (no history) on a ratcheted engine ratcheted at token 0; every fresh engine started clean. The reset is restarting the engine process, not starting a fresh conversation.

5. The natural rate is not stationary on my box. Hours after clean 32,000-token runs, first natural ratchets began landing at 443–6,300 tokens (the calibrated 40k rate puts the first ratchet at ~17,500). Same box, config, and boot. Unattributed; if you see anything similar on yours, it would be useful to know.

Still measuring: the 80,000 bound at real workload lengths (long pi coding sessions; note 2's question is P(ratchet per response), and at 40,000 my measured risk is ~29 % per 10,000-token response, which is not an operating point), and the driver job-timeout question (long freezes at 80,000, xe-reset risk — last, alone). If your 5 s / 30 s at 500,000 have run, the results would pin the long end of the curve.

<!-- gh-comment-id:6233303937 --> @MaineTim commented on GitHub (Oct 17, 2026): @skipzx-lab, I finally got a chance to run the container attempt and a scripted per-trial freeze test, and the freeze **does** ratchet on my native box — the 0/7 in my last comment was under-exposure, not a different result. Your scope point is confirmed: an isolation probe shows the trigger is the engine process alone, which is exactly what your pause was freezing. Results summarized by Qwen 3.8: **1. Scope: the engine process, not the container or the frontend.** Each scope was frozen separately, one variable at a time, 15 timed trials per arm (0.25/0.5 s freezes, every action wall-stamped): - engine process only (`kill -STOP`): ratchets — in the container (2 near-trial ratchets in 34 freezes) and natively (4, below) - python frontend only (server process frozen, engine running): clean — 15 trials plus a full 32,000-token generation, zero ratchets So `docker pause` reproduces because it contains the engine freeze; the whole-container scope was never the discriminator, which matches your setup (server on the host, engine alone in the container). The probe container was a host snapshot, not portable; the native numbers are the clean ones. Privilege-free repro, no docker needed: `kill -STOP <engine>`, 0.25–0.5 s, `kill -CONT`. **2. Native confirmation — the step lands on the first window after resume.** Four native ratchets at the 40,000 bound, each adjudicated from the raw stream (the garbage detector's flag time lags by ≥64 run tokens ≈ 2 s, so the step position is read from the run head, not the flag): - Oct 16 22:23 and Oct 17 06:27 / 06:32 (three clean events): the last lucid token sits at the freeze boundary, and the post-resume stream is `!` from the first token (run head ~100–150 ms after SIGCONT in the container events, ~2–3 tokens past the boundary in the native ones) - Oct 16 22:26: run head at the first-window-after-resume center estimate, with ±~10 windows of record uncertainty — corroborating, less clean Per-freeze rate: 2/34 in the container (≈6 %, CI ~1–15 %), 4/40 native (≈10 %; includes seven earlier 0.05–30 s freezes), pooled ≈8 % per 0.25–0.5 s freeze at the 40,000 bound on my layout. Single freezes frequently do nothing — the probability is per window caught, not per freeze. The chance alternative (a natural ratchet landing on a trial) is ~10⁻³–10⁻⁵ per pair of runs at the observed natural rate; four independent events make it negligible. **3. Reconciliation with your bound-vs-freeze-duration curve.** A hypothesis that fits both boxes' data: a freeze ratchets only if the GPU is spinning in the in-flight window's doorbell wait, the host answer is still uncommitted, and the wait's *remaining* spin budget is shorter than the freeze — the GPU keeps burning budget while the host is stopped. Your 500,000 bound's spin time (0.2–1 s) sits exactly inside your 0.2 s/1.0 s pair, and 2,000,000's exceeds a 1 s freeze, so it stayed clean. On my box the 40,000 budget is tens of ms, so a 0.25–0.5 s freeze always outlasts it; the per-freeze risk reduces to the fraction of windows caught mid-wait with an uncommitted answer — small at my two-card layout (~8 %) and larger on your single-card one, where nearly every window waits on the host. What sets that fraction here (landing phase in the window cycle, or which card's in-flight window) is still open. **4. A ratcheted engine poisons the next conversation even for a fresh request.** A new prompt (no history) on a ratcheted engine ratcheted at token 0; every fresh *engine* started clean. The reset is restarting the engine process, not starting a fresh conversation. **5. The natural rate is not stationary on my box.** Hours after clean 32,000-token runs, first natural ratchets began landing at 443–6,300 tokens (the calibrated 40k rate puts the first ratchet at ~17,500). Same box, config, and boot. Unattributed; if you see anything similar on yours, it would be useful to know. Still measuring: the 80,000 bound at real workload lengths (long pi coding sessions; note 2's question is P(ratchet per response), and at 40,000 my measured risk is ~29 % per 10,000-token response, which is not an operating point), and the driver job-timeout question (long freezes at 80,000, xe-reset risk — last, alone). If your 5 s / 30 s at 500,000 have run, the results would pin the long end of the curve.
Author
Owner

@skipzx-lab commented on GitHub (Oct 17, 2026):

@MaineTim here are the long-freeze results at the 500,000 bound (same single-card box and setup as before, docker pause of the engine-only container, one ~5K-token prompt, sampled generation):

freezes result
4 × 5 s, 8 s apart 2,000 tokens clean
3 × 30 s, 8 s apart !×256 after 530 tokens
12 × 5 s, 6 s apart !×256 after 647 tokens

Together with the earlier rows (0.2 s: 20 freezes clean; 1 s: ratchet after 745 tokens), this fits your model. Once a freeze is longer than the spin budget (500,000 reads runs out somewhere between 0.2 and 1 s here), the duration stops mattering. What matters is whether a freeze catches a window mid-wait, which is why four 5 s freezes could pass and twelve did not. No xe resets or engine errors in any run, including the 30 s freezes: the spin expires and the window goes on, as you saw at 40,000.

On your point 4, a different result here: after each ratchet I sent a fresh short prompt (no history) to the same engine, without a restart, and all three answered cleanly ("Red, yellow, blue"). So on this box a ratcheted engine did not poison the next new conversation. The difference may be the layout (single card, --resident-experts, STRATA_VERIFY_NO_HOST=0) or the prompt cache: a fresh prompt here shares no prefix with the ratcheted one.

On your point 5: at 2,000,000 in real use (agentic coding, mostly 10K-80K contexts): about 1,380 requests over roughly 21 hours of engine time across two engine starts, zero ratchets. Before the change it was 5 in about 12 hours. Nothing that looks like a rising rate so far, though our runs are shorter between restarts than yours.

<!-- gh-comment-id:6233404867 --> @skipzx-lab commented on GitHub (Oct 17, 2026): @MaineTim here are the long-freeze results at the 500,000 bound (same single-card box and setup as before, `docker pause` of the engine-only container, one ~5K-token prompt, sampled generation): | freezes | result | |---|---| | 4 × 5 s, 8 s apart | 2,000 tokens clean | | 3 × 30 s, 8 s apart | `!`×256 after 530 tokens | | 12 × 5 s, 6 s apart | `!`×256 after 647 tokens | Together with the earlier rows (0.2 s: 20 freezes clean; 1 s: ratchet after 745 tokens), this fits your model. Once a freeze is longer than the spin budget (500,000 reads runs out somewhere between 0.2 and 1 s here), the duration stops mattering. What matters is whether a freeze catches a window mid-wait, which is why four 5 s freezes could pass and twelve did not. No xe resets or engine errors in any run, including the 30 s freezes: the spin expires and the window goes on, as you saw at 40,000. **On your point 4, a different result here:** after each ratchet I sent a fresh short prompt (no history) to the same engine, without a restart, and all three answered cleanly ("Red, yellow, blue"). So on this box a ratcheted engine did not poison the next new conversation. The difference may be the layout (single card, `--resident-experts`, `STRATA_VERIFY_NO_HOST=0`) or the prompt cache: a fresh prompt here shares no prefix with the ratcheted one. **On your point 5:** at 2,000,000 in real use (agentic coding, mostly 10K-80K contexts): about 1,380 requests over roughly 21 hours of engine time across two engine starts, zero ratchets. Before the change it was 5 in about 12 hours. Nothing that looks like a rising rate so far, though our runs are shorter between restarts than yours.
Author
Owner

@MaineTim commented on GitHub (Oct 17, 2026):

@skipzx-lab, Thanks for the long freeze results. That closes the curve the way the model predicted. I'll do some more testing here to see if I can pin the poison conversation as you suggest (cache prompt or layout).

<!-- gh-comment-id:6233689127 --> @MaineTim commented on GitHub (Oct 17, 2026): @skipzx-lab, Thanks for the long freeze results. That closes the curve the way the model predicted. I'll do some more testing here to see if I can pin the poison conversation as you suggest (cache prompt or layout).
Author
Owner

@MaineTim commented on GitHub (Oct 17, 2026):

@skipzx-lab,

The poison question is tested, and I need to retract point 4: the poison does not reproduce under a clean test. Ratchet history shows no measurable effect on later requests, and the "restart the engine" rule stands as a precaution, not a demonstrated mechanism. Your prompt-cache suggestion pointed at the right machinery to test. The token-0 event in point 4 remains (never reproduced in the more than 30 runs since), cause unknown.

1. The prefix test, as run. The engine was ratcheted during a standard freeze procedure, then, without a restart, sent (a) a fresh prompt sharing the ratcheted conversation's prefix, and (b) a prefix-free fresh prompt. The serve line confirmed the shared-prefix request resumed from the ratcheted run's own prompt checkpoint — prompt 71 = 66 reused + 5 read, the exact class both original events showed — and the prefix-free request read 0 reused, so the factor was isolated the way you suggested.

2. Under freezes, both classes behaved identically. Shared-prefix requests ratcheted 3 of 4 (884 / 534 / 5,597 tokens); prefix-free ratcheted 2 of 2 (5,774 / 945) — no discriminating pattern between the classes, and the ratchet placement does not follow the freeze count either: all three runs with 1–2 freezes ratcheted early, while the 13–15-freeze runs went clean or ratcheted only at ~5,600 tokens. The ≈8 %-per-freeze baseline alone does not predict that placement, and the hot natural rate is an equally available explanation — which is exactly what the no-freeze series below isolates. And the case that kills the deterministic form: a shared-prefix request resuming from the ratcheted run's checkpoint ran 31,982 tokens and 15 freezes clean. The cached prefix is not demonstrated as the carrier.

3. Without freezes, there is no visible effect at all. A 15-run series on one engine: every clean token (≈276k) was generated on an engine with one to four prior ratchets, and zero of them ratcheted. The hardest configuration — the same prompt as the just-ratcheted run, sent ~27s later, resuming from that run's checkpoint — was clean at 31,982 tokens. In the same series, a fresh engine's first-ever request ratcheted naturally at 1,702 tokens (empty cache, no ratchet anywhere in that lifetime), and the three natural ratchets landed at 1,702 / 2,748 / 4,390 tokens — the same band as the hot patches in my previous comment. No run ratcheted near its start (closest: 1,685 tokens).

4. The non-stationary natural rate remains the open item. The hot patches (first natural ratchets at 443–6,300 tokens against the calibrated ~17,500) now also hit fresh engines, and they move on a minutes-to-hours timescale — a hot 1,702-toker and clean 32k runs minutes apart in the same session. Your 0/~1,380 at 2,000,000 suggests the bound dominates on your layout; mine looks like a property of the box's state at a moment in time rather than of the engine. If you ever see a hot patch on your box — early ratchets on a fresh engine, no freezes — that would be useful to know.

<!-- gh-comment-id:6243434740 --> @MaineTim commented on GitHub (Oct 17, 2026): @skipzx-lab, The poison question is tested, and I need to retract point 4: **the poison does not reproduce under a clean test. Ratchet history shows no measurable effect on later requests, and the "restart the engine" rule stands as a precaution, not a demonstrated mechanism.** Your prompt-cache suggestion pointed at the right machinery to test. The token-0 event in point 4 remains (never reproduced in the more than 30 runs since), cause unknown. **1. The prefix test, as run.** The engine was ratcheted during a standard freeze procedure, then, without a restart, sent (a) a fresh prompt sharing the ratcheted conversation's prefix, and (b) a prefix-free fresh prompt. The serve line confirmed the shared-prefix request resumed from the ratcheted run's own prompt checkpoint — `prompt 71 = 66 reused + 5 read`, the exact class both original events showed — and the prefix-free request read `0 reused`, so the factor was isolated the way you suggested. **2. Under freezes, both classes behaved identically.** Shared-prefix requests ratcheted 3 of 4 (884 / 534 / 5,597 tokens); prefix-free ratcheted 2 of 2 (5,774 / 945) — no discriminating pattern between the classes, and the ratchet placement does not follow the freeze count either: all three runs with 1–2 freezes ratcheted early, while the 13–15-freeze runs went clean or ratcheted only at ~5,600 tokens. The ≈8 %-per-freeze baseline alone does not predict that placement, and the hot natural rate is an equally available explanation — which is exactly what the no-freeze series below isolates. And the case that kills the deterministic form: a shared-prefix request resuming from the ratcheted run's checkpoint ran **31,982 tokens and 15 freezes clean**. The cached prefix is not demonstrated as the carrier. **3. Without freezes, there is no visible effect at all.** A 15-run series on one engine: every clean token (≈276k) was generated on an engine with one to four prior ratchets, and zero of them ratcheted. The hardest configuration — the same prompt as the just-ratcheted run, sent ~27s later, resuming from that run's checkpoint — was clean at 31,982 tokens. In the same series, a **fresh** engine's first-ever request ratcheted naturally at 1,702 tokens (empty cache, no ratchet anywhere in that lifetime), and the three natural ratchets landed at 1,702 / 2,748 / 4,390 tokens — the same band as the hot patches in my previous comment. No run ratcheted near its start (closest: 1,685 tokens). **4. The non-stationary natural rate remains the open item.** The hot patches (first natural ratchets at 443–6,300 tokens against the calibrated ~17,500) now also hit fresh engines, and they move on a minutes-to-hours timescale — a hot 1,702-toker and clean 32k runs minutes apart in the same session. Your 0/~1,380 at 2,000,000 suggests the bound dominates on your layout; mine looks like a property of the box's state at a moment in time rather than of the engine. If you ever see a hot patch on your box — early ratchets on a *fresh* engine, no freezes — that would be useful to know.
Author
Owner

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

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271092531 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1017
No description provided.