serve: make Phase 2a (device-resident decode) & live prefix caching durable in NixOS module #52

Closed
opened 2026-09-23 15:38:13 +02:00 by multica-agent · 12 comments
Member

Goal

Harden the validated Option A (Phase 2a Device-Resident Decode Chain) and Option B (Prefix Caching) configuration into modules/tenstorrent-serving.nix and nixos-llm so that production deployments survive system reboots durably.

Context

  • PR #44 validated Option A (QWEN36_DEVICE_RESIDENT=1) and Option B (--enable-prefix-caching --mamba-cache-mode align):
    • B=1 decode step time dropped from 50.47 ms down to 48.51 ms mean (20.61 tok/s, first time below 50 ms).
    • Conc-8 batch makespan dropped from 302 s to 37.69 s (-87.5%).
    • Conc-8 TTFT p95 dropped from 276 s to 13.89 s (-95.0%).
    • All correctness gates passed: Stage 2 smoke (5/5 PASS) and Stage 3 extended correctness (11/11 PASS).
  • Currently, production serving on cfx-llm2 requires runtime container options or manual overrides; it needs to be baked into the NixOS module.

Acceptance

  • Add services.tenstorrent-serving.deviceResident option to modules/tenstorrent-serving.nix.
  • Enable services.tenstorrent-serving.enablePrefixCaching and deviceResident in host configuration.
  • Ensure --no-async-scheduling is automatically passed when prefix caching is active.
  • Verify nixos-rebuild switch starts tenstorrent-serving with all self-identifying banners active.
## Goal Harden the validated Option A (Phase 2a Device-Resident Decode Chain) and Option B (Prefix Caching) configuration into `modules/tenstorrent-serving.nix` and `nixos-llm` so that production deployments survive system reboots durably. ## Context - PR #44 validated Option A (`QWEN36_DEVICE_RESIDENT=1`) and Option B (`--enable-prefix-caching --mamba-cache-mode align`): - B=1 decode step time dropped from 50.47 ms down to **48.51 ms mean** (20.61 tok/s, first time below 50 ms). - Conc-8 batch makespan dropped from 302 s to **37.69 s (-87.5%)**. - Conc-8 TTFT p95 dropped from 276 s to **13.89 s (-95.0%)**. - All correctness gates passed: Stage 2 smoke (5/5 PASS) and Stage 3 extended correctness (11/11 PASS). - Currently, production serving on `cfx-llm2` requires runtime container options or manual overrides; it needs to be baked into the NixOS module. ## Acceptance - [ ] Add `services.tenstorrent-serving.deviceResident` option to `modules/tenstorrent-serving.nix`. - [ ] Enable `services.tenstorrent-serving.enablePrefixCaching` and `deviceResident` in host configuration. - [ ] Ensure `--no-async-scheduling` is automatically passed when prefix caching is active. - [ ] Verify `nixos-rebuild switch` starts `tenstorrent-serving` with all self-identifying banners active.
Owner

Performance advisory (automated review, 2026-09-24)

Before this becomes the durable default, four corrections and one missing measurement.

  1. Do not cite "B=1 48.51 ms" as the rationale. bench/runs/decode-phase2a-resident-20260922.jsonl used a 26-token prompt, and its text is degenerate ("HT#3333…", sha not the baseline). #53's review already invalidated it. The valid B=1 control is 48.619 ms without resident decode (p150-decode-40-control-20260923T1652Z.jsonl). There is currently no valid measurement of resident decode's performance effect.
  2. Resident decode's mechanism is disabled whenever prefix caching is on. Its value is the async-decode capability (supports_async_decode: _RESIDENT). Prefix caching refuses async scheduling: qwen36_vllm.py:242, "prefix sidecars require synchronous local execution", which is also why this issue wants --no-async-scheduling. Under prefix caching you therefore get resident decode's cost and correctness surface with at most its sync-mode benefit. Missing measurement: one interleaved A/B of deviceResident on vs off, both arms with prefix caching on, at conc-8, with a realistic prompt and sha/banner checks. If the delta is inside the ~0.5% noise band, ship prefix caching without resident decode.
  3. deviceResident forces the configuration that has a known concurrency defect. The module asserts deviceResident -> deviceArgmax (modules/tenstorrent-serving.nix:544). Argmax+prefix failed 1 of 32 concurrent requests (prefix-argmax-correctness-fail-20260919T0100Z.jsonl). The one stage-3 pass in phase2a-prefix-e2e.jsonl (32 requests) has a ~78% chance of passing even at the observed ~1/128 rate. The argmax-off prefix arm is bounded at <1.17% by 256 requests (prefix-intermittent-bound-20260919T0230Z.jsonl). Match that bound (≥8×32 requests) on this exact configuration before making it durable.
  4. The makespan claim needs its caveat. −87.5% at conc-8 is a warm, 98.3%-cached burst. Cold prefill on the prefix arm is slower (−35% at 8.4k, n=1). See #48 for the full caveat list and the owner's cache-speed-16k-32k.sh test.

Housekeeping:

  • The first acceptance box looks done already. deviceResident / enablePrefixCaching options exist (modules/tenstorrent-serving.nix:420,461, from f092aa3), along with banner checks. What remains is enabling them in nixos-llm plus the tests above.
  • Make sdpaStreaming and the merge guard (QWEN36_MERGE_BATCH_GUARD=1, #45, proven free) durable in the same host change. That closes the /run-only class from #49 in one reboot-tested deploy.
  • Traps: check MemAvailable ≥ ~4 GB before the verification boot, and use docker stop -t 60 (never rm -f).
**Performance advisory (automated review, 2026-09-24)** Before this becomes the durable default, four corrections and one missing measurement. 1. **Do not cite "B=1 48.51 ms" as the rationale.** `bench/runs/decode-phase2a-resident-20260922.jsonl` used a 26-token prompt, and its text is degenerate (`"HT#3333…"`, sha not the baseline). #53's review already invalidated it. The valid B=1 control is 48.619 ms *without* resident decode (`p150-decode-40-control-20260923T1652Z.jsonl`). **There is currently no valid measurement of resident decode's performance effect.** 2. **Resident decode's mechanism is disabled whenever prefix caching is on.** Its value is the async-decode capability (`supports_async_decode: _RESIDENT`). Prefix caching refuses async scheduling: `qwen36_vllm.py:242`, *"prefix sidecars require synchronous local execution"*, which is also why this issue wants `--no-async-scheduling`. Under prefix caching you therefore get resident decode's cost and correctness surface with at most its sync-mode benefit. **Missing measurement:** one interleaved A/B of `deviceResident` on vs off, both arms with prefix caching on, at conc-8, with a realistic prompt and sha/banner checks. If the delta is inside the ~0.5% noise band, ship prefix caching without resident decode. 3. **`deviceResident` forces the configuration that has a known concurrency defect.** The module asserts `deviceResident -> deviceArgmax` (`modules/tenstorrent-serving.nix:544`). Argmax+prefix failed 1 of 32 concurrent requests (`prefix-argmax-correctness-fail-20260919T0100Z.jsonl`). The one stage-3 pass in `phase2a-prefix-e2e.jsonl` (32 requests) has a ~78% chance of passing even at the observed ~1/128 rate. The argmax-off prefix arm is bounded at <1.17% by 256 requests (`prefix-intermittent-bound-20260919T0230Z.jsonl`). Match that bound (≥8×32 requests) on this exact configuration before making it durable. 4. **The makespan claim needs its caveat.** −87.5% at conc-8 is a warm, 98.3%-cached burst. Cold prefill on the prefix arm is *slower* (−35% at 8.4k, n=1). See #48 for the full caveat list and the owner's `cache-speed-16k-32k.sh` test. **Housekeeping:** - The first acceptance box looks done already. `deviceResident` / `enablePrefixCaching` options exist (`modules/tenstorrent-serving.nix:420,461`, from `f092aa3`), along with banner checks. What remains is enabling them in nixos-llm plus the tests above. - Make `sdpaStreaming` and the merge guard (`QWEN36_MERGE_BATCH_GUARD=1`, #45, proven free) durable in the same host change. That closes the `/run`-only class from #49 in one reboot-tested deploy. - Traps: check `MemAvailable` ≥ ~4 GB before the verification boot, and use `docker stop -t 60` (never `rm -f`).
Owner

Measured result on QWEN36_DEVICE_RESIDENT (phase 2a), plus a correctness caveat that matters for durability work.

Speed, on the bfp4 G2 arm (TP=2, B=8, 4k in / 1k out, prefix caching off):

control (2 reps) +DEVICE_RESIDENT Δ
makespan 68.028 s 61.210 s −10.02%
TG ms/token 50.743 44.551 −12.2%
TG p99 64.23 47.82 −25.6%
aggregate tok/s 154.46 179.05 +15.9%
whole-batch stalls 1 0 —
TTFT p50 6.470 s 8.506 s +31%

Control band 67.375–68.681 s; the arm sits 6.2 s below its lower edge, 4.7× the band spread. Attribution is clean — it was bundled with QWEN36_LM_HEAD_IN0_BLOCK_W=4, which is inert (67.875 s, inside the band), interaction −0.145 s.

But the correctness gate is inconclusive, and I would not ship on it. bench/ab/resident-equiv.sh at B=8: R2 compared clean, R3 did not:

R3 FAULT-INJECTION B=8 PASSED: the schedule did NOT create a stale chain;
this test cannot see the hazard at B=8

R3 is resident decode with QWEN36_RESIDENT_IGNORE_RELOAD=1 and should diverge. It didn't, so the join+condense schedule never produced a stale chain and R2's pass is uninformative — the driver's own header states that rule.

Cheapest fixes: include B=4 (I restricted SEQS to 8; the default is "4 8"), harshen TOKENS_LIST so more rows retire mid-stream, and port the driver onto ttx + the bfp4 arm — the run above used the legacy FP8 goal1 profile, because vllm-tt-serve.sh is now a shim over ttx serve-legacy and MODEL_DIR no longer retargets it.

Operational warning for anyone running the legacy gates: that profile cold-rebuilt the 28 GB FP8 P300 tensor cache and took /var/lib/models to 99% full (5.9 GB free) on a shared volume. The legacy path bypasses ttx's disk guard.

Records: bench/runs/perf-loop-c13-attribution-20260926T1050Z.jsonl, bench/runs/perf-loop-c14-resident-equiv-inconclusive-20260926T1053Z.jsonl. PR #90.

Measured result on `QWEN36_DEVICE_RESIDENT` (phase 2a), plus a correctness caveat that matters for durability work. **Speed, on the bfp4 G2 arm (TP=2, B=8, 4k in / 1k out, prefix caching off):** | | control (2 reps) | +DEVICE_RESIDENT | Δ | |---|---:|---:|---:| | makespan | 68.028 s | **61.210 s** | **−10.02%** | | TG ms/token | 50.743 | 44.551 | −12.2% | | TG p99 | 64.23 | 47.82 | −25.6% | | aggregate tok/s | 154.46 | 179.05 | +15.9% | | whole-batch stalls | 1 | 0 | — | | TTFT p50 | 6.470 s | 8.506 s | **+31%** | Control band 67.375–68.681 s; the arm sits 6.2 s below its lower edge, 4.7× the band spread. Attribution is clean — it was bundled with `QWEN36_LM_HEAD_IN0_BLOCK_W=4`, which is **inert** (67.875 s, inside the band), interaction −0.145 s. **But the correctness gate is inconclusive, and I would not ship on it.** `bench/ab/resident-equiv.sh` at B=8: R2 compared clean, R3 did not: ``` R3 FAULT-INJECTION B=8 PASSED: the schedule did NOT create a stale chain; this test cannot see the hazard at B=8 ``` R3 is resident decode with `QWEN36_RESIDENT_IGNORE_RELOAD=1` and should diverge. It didn't, so the join+condense schedule never produced a stale chain and R2's pass is uninformative — the driver's own header states that rule. Cheapest fixes: include B=4 (I restricted `SEQS` to 8; the default is `"4 8"`), harshen `TOKENS_LIST` so more rows retire mid-stream, and port the driver onto ttx + the bfp4 arm — the run above used the legacy **FP8** `goal1` profile, because `vllm-tt-serve.sh` is now a shim over `ttx serve-legacy` and `MODEL_DIR` no longer retargets it. **Operational warning for anyone running the legacy gates:** that profile cold-rebuilt the 28 GB FP8 P300 tensor cache and took `/var/lib/models` to 99% full (5.9 GB free) on a shared volume. The legacy path bypasses ttx's disk guard. Records: `bench/runs/perf-loop-c13-attribution-20260926T1050Z.jsonl`, `bench/runs/perf-loop-c14-resident-equiv-inconclusive-20260926T1053Z.jsonl`. PR #90.
Owner

Device-resident decode: correctness gate now discriminates, and the lever passes it.

The previous gate could not have caught anything. R3 (fault-injected, MUST FAIL) passed at B=4 and B=8 under every schedule we tried because the injection was vacuous, not because the schedule was gentle:

reload_inputs is an OR computed at generator.py:1826. The old fault, in qwen36_vllm.py:639, popped kwargs["reload_inputs"] — which line 1840 uses only to add True — and forced reset_batch=False, a disjunct dominated by mode_switched, which fires on the same prefill→decode transitions. Both suppressed terms were covered by surviving disjuncts. The c14/c15 R3 passes are withdrawn in both directions: they showed neither safety nor a defect.

Rebuilt: QWEN36_RESIDENT_FORCE_NO_RELOAD overrides the OR's result and logs a running count of genuine reloads suppressed, so suppressed=0 reads INCONCLUSIVE rather than as a pass. New arm bench/arms/prod-g2-L2only-fault.toml also moves the gate off the legacy FP8 goal1 profile onto the bfp4 G2 arm the win was actually measured on.

Results (TP=2, bfp4 G2, bf8 KV, prefix caching off, B=8 concurrent, greedy, vllm-tt:k2 6105bb72fb54):

rung arm resident identical vs R2
R1 reference prod-g2 off (0 banners) —
R2 lever prod-g2-L2only on 8/8 vs R1
R3 fault prod-g2-L2only-fault on + FORCE_NO_RELOAD 0/8, 136 reloads suppressed, output degenerates to pure newlines

This is the first run in which the MUST-FAIL rung has ever failed, so it is the first informative pass.

Verdict: the −10.02% makespan win is correctness-cleared AT THIS SCOPE. Scope covered: TP=2, bfp4 G2, B=8, greedy/device-sampling, 40–120 token outputs, batch composition mutating during the run. Not covered: long outputs (≥1k), long context (32k+), GSM8K, retrieval, B=4, TP=1. This repo's workload is long-context agents, so this clearance does not license making it the default yet — the long ladder has to run first.

Caveat worth stating: the fault output is degenerate rather than subtly wrong, so the gate is demonstrated sensitive to a gross chain break; sensitivity to a subtle one is not established.

Records: bench/runs/perf-loop-c16-r3-vacuous-static-proof-20260926T1210Z.jsonl, bench/runs/perf-loop-c17-resident-gate-passes-20260926T1215Z.jsonl, perf-loop-c17-resident-gate-R{1,2,3}-*.json. Branch perf-loop-c1, PR #90.

**Device-resident decode: correctness gate now discriminates, and the lever passes it.** The previous gate could not have caught anything. R3 (fault-injected, MUST FAIL) passed at B=4 and B=8 under every schedule we tried because the injection was vacuous, not because the schedule was gentle: `reload_inputs` is an OR computed at `generator.py:1826`. The old fault, in `qwen36_vllm.py:639`, popped `kwargs["reload_inputs"]` — which line 1840 uses only to *add* True — and forced `reset_batch=False`, a disjunct dominated by `mode_switched`, which fires on the same prefill→decode transitions. Both suppressed terms were covered by surviving disjuncts. **The c14/c15 R3 passes are withdrawn in both directions: they showed neither safety nor a defect.** Rebuilt: `QWEN36_RESIDENT_FORCE_NO_RELOAD` overrides the OR's *result* and logs a running count of genuine reloads suppressed, so `suppressed=0` reads INCONCLUSIVE rather than as a pass. New arm `bench/arms/prod-g2-L2only-fault.toml` also moves the gate off the legacy FP8 `goal1` profile onto the bfp4 G2 arm the win was actually measured on. Results (TP=2, bfp4 G2, bf8 KV, prefix caching off, B=8 concurrent, greedy, `vllm-tt:k2 6105bb72fb54`): | rung | arm | resident | identical vs R2 | | --- | --- | --- | --- | | R1 reference | `prod-g2` | off (0 banners) | — | | R2 lever | `prod-g2-L2only` | on | **8/8 vs R1** | | R3 fault | `prod-g2-L2only-fault` | on + FORCE_NO_RELOAD | **0/8**, 136 reloads suppressed, output degenerates to pure newlines | This is the first run in which the MUST-FAIL rung has ever failed, so it is the first informative pass. **Verdict: the −10.02% makespan win is correctness-cleared AT THIS SCOPE.** Scope covered: TP=2, bfp4 G2, B=8, greedy/device-sampling, 40–120 token outputs, batch composition mutating during the run. **Not covered: long outputs (≥1k), long context (32k+), GSM8K, retrieval, B=4, TP=1.** This repo's workload is long-context agents, so this clearance does **not** license making it the default yet — the long ladder has to run first. Caveat worth stating: the fault output is degenerate rather than subtly wrong, so the gate is demonstrated sensitive to a *gross* chain break; sensitivity to a subtle one is not established. Records: `bench/runs/perf-loop-c16-r3-vacuous-static-proof-20260926T1210Z.jsonl`, `bench/runs/perf-loop-c17-resident-gate-passes-20260926T1215Z.jsonl`, `perf-loop-c17-resident-gate-R{1,2,3}-*.json`. Branch `perf-loop-c1`, PR #90.
Owner

Update (perf-loop c22/c23, master 498c2d2):

  • Resident decode on the integrated master tree, B=8, TP=2, G2: makespan −9.3/−6.8/−4.6% at 4k/16k/32k; TG 44.57/48.86/54.69 ms (−12.2/−12.0/−10.7%); TTFT max flat; TTFT p50 +129/+39/+24% (first tokens wait for the whole batch's prefill). Record bench/runs/perf-loop-c23-resident-ladder-20260926T1717Z.jsonl.
  • Live prefix caching was never durable: the plugin half (MambaSpec-accepting model_runner + qwen36_prefix_cache.py) and the vLLM block-invalidation patch (block_pool, kv_cache_manager, sched/output, sched/scheduler) existed only as an uncommitted overlay. It has been rescued from cfx-llm2:/tmp into patches/prefix-rescued-20260922 and is now mounted as patches/prefix-local on prefix arms and in the nix unit when enablePrefixCaching (64dcc2b), with trace_mode=decode_only (a6cf6bc). prod-g2-prefix boots again (c22). On a no-sharing 4k/B=8 cell it costs +21.8% makespan (eager prefill admitted all at once); the shared-head benefit run (c24) is in progress.
Update (perf-loop c22/c23, master 498c2d2): - **Resident decode on the integrated master tree**, B=8, TP=2, G2: makespan −9.3/−6.8/−4.6% at 4k/16k/32k; TG 44.57/48.86/54.69 ms (−12.2/−12.0/−10.7%); TTFT max flat; **TTFT p50 +129/+39/+24%** (first tokens wait for the whole batch's prefill). Record bench/runs/perf-loop-c23-resident-ladder-20260926T1717Z.jsonl. - **Live prefix caching was never durable**: the plugin half (MambaSpec-accepting model_runner + qwen36_prefix_cache.py) and the vLLM block-invalidation patch (block_pool, kv_cache_manager, sched/output, sched/scheduler) existed only as an uncommitted overlay. It has been rescued from cfx-llm2:/tmp into patches/prefix-rescued-20260922 and is now mounted as patches/prefix-local on prefix arms and in the nix unit when enablePrefixCaching (64dcc2b), with trace_mode=decode_only (a6cf6bc). prod-g2-prefix boots again (c22). On a no-sharing 4k/B=8 cell it costs +21.8% makespan (eager prefill admitted all at once); the shared-head benefit run (c24) is in progress.
Owner

c26 attribution (master): the resident arm silently enables vLLM async scheduling (control runs it off). Resident chain alone (--no-async-scheduling, arm prod-g2-L2only-sync): makespan -3.6/-2.8/-1.9%, TG 48.36/52.67/58.34 ms at 4k/16k/32k B=8, TTFT p50 = control at 16k/32k. Async on top: a further -5.8/-4.1/-2.8% and all of the TTFT p50 loss at 16k/32k (+10 s). Record bench/runs/perf-loop-c26-resident-async-split-20260926T1800Z.jsonl.

c26 attribution (master): the resident arm silently enables vLLM async scheduling (control runs it off). Resident chain alone (--no-async-scheduling, arm prod-g2-L2only-sync): makespan -3.6/-2.8/-1.9%, TG 48.36/52.67/58.34 ms at 4k/16k/32k B=8, TTFT p50 = control at 16k/32k. Async on top: a further -5.8/-4.1/-2.8% and all of the TTFT p50 loss at 16k/32k (+10 s). Record bench/runs/perf-loop-c26-resident-async-split-20260926T1800Z.jsonl.
Owner

Blocker (c28): resident decode + async scheduling (prod-g2-L2only) HANGS under ragged load. GSM8K n=60 conc=8: after 57 items the engine sat at 'Running: 2 reqs, Waiting: 0', 0.0 tok/s, no error, for 27 min. sweep32k/greedy gates never caught it because all streams finish together there. Partial accuracy fine (55/57 vs control 58/60). Evidence: bench/runs/perf-loop-c28-resident-async-hang-20260926T1910Z.jsonl + server log. Splitting sync vs async under the same load next (c30).

**Blocker (c28):** resident decode + async scheduling (prod-g2-L2only) HANGS under ragged load. GSM8K n=60 conc=8: after 57 items the engine sat at 'Running: 2 reqs, Waiting: 0', 0.0 tok/s, no error, for 27 min. sweep32k/greedy gates never caught it because all streams finish together there. Partial accuracy fine (55/57 vs control 58/60). Evidence: bench/runs/perf-loop-c28-resident-async-hang-20260926T1910Z.jsonl + server log. Splitting sync vs async under the same load next (c30).
Owner

c30 (9ab52cd): the resident-decode hang reproduces with vLLM async scheduling off too (arm prod-g2-L2only-sync), at the same point as c28: GSM8K n=60 conc=8, 57/60 done, 2 running. py-spy: MainThread blocked in to_torch <- process_output_decode (model.py:3766) <- finalize_decode, so the resident decode trace never completes. Cards were wedged afterwards (tt-smi -r).
Server log: every earlier finish was refilled immediately (50 prefills into slot [7]); the hang only starts once the batch shrinks with no refill (Running 8 -> 2, Waiting 0). Hypothesis: in resident mode a vacated (padded, pos -1) row takes its next token from device argmax instead of the host's 0; a garbage id there means an out-of-bounds embedding read and a device hang. c31: env-gated QWEN36_RESIDENT_PROBE (logs device tok/pos before each execute) + a 6-short/2-long shrink repro. Record: bench/runs/perf-loop-c30-resident-sync-hang-20260926T1845Z.jsonl

c30 (9ab52cd): the resident-decode hang reproduces with vLLM async scheduling **off** too (arm prod-g2-L2only-sync), at the same point as c28: GSM8K n=60 conc=8, 57/60 done, 2 running. py-spy: MainThread blocked in to_torch <- process_output_decode (model.py:3766) <- finalize_decode, so the resident decode trace never completes. Cards were wedged afterwards (tt-smi -r). Server log: every earlier finish was refilled immediately (50 prefills into slot [7]); the hang only starts once the batch **shrinks with no refill** (Running 8 -> 2, Waiting 0). Hypothesis: in resident mode a vacated (padded, pos -1) row takes its next token from device argmax instead of the host's 0; a garbage id there means an out-of-bounds embedding read and a device hang. c31: env-gated QWEN36_RESIDENT_PROBE (logs device tok/pos before each execute) + a 6-short/2-long shrink repro. Record: bench/runs/perf-loop-c30-resident-sync-hang-20260926T1845Z.jsonl
Owner

c32 root cause: decode bucketing keeps one trace and input set per bucket width, but the resident chain's inputs-current state is global. A condense step (slot_remap) forces width 8 with a reload, and the next step drops to bucket 2 without one, replaying never-written positions (probe: pos=[1058094935, 1046494903]). The control path reloads every step, so only resident hung.
Fix QWEN36_RESIDENT_BUCKET_SYNC (default on, counted banner): on a bucket switch with no reload, carry the device tok/pos rows from the previous bucket and force the reload. c33b: GSM8K 58/60 on prod-g2-L2only-sync and prod-g2-L2only (control 58/60), no hang. Records: bench/runs/perf-loop-c32-gsm8k-probe-20260926T1857Z.jsonl, bench/runs/perf-loop-c33b-gsm8k-bucketsync-20260926T1915Z.jsonl. Retrieval gate (c34) running.

c32 root cause: decode bucketing keeps one trace and input set per bucket width, but the resident chain's inputs-current state is global. A condense step (slot_remap) forces width 8 with a reload, and the next step drops to bucket 2 without one, replaying never-written positions (probe: pos=[1058094935, 1046494903]). The control path reloads every step, so only resident hung. Fix QWEN36_RESIDENT_BUCKET_SYNC (default on, counted banner): on a bucket switch with no reload, carry the device tok/pos rows from the previous bucket and force the reload. c33b: GSM8K 58/60 on prod-g2-L2only-sync and prod-g2-L2only (control 58/60), no hang. Records: bench/runs/perf-loop-c32-gsm8k-probe-20260926T1857Z.jsonl, bench/runs/perf-loop-c33b-gsm8k-bucketsync-20260926T1915Z.jsonl. Retrieval gate (c34) running.
Owner

c34-c36: fix holds. Retrieval 1.0 early/late at 16k/32k on both resident arms (c34). New lever TT_ASYNC_PREFILL_FLUSH removes async scheduling's TTFT p50 cost (vLLM batch queue deferred prefill outputs behind the next synchronous prefill). Bundle resident+async+flush: B=8 -9.6..-10.4/-7.0/-4.6% makespan (2 boots), B=4 -9.3/-7.4/-5.7%, every cell below the control band, TTFT p50 at control, GSM8K 58/60. LEDGER R-2026-09-26-resident-async-flush; records bench/runs/perf-loop-c35-async-prefill-flush-20260926T2035Z.jsonl, bench/runs/perf-loop-c36-apf-confirm-20260926T2105Z.jsonl. Recommended as serving default (owner call).

c34-c36: fix holds. Retrieval 1.0 early/late at 16k/32k on both resident arms (c34). New lever TT_ASYNC_PREFILL_FLUSH removes async scheduling's TTFT p50 cost (vLLM batch queue deferred prefill outputs behind the next synchronous prefill). Bundle resident+async+flush: B=8 -9.6..-10.4/-7.0/-4.6% makespan (2 boots), B=4 -9.3/-7.4/-5.7%, every cell below the control band, TTFT p50 at control, GSM8K 58/60. LEDGER R-2026-09-26-resident-async-flush; records bench/runs/perf-loop-c35-async-prefill-flush-20260926T2035Z.jsonl, bench/runs/perf-loop-c36-apf-confirm-20260926T2105Z.jsonl. Recommended as serving default (owner call).
Member

Read the nix serving module on master. If QWEN36_RESIDENT_BUCKET_SYNC and TT_ASYNC_PREFILL_FLUSH already banner on every G2 arm, this issue can close. If not, the missing edit is the module default only. Do not re-measure the c36 bundle.

Read the nix serving module on master. If QWEN36_RESIDENT_BUCKET_SYNC and TT_ASYNC_PREFILL_FLUSH already banner on every G2 arm, this issue can close. If not, the missing edit is the module default only. Do not re-measure the c36 bundle.
Member

Shipped: the resident/async/flush half measured −4.6…−10.4% B=8 makespan (LEDGER R-2026-09-26-resident-async-flush) and the nix options (deviceResident/prefix caching, TT_ASYNC_PREFILL_FLUSH) are on master in modules/tenstorrent-serving.nix; the prefix half is the deployed production path. Verified 2026-11-18.

Shipped: the resident/async/flush half measured −4.6…−10.4% B=8 makespan (LEDGER R-2026-09-26-resident-async-flush) and the nix options (deviceResident/prefix caching, TT_ASYNC_PREFILL_FLUSH) are on master in modules/tenstorrent-serving.nix; the prefix half is the deployed production path. Verified 2026-11-18.
Owner

agent-gateway closeout (closed): cleared agent:* labels.
Hermes kanban card (if any) is left for Hermes to archive/complete.

agent-gateway closeout (closed): cleared `agent:*` labels. Hermes kanban card (if any) is left for Hermes to archive/complete.
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
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
bitpartner/tt-stack#52
No description provided.