Tenstorrent Blackhole stack for the cfx cluster
  • Python 82.3%
  • Shell 8.7%
  • C++ 6.8%
  • Cuda 1.1%
  • Nix 1%
Find a file Use this template
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Donach's Bot 373e2cb871
Some checks failed
tt-stack-ci / Report upstream drift (pull_request) Successful in 5m49s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 13m42s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 11m56s
cards-fresh cards: not measured (serving active or MemAvailable low); add cards:go to retry
tt-stack-ci / Serialized card gate (pull_request) Successful in 9m44s
cards-fresh / Re-check cards-fresh on open PRs (push) Successful in 16m59s
bench/runs: the W2 cdr8g-bk r1 server logs SHIP-COL3-CDR8G.md cites (CI cited-records)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 13:16:11 +01:00
.claude/skills ship-col3-cdr8g: merge codex/pp10k (c05725fd, pp10k-cdr8g-bk) 2026-11-14 09:49:13 +01:00
.forgejo/workflows Production arm s12-prefix-host-vsplit-sf += ONESTEP + SNAP_PACK + CKPT_DEFER + HEAD_DEFER + KV_TIER_STORE_DEFER (R-2026-11-03-cold-prefix-l1234) 2026-11-03 23:21:11 +01:00
bench bench/runs: the W2 cdr8g-bk r1 server logs SHIP-COL3-CDR8G.md cites (CI cited-records) 2026-11-16 13:16:11 +01:00
docker Add vllm-tt:k2-mr-pk3r-tracy: the served pk3r lever chain rebuilt with Tracy ON 2026-10-02 11:36:30 +02:00
docs ship-cdr8g: LEDGER R-2026-11-16-ship-cdr8g, HISTORY, README; B4 recheck records 2026-11-16 12:57:02 +01:00
images ttx: rapid-prototyping loop for 1 and 2 P150a cards (Phase C) (#70) 2026-09-25 23:02:09 +02:00
modules P/D export arm servable by tenstorrent-serving: s12phv-pd-export-mtp + QWEN36_PD_EXPORT[_MTP] 2026-11-07 19:05:10 +01:00
nix ship-cdr8g: prefill-only production arm (owner 11-16), unit-argv verification records 2026-11-16 12:33:05 +01:00
patches ship-col3-cdr8g: merge codex/pp10k (c05725fd, pp10k-cdr8g-bk) 2026-11-14 09:49:13 +01:00
pins ttx: rapid-prototyping loop for 1 and 2 P150a cards (Phase C) (#70) 2026-09-25 23:02:09 +02:00
scratchpad bench(phase2a-prefix): stage 2/3 gates passed, B=1 decode drops to 48.5ms, makespan -87.5% at conc-8 2026-09-22 10:05:07 +02:00
scripts cited-records: a cited record directory resolves to its tracked files; PD-SPLIT-DESIGN: 2 dangling citations point at committed records 2026-11-08 23:39:06 +01:00
serving/speculative docs: 104 docs -> 11 plus a lean AGENTS.md; only LEDGER may call something closed 2026-09-25 10:01:36 +02:00
specs docs: 104 docs -> 11 plus a lean AGENTS.md; only LEDGER may call something closed 2026-09-25 10:01:36 +02:00
tests Require measured allocator relief before another full instrument boot 2026-11-13 20:22:03 +01:00
tools ship-cdr8g: prefill-only production arm (owner 11-16), unit-argv verification records 2026-11-16 12:33:05 +01:00
.gitattributes chore: union-merge the append-only run index for the integration merge 2026-09-26 14:23:53 +02:00
.gitignore docs(research): lift 32-verify-row cap in MTP batch speculative decode 2026-10-16 20:44:30 +02:00
AGENTS.md docs: card host is cfx-llm0 (README serve tunnel, AGENTS, SERVING, STATUS) 2026-10-26 06:43:38 +01:00
flake.lock ci: public tt-metal pin, Nix ttnn moved to a host-local sub-flake, pinned formatter 2026-09-25 09:43:42 +02:00
flake.nix ttsim: work counters for the t-proxy proxy (RISC instructions per hart, NoC/DRAM bytes per tile) 2026-10-20 23:05:13 +02:00
LICENSE Add Apache-2.0 LICENSE, matching upstream tt-metal and vLLM 2026-11-13 16:24:00 +01:00
README.md ship-cdr8g: LEDGER R-2026-11-16-ship-cdr8g, HISTORY, README; B4 recheck records 2026-11-16 12:57:02 +01:00

tt-stack

Serving ThinkingCap / Qwen3.8-27B on two cabled Tenstorrent P150a (Blackhole) cards, TP=2. The repo holds the Nix packaging, the NixOS host and serving modules, our patches on pinned upstreams, and a bench harness (ttx) that writes a record for every measurement.

Start at AGENTS.md. Live numbers: docs/STATUS.md. Proven results: docs/LEDGER.md. Every lever tried: docs/LEVERS.md.

  • Porting guide: how to bring another decoder LLM to these speeds on P150, as agent skills (tt-port-*, tt-debug-tools): the lever ladder with each rung's card gain and record, the dead ends, the correctness gates and the debug tools.
  • Inference crash course: LLM inference from first principles with our card numbers: prefill vs decode and the roofline, the hybrid GDN model, KV and memory, batching, TP, speculative decoding, number formats (bfp8/bfp4, FP8, MX, NVFP4), how TT bring-up differs from NVIDIA/AMD, and a glossary.
  • Chip utilization overview: where CONTROL stands against the PP/TG targets and how the two P150a chips are used, generated from records and regenerated with every CONTROL move.

P/D split (production, 2026-11-09)

PD-RECIPE.md is the rebuild, deploy, rollback and change-window recipe. TT prefill runs on cfx-llm0; RTX decode, the handoff broker and socket-activated router run on cfx-llm1; Bifrost sends the public model to the router. Current decode: pd-r3-host32-pdq8-dva-night-ehq8-k8b4 (LEDGER R-2026-11-09-rtx-k8b4-ship, R-2026-11-09-rtx-k8b4-pdab; RTX-only concurrency regression open). TT serves arm ship-cdr8g (since 2026-11-16, LEDGER R-2026-11-16-ship-cdr8g; was s12phv-pd-export-mtp) via nixos-llm and a tt-stack flake bump; RTX starts through tools/pd-split/rtx/decode-serve.sh. Router/connector staging: tools/pd-split/window/stage.sh; cutover/status/rollback: tools/pd-split/cutover/pd40g.sh (recipe explains apply semantics). Verify with pd40g.sh status and the deployed cutover/router-prod-restore.sh pd RELEASE-CHECK; check the current decode label and boot banners. Production facts: snapshot manifest. The TT-only production-arm history below predates the P/D cutover.

Long-context cold prefill, served (2026-11-12)

Every serving layer (TT, P/D router, cfx-mgmt gateway, Bifrost facades) accepts the model's native 262,144 tokens; the RTX decode is still capped at 131,072 (MAXLEN), so longer requests decode on TT. Cold prefill on TT prod through the router, unique prompts, 1 output token, live traffic served alongside, n=2 per size (record). PP = prompt tokens / TTFT:

Prompt tokens TTFT s PP tok/s
10k 1.50–1.54 6,535–6,715
50k 7.50–7.67 6,546–6,686
100k 16.6–17.0 5,928–6,031
150k 28.1–28.5 5,289–5,332
200k 41.7–41.8 4,772–4,791
250k 57.1–57.7 4,335–4,355

Production arm (2026-11-03, owner-approved): S12PHV-L1234 = S12PHV-1M + ONESTEP + SNAP_PACK + L1/L3/L4

s12-prefix-host-vsplit-sf (name kept) = S12PHV-1M below plus five cold-prefix levers (LEDGER R-2026-11-03-cold-prefix-l1234): QWEN36_PREFIX_ONESTEP=1 (an align-mode prompt prefills in one engine step, its GDN checkpoint taken in-step), QWEN36_PREFIX_SNAP_PACK=1 (8 GDN layers per checkpoint read), QWEN36_PREFIX_CKPT_DEFER=1 (the checkpoint is staged on device and read back at the next engine step, off the first token's path; 4-entry pool, 151.5 MiB/card), QWEN36_PREFIX_HEAD_DEFER=1 and QWEN36_KV_TIER_STORE_DEFER=1. Gates (twin s12phv-1m-onestep-pack-l1234, 20261103T192821Z): agent-sessions, retrieval, gsm8k 59/60, equiv pass. Cold A/B vs S12PHV-1M (cfx-llm0 w5, n=1, salted): PP +7.4…+34.8% at T=1.0 and +8.8…+34.8% greedy in 6/6 cells each (B1/4k 3,942 → 5,313 at T=1.0), TG/user −0.5…−2.7% (the deferred readback lands in the first decode step).

Before it: S12PHV-SFR + 1M device KV pool (2026-10-31, deployed by nixos-llm #870)

s12-prefix-host-vsplit-sf (name kept) = S12PHV-SFR with a 1,067,008-token device KV pool (B8 x 128k co-resident), GDN id pool, 52 GiB host tier (8 x 256k write-through) (LEDGER R-2026-10-31-kv1m-gdnids): QWEN36_MAX_TOKENS_ALL_USERS=1050624 (521 attention ids), QWEN36_GDN_ID_POOL=512 (the GDN groups get their own host-only block ids, so they no longer crowd attention out of the device pool), QWEN36_KV_HOST_TIER_GIB=52, container --memory 76g (measured peak 62.9 GiB). Gates (twin s12phv-kv1m-gdnids): gsm8k 59/60, retrieval 1.0/1.0, equiv pass, agent sessions recall 1.0, wall 295.7 s. Multi-round capacity (T=1.0, +16k per round): B8/P112k follow-up hit 0.024 → 0.875, TTFT max 50.5 → 31.4 s; B4 240k follow-up 22.0 s vs 220.3 s cold; B1 240k 5.6 s vs 54.8 s. Speed A/B vs S12PHV-SFR (ab20261031T160454Z, n=1, cold, T=1.0): neutral, TG/user within ±0.3% in all six cells, 32k PP within ±0.6% (4k PP +10.2/−1.1/−6.9% at B1/B4/B8 is n=1 first-cell noise).

Serve: services.tenstorrentServing = { enable = true; arm = "s12-prefix-host-vsplit-sf"; containerMemory = "76g"; }.

Results (2026-10-31, TP=2, CONTROL S12PHV-SFR)

S12PHV-SFR = S12PHV-SF + QWEN36_PREFIX_SCRATCH_RESUME (same arm name s12-prefix-host-vsplit-sf, LEDGER R-2026-10-31-scratch-resume). The align-mode tail step of a cold prompt no longer restores the GDN state from the host snapshot when the B=1 prefill scratch still holds the head step's state (bitwise, in-serving self-test). Gates (twin s12phv-sf-sr): gsm8k 59/60, retrieval 1.0/1.0, equiv pass, agent sessions recall 1.0, wall 313.2 s (S12PHV-SF 316.7 s).

Cold prompts (ab20261031T030307Z, S12PHV-SF vs S12PHV-SFR, B 8/4/1 × 4k/32k, salted, T=1.0 top_p 0.95 top_k 20, exact rule, n=2 ABBA, no rep overlap in any cell). PP = B × ctx / TTFT max:

B ctx PP tok/s S12PHV-SF → S12PHV-SFR TG tok/s/user S12PHV-SF → S12PHV-SFR
1 4k 3,810 → 4,311 (+13.2%) 68.5 → 68.6 (+0.1%)
1 32k 6,453 → 6,581 (+2.0%) 67.7 → 67.7 (+0.0%)
4 4k 4,051 → 4,319 (+6.6%) 70.0 → 70.9 (+1.3%)
4 32k 6,487 → 6,569 (+1.3%) 63.9 → 63.9 (−0.1%)
8 4k 4,332 → 4,559 (+5.2%) 64.8 → 66.4 (+2.4%)
8 32k 6,526 → 6,640 (+1.7%) 54.1 → 54.1 (−0.1%)

Serve (as shipped 2026-10-31 r3, before the kv1m pool): services.tenstorrentServing = { enable = true; arm = "s12-prefix-host-vsplit-sf"; containerMemory = "68g"; }; the arm now needs containerMemory = "76g" (section above).

S12PHV-SF (previous CONTROL, 2026-10-31)

S12PHV-SF = S12PHV + QWEN36_PREFIX_SNAP_FAST (arm s12-prefix-host-vsplit-sf, LEDGER R-2026-10-31-snap-fast). Prefix caching snapshots the GDN state after every prefill step; the snapshot now reads back only the wanted rows and untilizes on the device (bitwise, in-serving self-test), ~0.85 s → ~0.2 s per step. Gates (twin s12phv-sf): gsm8k 59/60, retrieval 1.0/1.0, equiv pass, agent sessions recall 1.0, wall 367.8 → 316.7 s. Hit TTFT unchanged (shared 30k head, B4/B1).

Cold prompts (ab20261031T005039Z, S12PHV vs S12PHV-SF, B 8/4/1 × 4k/32k, salted, T=1.0 top_p 0.95 top_k 20, exact rule, n=2 ABBA). PP = B × ctx / TTFT max:

B ctx PP tok/s S12PHV → S12PHV-SF TG tok/s/user S12PHV → S12PHV-SF
1 4k 2,439 → 3,847 (+57.7%) 68.8 → 68.5 (−0.4%)
1 32k 5,752 → 6,480 (+12.7%) 67.9 → 67.8 (−0.1%)
4 4k 3,169 → 4,137 (+30.6%) 70.9 → 70.8 (−0.2%)
4 32k 6,126 → 6,496 (+6.0%) 64.2 → 63.9 (−0.5%)
8 4k 3,756 → 4,412 (+17.5%) 65.0 → 66.4 (+2.1%)
8 32k 6,339 → 6,548 (+3.3%) 54.2 → 54.0 (−0.3%)

Serve: services.tenstorrentServing = { enable = true; arm = "s12-prefix-host-vsplit-sf"; containerMemory = "68g"; }.

S12PHV (previous CONTROL, 2026-10-30)

S12PHV = S12P + host-RAM KV tier + state-once verify value split (arm s12-prefix-host-vsplit, LEDGER R-2026-10-30-prod-edge). It folds the two opt-in arms below into one served arm, for the owner's "update the production to bleeding edge" (2026-10-30): s12-prefix-host (44 GiB host tier, R-2026-10-26-kv-host-tier) + QWEN36_MTP_GDN_SO_VSPLIT=1 (R-2026-10-28-so-vsplit). Same image and tensor cache (…-412e7cd8) as S12P; container --memory 68g.

Gates (one boot, bench/runs/prod-edge-gate-20261030T170000Z.jsonl): gsm8k 59/60, retrieval 1.0/1.0 at 16k/32k, equiv pass, agent sessions (32 × 3 turns, 24–32k prompts, T=1.0) recall 1.0 with a whole-run wall of 369.0 s (S12P 527 s, s12-prefix-host 371.5 s in R-2026-10-26-kv-host-tier).

Cold prompts (ab20261030T152205Z, S12P vs S12PHV, B 8/4/1 × 4k/32k, salted so neither arm hits, T=1.0 top_p 0.95 top_k 20, exact rule, n=2 ABBA; bench/runs/prod-edge-ab-verdict-20261030T152205Z.jsonl). PP = B × ctx / TTFT max:

B ctx PP tok/s S12P → S12PHV TG tok/s/user S12P → S12PHV
1 4k 2,418 → 2,370 (−2.0%) 67.2 → 68.6 (+2.1%)
1 32k 6,299 → 5,680 (−9.8%) 65.7 → 67.8 (+3.2%)
4 4k 3,404 → 3,080 (−9.5%) 69.7 → 71.5 (+2.5%)
4 32k 6,515 → 6,158 (−5.5%) 64.4 → 64.2 (−0.3%)
8 4k 4,224 → 3,809 (−9.8%) 63.7 → 66.6 (+4.6%)
8 32k 6,774 → 6,417 (−5.3%) 53.3 → 54.1 (+1.6%)

The cold PP cost is the tier's write-through stores. S12PHV's PP is within 0.8–4.4% of the 10-26 s12-prefix-host cells; the larger relative 4k and B1/32k deltas are partly a faster S12P control on this run (control PP moved up to 6% between reps). TG/user at T=1.0 moved up to 17% between reps of the same arm (B4/4k S12P 75.6 vs 63.9), so the TG deltas read only as "not worse". Serve (previous): services.tenstorrentServing = { enable = true; arm = "s12-prefix-host-vsplit"; containerMemory = "68g"; }.

S12P (previous CONTROL, 2026-10-26)

S12P = S12 + prefix caching (arm s12-prefix, LEDGER R-2026-10-26-s12-prefix). It runs vLLM hybrid prefix caching in align mode at block 2048. GDN snapshots are taken at prefill chunk ends, and the MTP head writes through a per-slot page table shifted past the hit blocks. Owner decision, 2026-10-26: ship for agentic traffic, which is mostly CLI tools with shared prefixes. The cost lands on cold prompts. Both tables: one ttx ab each, S12 on the same tree (s12-ctl) vs S12P, T=1.0 top_p 0.95 top_k 20, exact rule, n=2 ABBA.

Agentic, shared prefix (ab20261026T062745Z): 32,000-token prompts = a 30,720-token shared head + distinct tails, 3 cells × 2 reps per B, 1,024 output tokens. Effective PP = B × ctx / TTFT max, cached tokens included. Records: bench/runs/ttx-sweep32k-{s12-ctl,s12-prefix}-ab20261026T062745Z-r{0,1}.jsonl.

B effective PP tok/s TG tok/s/user TTFT max makespan MTP accept
1 7,362 → 48,091 70.1 → 67.8 (−3.2%) 4.35 → 0.67 s 19.0 → 15.8 s 0.498 → 0.468
4 7,275 → 51,623 65.5 → 65.3 (−0.3%) 17.60 → 2.48 s 35.4 → 20.6 s 0.555 → 0.558
8 7,222 → 46,279 52.8 → 53.3 (+1.0%) 35.45 → 6.13 s 59.1 → 29.3 s 0.538 → 0.534

Cold prompts, no shared prefix (ab20261026T060022Z, B 8/4/1 × 4k/32k, salted prompts, so S12P never hits). Records: bench/runs/ttx-sweep32k-{s12-ctl,s12-prefix}-ab20261026T060022Z-r{0,1}.jsonl. The block-2048 + align-split prefill costs PP; TG/user is within noise:

B ctx PP tok/s S12 → S12P TG tok/s/user S12 → S12P TTFT max MTP accept
1 4k 6,891 → 2,570 (−62.7%) 74.9 → 74.2 0.60 → 1.60 s 0.518 → 0.518
1 32k 7,463 → 6,034 (−19.2%) 69.6 → 69.2 4.39 → 5.43 s 0.491 → 0.491
4 4k 6,817 → 3,311 (−51.4%) 77.8 → 77.0 2.40 → 4.95 s 0.623 → 0.623
4 32k 7,367 → 6,459 (−12.3%) 63.8 → 62.8 17.79 → 20.29 s 0.536 → 0.531
8 4k 7,057 → 4,208 (−40.4%) 63.2 → 64.5 4.65 → 7.80 s 0.586 → 0.591
8 32k 7,315 → 6,723 (−8.1%) 53.2 → 53.3 35.84 → 39.00 s 0.524 → 0.526

Recovering the cold-prefill loss is the open lever. Greedy (T=0) is not measured on S12P. Gates: gsm8k 258/264, retrieval 1.0/1.0 (14 prefix resumes), equiv pass; re-gated on the vsplit tree 2026-10-29 (gsm8k 59/60, retrieval 1.0/1.0, equiv pass; bench/runs/s12-prefix-gate-restamp-20261029T095744Z.jsonl).

Host-RAM KV tier, opt-in arm s12-prefix-host (LEDGER R-2026-10-26-kv-host-tier, docs/KV-HOST-TIER.md): S12P plus evicted prefix blocks kept in 44 GiB of host RAM and restored by DMA (12–18 ms per 2048-token block) instead of re-prefilled. 32 agent sessions × 3 turns of ~30k (2.3× the device pool), T=1.0: turns 2–3 TTFT p50 6.1/9.9 → 4.3/3.6 s, p95 35.0/37.0 → 11.7/15.3 s, turn wall −47%, host hit 0.87/0.90, recall 1.0. Cold sweep vs S12P: PP 0…−5.5%, TG within ±2%. Container --memory 68g. Part of CONTROL S12PHV since 2026-10-30. Gate: bench/runs/kv-host-tier-gate-20261029T095744Z.jsonl (re-gated on the vsplit tree 2026-10-29).

State-once verify value split, opt-in arm s12-ctl-vsplit (LEDGER R-2026-10-28-so-vsplit, QWEN36_MTP_GDN_SO_VSPLIT=1): the MTP verify's GDN state-once program splits each head instance's value columns over P cores (P=4 at Bw=1, 2 at Bw=2; B4/B8 unchanged). Bitwise in ttsim (bench/runs/so-vsplit-sim-20261028T133156Z.jsonl). T=1.0 n=2 vs S12 (s12-ctl): TG/user B1 74.88 → 76.04 (+1.6%) at 4k, 69.73 → 70.79 (+1.5%) at 32k, PP ±0.7%, B4/B8 flat (bench/runs/fused-decode-ab-verdict-20261028T190138Z.jsonl). Part of CONTROL S12PHV since 2026-10-30. The fused decode boundary tried alongside it (AR + add + RMSNorm in one program) lost 15–24% TG: NO-GO (R-2026-10-28-fused-boundary).

S12 (previous CONTROL, 2026-10-24)

Shape: B concurrent cold prompts of 4k or 32k tokens, 1,024 output tokens each, on one B=8 boot.

  • PP = B × ctx / worst TTFT (prefill tok/s, aggregate).
  • TG = decode tok/s per user, MTP speculation included. TG ms/token = 1000 / TG.

S12 = S11 + DEVFEED_PAD (QWEN36_MTP_DEVFEED_PAD: steps with padded rows, at a batch's ramp-up and tail, also take the DEVFEED fast path; active rows' fed inputs bitwise the host's, padded rows don't-care; MTP-BATCH §32). S11 = S10 + DEVFEED (the sampled step's draft trace writes the next verify's draft-dependent inputs on device, so the next verify is enqueued before the host reads the drafts back; a plan mismatch stops serving; MTP-BATCH §31).

At the recommended sampling settings (T=1.0, top_p 0.95, top_k 20, min_p 0; the server default since S7), measured on S12 (as -s11-pad = S12 + host-clock / profiler diagnostics), n=2, one ttx ab S11 vs S12 (ab20261024T153521Z, bench/queues/s11-pad-ab.txt, seeded): bench/runs/ttx-sweep32k-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-csplit-t0-gdc-cpk-wy-kvd-sddec-cph32-kvfold-dx-w2t-mx-b8k3c48-gpgob-dfr-s11-pad-ab20261024T153521Z-r0.jsonl (and -r1), S11 bench/runs/ttx-sweep32k-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-csplit-t0-gdc-cpk-wy-kvd-sddec-cph32-kvfold-dx-w2t-mx-b8k3c48-gpgob-dfr-s11-ab20261024T153521Z-r0.jsonl (and -r1). TG = 1000 / mean ms per token.

B ctx PP tok/s, T=1.0 TG tok/s/user, T=1.0 MTP accept tokens/row-step TG, diagnostic-free rep (r1) S11 PP / TG, T=1.0, same ab (32k TG Δ vs r1)
1 4k 7,474 68.4 0.451 2.349 68.8 7,681 / 68.4 (−2.7% / 0.0%)
1 32k 7,587 74.8 (r0 profiler windows) 0.558 2.669 74.9 7,551 / 74.5 (+0.5% / +0.5%)
4 4k 7,248 76.9 0.618 2.847 77.3 7,267 / 76.6 (−0.3% / +0.5%)
4 32k 7,465 61.8 (r0 profiler windows) 0.551 2.648 64.5 7,459 / 64.4 (+0.1% / +0.2%)
8 4k 6,962 62.4 0.571 2.708 63.5 6,973 / 59.9 (−0.2% / +4.1%)
8 32k 7,431 52.5 (r0 profiler windows) 0.560 2.677 54.9 7,418 / 54.7 (+0.2% / +0.4%)
  • Verdict: small WIN, tier 1 (bench/runs/pad-ab-verdict-20261024.jsonl, LEDGER R-2026-10-24-pad). B8/4k TG/user +4.1% (both reps faster per row-step), B4/4k +0.5%, 32k neutral, PP and acceptance unchanged.
    • The measured arm's profiler windows stalled its r0 32k cells, so its n=2 32k means read −4.0%. The diagnostic-free r1 is the 32k reading: +0.2…+0.5%, within noise.
    • S11's own n=2 in this ab, with no diagnostics, is the cleaner S11 32k number: 64.4 / 54.7 / 74.5 at B4/B8/B1.

Greedy (T=0) is S10's measured sweep, NOT measured on S11 or S12: DEVFEED and DEVFEED_PAD run only in the sampled (T>0) step family, and greedy steps take S10's host path unchanged (S10's own sweep on master ce8c1330, n=1, one boot, bench/runs/ttx-sweep32k-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-csplit-t0-gdc-cpk-wy-kvd-sddec-cph32-kvfold-dx-w2t-mx-b8k3c48-gpgob-dfr-s10-20261024T130437Z.jsonl). PP = B·ctx/TTFT max (tools/ttx/sweep-verdict.py, pp_tok_s). TG/user is up +0.5…+2.0% vs S9 greedy in 6/6 (bench/runs/ttx-sweep32k-prod-g2-c86-colpar2-rz3-sl-pfw2-gf-ab-so-dn-d8k16-nhp-tail-k8v4-mtp-stack-warm-kb-cm-so1-kda2-lmlofi-csplit-t0-gdc-cpk-wy-kvd-sddec-cph32-kvfold-dx-w2t-mx-b8k3c48-gpgob-dfr-s9-20261024T070256Z.jsonl). Caveat: B4/B1 on a shared max_num_seqs=8 boot (validation pending).

B ctx PP tok/s TG tok/s/user TTFT (worst) makespan MTP accept baseline prod-g2 PP / TG
1 4k 8,308 74.7 0.49 s 14.2 s 0.543 3,385 / 23.3
1 32k 7,674 65.1 4.27 s 20.0 s 0.461 —
4 4k 7,578 82.8 2.16 s 17.4 s 0.685 2,556 / 21.0
4 32k 7,492 68.4 17.49 s 35.1 s 0.623 3,260 / 18.9
8 4k 7,172 72.0 4.57 s 24.5 s 0.682 2,427 / 19.6
8 32k 7,448 55.3 35.20 s 58.1 s 0.573 3,232 / 16.3
  • Baseline: bench/runs/ttx-sweep32k-prod-g2-20260927T094908Z.jsonl and bench/runs/ttx-sweep32k-prod-g2-20260926T160204Z.jsonl (TG = 1000 / ms per token; it stopped at EOS, so its makespans were an upper bound).
  • Ship history (each a combination screened against the previous CONTROL, then gated; LEDGER has the cells):
    • S (R-2026-10-16-ship-s, CI #9097): 64k draft vocabulary + warm-tail span + swiglu pack. TG/user +2.9…+12.5% in 6/6, PP flat.
    • S2 (R-2026-10-16-s2, CI #9167/#9309): + bkda16k, pfold, gpo. PP +6.7…+15.2% at 4k, flat at 32k; TG flat.
    • S3 (R-2026-10-20-s3): + prefill host-gap, front-end, fused norms and adds, fused GDN tail, qkv untilize. PP +5.5…+16.3% in 6/6, TG flat.
    • S4 (R-2026-10-20-s4, CI #9603/#9619): + 4-tile-packet reduce-scatter writer (rs4) + AGMM sharded gather buffer (gbs). PP +1.6…+4.8% in 6/6, TG flat.
    • S5 (R-2026-10-20-s5, CI #9670): + AGMM forward offload (fwo) + GDN upmath prep3 (gum2). PP +1.0…+1.9% in 6/6, TG/user B4/32k +5.9%, B1 −3.3/−4.5% (accepted trade).
    • S6 (R-2026-10-21-s6, CI #9748): + vectorised KV-capacity scan (cap) + GDN state-once io-CB reads (iosrc). TG/user +0.46…+1.13% in 6/6, PP flat.
    • S7 (R-2026-10-22-s7): + exact speculative sampling on the device (served at T>0) + fused sampler + device accept + dual trace families. Greedy TG/user +3.0…+4.7% in 6/6 (n=2), PP flat; at T=1.0 the device path replaces host sampling.
    • S8 (R-2026-10-22-s8): + AGMM swiglu 8×20 blocks (swg820) + in-projection AGMM M8/N8 (l1fit) + bank-contiguous line reduce-scatter (rsbank). PP +3.3…+4.4% in 6/6 (n=2), TG/user +0.1…+0.9%; all three bitwise (ttsim on the merged tree).
    • S9 (R-2026-10-23-s9): + sampled-step parity (ssp: the exact rule, the noise and the draft-vocab id map inside the fused sampler; 82 → 12 programs per sampled step in ttsim). T=1.0 TG/user +3.2…+9.3% in 6/6 vs S7 (n=2, B8/32k +7.2%), PP −1.9…+0.4%; bitwise to S7's sampled step in ttsim; greedy untouched.
    • S10 (R-2026-10-24-s10): + SO_QKH (the verify's q/k L2 norms once per GDN head instance, not per drafted token; MTP-BATCH §28). T=1.0 TG/user +0.45…+2.82% in 6/6 vs S9 (n=2, B8/32k +2.8%), PP flat, acceptance unchanged; bitwise in ttsim on every served cell and in the boot self-test.
    • S11 (R-2026-10-24-s11): + DEVFEED (device-resident drafts feed the next verify; MTP-BATCH §31). T=1.0 TG/user +0.7…+6.5% in 6/6 vs S10 (n=2 means; r1-only 32k +4.9…+6.0%), acceptance and PP unchanged; fed inputs bitwise in ttsim, the boot self-test and an in-serving step self-test; greedy unchanged (T>0 only).
    • S12 (R-2026-10-24-s12): + DEVFEED_PAD (steps with padded rows take the DEVFEED fast path; MTP-BATCH §32). T=1.0 TG/user B8/4k +4.1%, B4/4k +0.5%, 32k neutral (window-free rep +0.2…+0.5%) vs S11 (n=2), acceptance and PP unchanged; active rows bitwise in ttsim, the boot self-test and an in-serving padded-step self-test; greedy unchanged (T>0 only).
    • S12P (R-2026-10-26-s12-prefix, owner decision for agentic traffic): + prefix caching (align, block 2048, chunk-end GDN snapshots, shifted MTP page table). Shared 30k head: TTFT max −84…−85%, makespan B4 −42% / B8 −50%, TG/user −3.2…+1.0%. Cold prompts: PP −8…−19% at 32k, −40…−63% at 4k, TG/user within noise.
    • S12PHV (R-2026-10-30-prod-edge, owner "production to bleeding edge"): + host-RAM KV tier 44 GiB + SO_VSPLIT. Agent sessions 32 × 3 turns: wall 527 → 369 s. Cold vs S12P: PP −2.0…−9.8% (32k B4/B8 −5.5/−5.3%), TG/user −0.3…+4.6%.
    • S12PHV-SF (R-2026-10-31-snap-fast, owner "give cold PP back"): + SNAP_FAST (row-only, device-untilized GDN checkpoint readback). Cold vs S12PHV: PP +3.3…+57.7% (B1/4k +57.7%, B4/32k +6.0%), TG/user −0.5…+2.1%, hit TTFT unchanged; agent-sessions wall 367.8 → 316.7 s.
    • S12PHV-SFR (R-2026-10-31-scratch-resume): + SCRATCH_RESUME (the align tail step skips the host restore while the B=1 scratch holds the head state). Cold vs S12PHV-SF: PP +1.3…+13.2% (B1/4k +13.2%), TG/user −0.1…+2.4%; same arm name.
    • S12PHV-1M (R-2026-10-31-kv1m-gdnids): + 1,067,008-token device KV pool, GDN id pool, 52 GiB host tier. Speed neutral; B8/P112k follow-up hit 0.024 → 0.875.
    • S12PHV-L1234 (R-2026-11-03-cold-prefix-l1234): + ONESTEP + SNAP_PACK + CKPT_DEFER + HEAD_DEFER + KV_TIER_STORE_DEFER. Cold vs S12PHV-1M: PP +7.4…+34.8% (T=1.0) in 6/6, TG/user −0.6…−1.8%; same arm name.
  • Agentic bench (S4): 8 concurrent pi coding agents (max_num_seqs 8), 930 requests and 29.5 M prompt tokens over four rounds: 0 server errors, all tool calls parsed, 8 sequences reached, MTP acceptance 0.73. Greedy plus thinking looped until max_tokens on long turns, and without prefix caching the workload was prefill-bound. Details in docs/analysis/agentic-ideas-20261020.md; record bench/runs/agentic-pi-b8-s4-20261020T120543Z.jsonl.
  • Gates: every ship passed greedy equivalence (bit-exact or near-tie), GSM8K (paired McNemar) and KV retrieval on the exact combination.
  • Caveats: a B=1 or B=4 boot runs differently from B=1/B=4 on the B=8 boot (MTP acceptance follows the boot size). Within one boot, A/B deltas are ~1% tighter than across boots. The live tenstorrent-serving.service does not run this arm until nixos-llm deploys it (the coordinator times the deploy). The module serves it exactly with services.tenstorrentServing = { enable = true; arm = "s12-prefix-host-vsplit-sf"; containerMemory = "76g"; } (the unit argv equals ttx render, tools/ttx/tests/test_prod_matches_nix.py); S12P's unit was verified on cfx-llm0 from the unit's own argv (R-2026-10-26-serve-arm; docs/SERVING.md §1a; skill tt-serve-arm-deploy).

Verify the numbers

On a workstation with this repo. ttx targets cfx-llm0 (the card host since 2026-10-25; cfx-llm2 is retired), takes card slots, refuses to boot below 4 GB MemAvailable, checks each arm's banners, and writes bench/runs/*.jsonl. The HF token lives only in .env. Never build on the card host.

T=tools/ttx/ttx
BEST=s12-prefix-host-vsplit-sf
# CONTROL is always: grep -m1 'CONTROL=' .forgejo/workflows/ci.yml
$T doctor && $T queue status          # who holds the cards; never preempt another agent

# the table: one B=8 boot, B=8/4/1 x 4k/32k as b-cells
$T run $BEST --suite sweep32k --seqs 8 --b-cells 8 4 1 --contexts 4096 32768

# an A/B against CONTROL in one boot where the flags switch in place (what the CI card job runs)
$T ab --control $BEST --arm <candidate> --reps 2 --b-cells 8 4 1 --contexts 4096 32768

# correctness gates on the exact combination (what CI runs on a winner)
$T run $BEST --suite gsm8k,retrieval,equiv

Run to run, expect about 1%. If a cell is further off, look at the host first: ttx doctor shows leaked pinned memory (only a reboot reclaims it), a stuck AICLK, or another agent on the cards.

Serve it

S12PHV-L1234 the way production serves it: max_num_seqs 8, max_model_len 262144 (256k per request), a 1,067,008-token paged device KV pool (QWEN36_MAX_TOKENS_ALL_USERS=1050624, 521 blocks incl. the null block; 8 × 128k or 4 × 256k at once) with the GDN groups on their own 512 host-only block ids (QWEN36_GDN_ID_POOL=512), KV K bf8 / V bf4, block size 2048, MTP with K=3 at every batch bucket and a 64k draft vocabulary, device argmax for greedy rows and the device sampler with exact speculative sampling for sampled rows (server default T=1.0, top_p 0.95, top_k 20), --reasoning-parser qwen3, --tool-call-parser qwen3_xml, prefix caching (--enable-prefix-caching --mamba-cache-mode align, a GDN snapshot budget sized to the reachable worst case (QWEN36_PREFIX_MAX_SNAPSHOTS=auto: 520 = 512 GDN ids + 8 live, host worst case 13.2 GiB)), a 52 GiB host-RAM KV tier (8 × 256k write-through; --kv-transfer-config TTHostTierConnector, container --memory 76g), the state-once verify value split (QWEN36_MTP_GDN_SO_VSPLIT=1), the row-only device-untilized GDN checkpoint readback (QWEN36_PREFIX_SNAP_FAST=1), the tail-step scratch resume (QWEN36_PREFIX_SCRATCH_RESUME=1), the one-step align prefill with in-step, device-staged GDN checkpoints (QWEN36_PREFIX_ONESTEP=1, QWEN36_PREFIX_SNAP_PACK=1, QWEN36_PREFIX_CKPT_DEFER=1, QWEN36_PREFIX_HEAD_DEFER=1) and next-step host-tier stores (QWEN36_KV_TIER_STORE_DEFER=1), G2 bfp4 weights (/var/lib/models-sata/bfpq/packed-G2), image vllm-tt:k2-mr-pk3r plus the arm's store manifest. ttx render $BEST prints the exact docker argv.

$T doctor && $T slot status                     # cards free? MemAvailable >= 4 GB?
TTX_OWNER=<you> $T up $BEST --wait 14400        # queues for the mesh slot, boots (~257 s warm), identity check (S8 had 101 banners; S9 adds the two SSP ones, S10 the two SO_QKH ones, S11 the two DEVFEED ones, S12 the two DEVFEED_PAD ones, S12P the prefix-caching ones, S12PHV the host-tier and vsplit ones (109 at boot), S12PHV-SF the SNAP_FAST and STALL_DUMP ones, S12PHV-SFR the SCRATCH_RESUME one, the kv1m pool the three GDN_ID_POOL ones, S12PHV-L1234 the ONESTEP / SNAP_PACK / CKPT_DEFER / KV_TIER_STORE_DEFER ones (HEAD_DEFER and the CKPT_DEFER self-test print after traffic); the step self-test banners print after the first requests)
ssh -f -N -L 127.0.0.1:18000:127.0.0.1:8000 cfx-llm0   # the server binds :8000 on the box; it was not reachable off-box
curl http://127.0.0.1:18000/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model": "qwen3.8-27b-tt", "messages": [{"role": "user", "content": "hello"}], "max_tokens": 64, "temperature": 0}'
$T down $BEST                                   # graceful: docker stop -t 300 + wait, then the slot is released
  • Sampling: S12P (as S7..S12) serves the checkpoint's recommended sampling as the server default (--override-generation-config '{"min_p":0.0,"temperature":1.0,"top_k":20,"top_p":0.95}'). A request with temperature: 0 is greedy. A step whose rows are all greedy replays S6's greedy traces (dual trace families). Any sampled row switches the step to the sampled traces, where the fused sampler runs the exact rule, makes the noise and maps the draft-vocab ids on the device (S9). Per request, "vllm_xargs": {"tt_spec_rule": "compare"} picks sample-then-compare; any other value is a 400.
  • It needs both cards, so it cannot run beside production (tenstorrent-serving.service).
  • 16 streams or a 1M-token pool: scripts/serve-b16-1m.sh boots serve-b16-1m, an older arm (before C-split, so-t0, gdc and cpk) gated on 2026-10-02 (docs/SERVING.md §5b).

Tools

nix run .#tt-smi              # also tt-toplike, tt-topology, tt-perf-report
nix flake check               # formatting, host-module VM test, ttsim checks
nix develop ./nix/sim#runtime # Nix ttnn + simulator (docs/BUILD.md); ttsim is correctness only, never a speed number

nixos-llm consumes nixosModules.tenstorrent-host and nixosModules.tenstorrent-serving.

License

tt-stack is licensed under the Apache License 2.0, the same license as upstream tt-metal and vLLM that it builds on. You may use, modify and redistribute it, commercially or not. Keep the license text and any copyright notices when you redistribute it, and mark files you changed. Files adapted from third parties (for example the tt-metal/vLLM patches under patches/) keep their original SPDX headers and copyright lines. Model weights are not part of this repository and come under their own licenses.