grill: long-context (64k–128k) drafter acceptance — harness cells + lever board #212

Closed
opened 2026-10-09 08:38:08 +02:00 by tenstorrent · 6 comments
Member

Grill-first. Desk study only: no card runs, no code PRs until this grill is answered. Owner goal (D. H., 2026-10-09): raise TG (decode tok/s/user) at 64k–128k context, where the agents will run, mainly by getting the drafter to accept more tokens.
Tree read: master f30ab09 (CONTROL …-kvfold-dx-w2t-b8k3-cph48, PR #210). The upstream tenstorrent/tt-metal main was read on 2026-10-09.

Related: #90 (perf loop), #93–#98 (GO levers), #98 (ngram/lookup oracle), #190 (DSpark serve), #199 (chain2/sopt), #209 (geometry harness), #154 (CPB), #161 (Dual-NoC), #139 (adaptive K), #134 (MTP harness telemetry), #133 (draft vocab), #78 (k8v4), #96 (constrained K), #63 (MTP umbrella).


0. A definition fix comes first: the #98 bar is on the wrong scale

The served accept_rate is accepted / drafted, per draft token (patches/prod-local-metal/models/demos/blackhole/qwen36/tt/mtp_batch_host.py:802). The B=1 overlay's accept_rate() is mean accepted drafts per iteration (bench/mtp/overlay/models/demos/blackhole/qwen36/tt/spec_decode.py:784-786). The #98 bar (">1.599 accepted tokens/iter at B4/4k") read the served 0.599 as if it were the overlay quantity.

In the same record, B4/4k reports tokens_per_row_step 2.789 (accepted 2633 / drafted 4394; ttx-sweep32k-…-csplit-t0-gdc-cpk-… 2026-10-03, K=3). So the real bar for any MTP+X or DSpark stack is about 2.79 committed tokens per row-step (1.79 accepted drafts). A stacked drafter has to beat that figure, not 1.599.

Proposal: every new record carries tokens_per_row_step and accept_per_draft under those exact names. The bare accept_rate name is retired.

1. What the records show for acceptance vs context

I scanned every bench/runs/*.jsonl that has per_ctx.*.{mtp_stats|stats}.accept_rate: 1,014 cells.

  • Contexts covered: 4096 and 32768 only, except one cell above 32k: ttx-sweep32k-serve-b16-1m-20261002T175418Z.jsonl, B16, ctx 64000, K=1, accept 0.807. It is not usable as a long-context reference, for three reasons:
    • K=1 (bucket 16).
    • The code bodies wrap at that length (see §4).
    • The 4k/32k cells it would be compared against come from a different boot.
  • No 128k MTP acceptance record exists. There is also no record of acceptance by draft depth or by position.

Current CONTROL, CI run #7499 (ttx-sweep32k-…-w2t-b8k3-cph48-ab20261008T193735Z-r0.jsonl, n=1, K=3 in every bucket):

cell accept/draft tok/row-step TG ms/tok step ms (= TG × tok/row-step, derived)
B1/4k 0.572 2.712 14.42 39.1
B1/32k 0.511 2.530 15.94 40.3 (+3%)
B4/4k 0.621 2.857 14.66 41.9
B4/32k 0.584 2.748 16.51 45.4 (+8%)
B8/4k 0.663 2.983 15.74 47.0
B8/32k 0.567 2.697 20.36 54.9 (+17%)
  • Going from 4k to 32k loses acceptance in every pair. Paired over all records with the shipped 8:2,4:3,… map:
    • B1: median Δ −0.013 (n=107; 93% of pairs negative);
    • B4: −0.025 (n=138; 96% negative);
    • B8 (K=2): −0.077 (n=170; 98% negative);
    • B8 at K=3: −0.094 (n=5).
  • Decomposition, 4k→32k (derived):
    • B1: about two thirds of the TG loss is acceptance (tok/row-step −6.7%) and one third is step cost (+3.1%).
    • B8: acceptance is −9.6% and step cost +16.9%.
  • Per-B acceptance is not a batch effect. It is the prompt mix (bench/batch-equiv-bench.py:109-134):
    • B1 runs only p0_prose_free;
    • B4 runs the four prose prompts p0–p3;
    • B8 adds p4 and three code prompts.
    • Do not read "B8 accepts more" as a batching property.
  • The B1 cells are dominated by trajectory chaos. With a single prompt, any bit-level change to the numerics changes the greedy trajectory. Across arms on the same K map, B1 jumps between a handful of discrete values spanning about 0.1: 0.474–0.573 at 4k and 0.452–0.546 at 32k. So per-arm Δaccept at B1 of about ±0.05 is not evidence about the drafter's quality.
  • Warm-tail evidence (c139, B8, K=3):
    • cold → warm-2048 is +0.076 at 4k (0.5685→0.6442) but only +0.019 at 32k (0.5542→0.5735);
    • must-fail at 32k is 0.5569, essentially the same as cold.
    • Records: ttx-sweep32k-…-mtp-stack-20260930T231547Z.jsonl, …-mtp-stack-warm-20261001T021550Z.jsonl, …-mtp-stack-warm-mf-20261001T030430Z.jsonl.
  • Draft vocab (dv32k) gets worse with context: B1 −0.10 at 32k vs −0.03 at 4k (…-dv32k-ab20261003T003751Z-r0.jsonl). It is not shipped, which is correct.
  • swpk B1/4k ≈0.505 (run 7502) is reported by the parent agent, but the record is not on master. Gap.

2. What degrades MTP acceptance at long context in OUR stack (ranked by how likely each is to matter)

  1. The drafter sees only the last 2,048 prompt tokens. This is the main suspect.
    • QWEN36_MTP_WARM_TAIL is capped at 2048 (mtp_batch_host.py:352-354, WARM_BUCKETS=(128…2048)).
    • The MTP KV is indexed pos − origin with origin = L−2048 (mtp_batch_host.py:340-349; docs/MTP-BATCH.md:86-95, §13a).
    • So at 128k the head attends over about 2k of prompt plus the generated tokens: 1.6% coverage, against 50% at 4k. That is a train/inference mismatch: Qwen's MTP layer was trained with full causal attention.
    • Upstream warms the whole prompt chunk by chunk: tt-metal main models/demos/blackhole/qwen36/tt/spec_decode.py _warm_mtp_chunk, docstring: "with an empty cache at the first draft, acceptance collapses". That is #55548, merged 2026-10-02; docs/MTP.md:18 still says "open", which is stale.
    • The c139 pattern (warm gain shrinks from +0.076 to +0.019 as coverage drops) fits this.
  2. The warm KV is built from prefill-path hiddens, while decode reseeds from verify-path hiddens.
    • The warm pass consumes the prefill residual (mtp_batch.py:389-413), whose numerics come from bf8 prefill norm, LoFi prefill SDPA and PREFILL_MLP_LOWP.
    • With a full warm, about 99% of the drafter's context at 128k would come from the prefill path. So every prefill-numerics lever becomes an acceptance lever; swpk is the warning case.
    • Upstream measured how sensitive acceptance is to this kind of path mismatch: a composite-vs-fused GDN disagreement of about 1e-5 dropped accept from 2.82 to 2.00 of 3 (#55548 review D5).
  3. MTP head KV is tied to k8v4. allocate_kv refuses any MTP KV dtype that differs from the main caches (mtp_batch.py:882-896), so V is bf4 for the head. With N keys, bf8 K noise flattens the softmax over more competitors as context grows. Unmeasured.
  4. Draft-chain numerics:
    • mtp.fc is bf8, HiFi2 (mtp_batch.py:157-165, :204-206);
    • the shared bf4 LoFi lm_head (QWEN36_LMHEAD_FID=lofi, lmlofi) and the csplit path apply to both target and draft.
    • These are context-independent first-order effects. They matter only if they interact with mechanisms 1–3.
  5. GDN state is bf16 (QWEN35_GDN_STATE_BF16=1) over 128k recurrence steps. Drift moves the target, and the head (trained on bf16-exact hiddens) sees off-manifold inputs. This is second-order for acceptance because verify defines truth.
  6. RoPE / YaRN: not a suspect at ≤128k.
    • model_config.py:51-66 reads rope_parameters (θ=1e7, default type, partial rotary, attention_scaling 1.0).
    • Qwen3.x native context is 262,144; YaRN only appears past that (serving/speculative/dspark_reference.py:406-409).
    • The warm pass uses absolute RoPE (§13a). Keep a must-fail (RoPE+1) in any warm change.
  7. kvfold / kvd: kvfold is a bit-exact KV-update fold (LEDGER R-2026-10-06-kvfold). kvd is boot-only, and its records show B1 acceptance identical to its control (0.5243/0.5183). Not suspects.

3. Levers (ESTIMATES unless a record is cited)

Model: TG ∝ tok_per_row_step / step_ms, with tok/row-step ≈ 1 + K·a.

Linear extrapolation of the CONTROL step cost (derived, not measured): B8 step ≈ 64 ms at 64k and ≈ 82 ms at 128k. B1 ≈ 44.5 ms at 128k. At B8/128k, +0.05 accept/draft at K=3 is worth about +5.5% TG.

# lever expected TG at 64–128k effort gate first
L1 Full-prompt MTP warm (upstream parity), or a sink+window W ∈ {8k, 32k, full}. Extend _MTPWarm from the last chunk to every prefill chunk (segment-add already exists) +5…12% if the coverage hypothesis holds (a back to roughly the 4k level). Cost: warm ≈1/65 of prefill (TTFT), plus K draft steps × 1 layer reading the full MTP KV (≈3/16 of the base attention KV bytes per step at K=3) M (Python, no kernel) host oracle W-sweep on captured hiddens. Must-fail pair_minus1 and RoPE+1 at 128k
L2 Hybrid MTP + prompt-lookup/suffix drafts per row. Use lookup when a suffix match ≥ n exists in the 64–128k context (tool output, file being edited), else MTP. Drafts are only ids into the existing verify, so plan.n_draft[b] is already per-row Workload-shaped. On copy-heavy agent turns tok/row-step can reach the K+1 = 4 cap (+48% over 2.7). On free text ≈0 (lookup alone 1.16–1.41/block, lookup-draft-acceptance-20260919T0400Z.jsonl) M (host plan, no kernel at K≤3) #98 oracle, but on real long agent transcripts, not synthetic edits
L3 Harness: 64k/128k cells + acceptance-by-depth/position telemetry (§4) 0 by itself; gates L1, L2, L4–L6 L —
L4 Per-row K / K by (bucket, ctx), extending #139 to MTP. Drop drafts via n_draft below break-even, and go deeper where the T≤4 kvfold cap allows ±3% at B8. Mostly protects B1/B4 if acceptance collapses at 128k. K≥4 already lost at B1/4k (LEVERS.md:112-114). Re-measure the verify slope at 64k/128k: c131 gave +6.2→+10.4 ms per extra T at B4, but that was before spec-fold and kvfold L–M depth histogram from L3
L5 Decouple MTP KV dtype (bf8/bf8 or bf16), lifting the refusal at mtp_batch.py:892-896 small–moderate, unknown. Memory: +0.2…1.2 GiB/chip at a 1M pool L oracle: k8v4-emulated vs bf16 head KV at 128k
L6 Prefill-numerics acceptance gate: every prefill LoFi/bf8 lever must pass a 64k/128k accept check once L1 lands protects against −0.05…−0.07 regressions (swpk-class) L (policy + harness) —
L7 DSpark (#190). DFlash2's native window is 2048 (dflash2-accept-thinkingcap-20260930T164522Z.jsonl manifest), so it may have the same coverage limit short-ctx oracle 3.00/3.95 tokens/round at K=3/7; long ctx unknown H (in flight; card screen blocked on the mesh slot) its own card screen at 64k
L8 Tree/multi-candidate drafts ruled out at B8 (M≤32). At B1/B4 the GDN per-branch state makes it expensive H not now
L9 fp32 GDN state target quality more than acceptance; costs decode bandwidth M not a TG lever

Combos.

  • L1+L2 are complementary: warm helps MTP on novel text, lookup takes the copy spans.
  • L2+L4 share the per-row n_draft plumbing.
  • L1+L5+L6 form one precision story for the drafter's context.

Upstream notes.

  • tt-metal #55548 (merged): full-prompt warm. Auto-K is 11 up to a 4k prompt and 7 above (B=1). The PR's B=1 table shows 34.75 tok/s at 64k and 46.08 at 128k (non-monotonic, single runs).
  • tt-metal #42491: DeepSeek dynamic speculation depth per user; "depth>3 no speedup".
  • vLLM ships method: suffix (Arctic Inference), which pattern-matches over prompt and output with adaptive draft length: https://docs.vllm.ai/en/latest/features/speculative_decoding/suffix/ (NeurIPS'25 SuffixDecoding; 1.3–3× over PLD end-to-end on OpenHands/SWE-Bench).
  • Long-context drafting literature: LongSpec (ACL'26: constant-KV drafter, position-index fix for short-train/long-infer mismatch), SpecExtend (Findings ACL'26: cross-model retrieval of the drafter KV by target attention), MagicDec (sparse-KV self-spec; acceptance holds better with KV compression than with model compression).

4. Harness gap and proposal

Corpus defect at ≥64k.

  • bench/serving-bench.py:123-126 wraps bodies with body = body + body once a body exceeds the corpus.
  • The code corpus is 126,387 chars (≈35k tokens) and prose v1 is 272,760 chars (≈76k tokens).
  • So a 64k code prompt and every 128k prompt contain the corpus verbatim twice. That inflates both MTP acceptance and lookup acceptance.
  • Prose v2 (523,515 chars, ≈145k tokens) holds one 128k body but not 4–8 disjoint ones.

Proposed corpus: agent-v1. Sha-pinned, committed, strict-disjoint at 128k × 8 (≈3.8 M chars). It is built from multi-turn tool transcripts in the qwen3_xml tool format over our own trees: tt-stack and the tt-metal qwen36 sources, rg/git diff/pytest outputs, LEDGER excerpts. Three task tails per kind:

kind task
(a) edit "return the modified file" (copy-heavy)
(b) analyse free text
(c) new write a new function or test

Report acceptance per kind. Keep the old corpus at 32k as the continuity anchor.

Cells and memory. Basis: the CONTROL boot uses 14,144 B per token per chip (13,312 base K8/V4 + 832 MTP head). The B8 boot freed 4,838 MiB at pool 786,432 with a 1,280 MiB trace (bench/arms/serve-b16-1m.toml header). Card usable DRAM is 31.87 GiB before trace (docs/HARDWARE.md:25).

cell tokens pool fits?
B1/B4 × 64k/128k, B8/64k ≤ 533k current 786,432 yes; only max_model_len changes (suite param, tools/ttx/ttxlib/suites.py:399)
B8/128k 8 × (130,048 prompt + 1,024 out) = 1,048,576 1,048,576 +262,144 tokens × 14,144 B = +3.45 GiB/chip vs 4.72 GiB free → about 1.2 GiB margin (ESTIMATE; boot is the proof). Same pool as serve-b16-1m, which booted on 10-02 at B16 with MTP

Metrics to add. Host-only and logit-inert; extend mtp_batch_host.finish()/summary() at :778-805:

  • accept_hist[m] for m = 0..K, per bucket, which gives the per-depth conditional acceptance;
  • acceptance by absolute position bucket (prompt-length cell × generated-offset bins of 128);
  • warm_kept vs re-origin counts;
  • per-kind (a/b/c) splits;
  • saved completions as token ids, so the lookup and suffix oracles (L2) and a teacher-forced MTP oracle (L1, L5) can replay offline without new card time.

Statistics.

  • At least 8 prompts per cell at B1 (run them sequentially), never a single prompt (see the chaos note in §1).
  • Report the mean ± spread over prompts.
  • Arm deltas are judged on teacher-forced oracle acceptance where possible. Served acceptance is confounded by trajectory divergence.

5. Proposed first card screen (NOT run; needs owner OK)

LC0: CONTROL-only baseline, 1 rep.

  • Arm A: …-w2t-b8k3-cph48, B1/B4/B8 × {32k anchor, 64k, 128k}, with B8/128k excluded.
  • Arm A-lc128: the same tree with QWEN36_MAX_TOKENS_ALL_USERS=1048576, max_model_len 131072, B8/128k only.
  • Corpus: agent-v1, plus the old corpus at 32k.
  • With the inert stats patch (L3) landed first.
  • Card time ≈ 40–50 card-min (ESTIMATE: B8/128k prefill ≈1.05M tokens at ~5–6k tok/s ≈ 3–3.5 min per cell; 2 boots).
  • Deliverable: the first acceptance-vs-context curve to 128k, per-depth histograms, and token-id captures.
  • Then the host oracles: W-sweep for L1, KV-dtype what-if for L5, suffix/lookup on the captured agent streams for L2.
  • Only then the L1/L2 implementation PRs, and a second card screen of -warmfull (+must-fail) vs CONTROL at 64k/128k.

Grill questions

  1. Accept the definition fix in §0 and re-base the #98/#190 stacking bar to 2.79 tok/row-step at B4/4k?
  2. Is the agent-v1 corpus (§4) acceptable as the long-context bench, with the old corpus retired above 32k because of the wrap?
  3. Is B8/128k at pool 1,048,576 with 130,048-token prompts the right definition of "128k"? (GOALS' 1,081,344 figure is for prefix-caching align mode.)
  4. L1: is full warm parity with upstream preferred, or a bounded sink+window (cheaper draft steps at 128k)? Decide after the oracle W-sweep.
  5. L2 policy: lookup replaces MTP per row when it matches, or lookup fills the drafts after MTP's first draft? And what minimum match length?
  6. Approve LC0 (≈40–50 card-min) once L3 has landed?

Desk work by agent Tenstorrent. No card time used.

Grill-first. **Desk study only: no card runs, no code PRs** until this grill is answered. Owner goal (D. H., 2026-10-09): raise TG (decode tok/s/user) at **64k–128k** context, where the agents will run, mainly by getting the drafter to accept more tokens. Tree read: master `f30ab09` (CONTROL `…-kvfold-dx-w2t-b8k3-cph48`, PR #210). The upstream `tenstorrent/tt-metal` main was read on 2026-10-09. Related: #90 (perf loop), #93–#98 (GO levers), #98 (ngram/lookup oracle), #190 (DSpark serve), #199 (chain2/sopt), #209 (geometry harness), #154 (CPB), #161 (Dual-NoC), #139 (adaptive K), #134 (MTP harness telemetry), #133 (draft vocab), #78 (k8v4), #96 (constrained K), #63 (MTP umbrella). --- ## 0. A definition fix comes first: the #98 bar is on the wrong scale The served `accept_rate` is **accepted / drafted, per draft token** (`patches/prod-local-metal/models/demos/blackhole/qwen36/tt/mtp_batch_host.py:802`). The B=1 overlay's `accept_rate()` is **mean accepted drafts per iteration** (`bench/mtp/overlay/models/demos/blackhole/qwen36/tt/spec_decode.py:784-786`). The #98 bar (">1.599 accepted tokens/iter at B4/4k") read the served 0.599 as if it were the overlay quantity. In the same record, B4/4k reports `tokens_per_row_step` **2.789** (accepted 2633 / drafted 4394; `ttx-sweep32k-…-csplit-t0-gdc-cpk-…` 2026-10-03, K=3). So the real bar for any MTP+X or DSpark stack is about **2.79 committed tokens per row-step (1.79 accepted drafts)**. A stacked drafter has to beat that figure, not 1.599. **Proposal:** every new record carries `tokens_per_row_step` and `accept_per_draft` under those exact names. The bare `accept_rate` name is retired. ## 1. What the records show for acceptance vs context I scanned every `bench/runs/*.jsonl` that has `per_ctx.*.{mtp_stats|stats}.accept_rate`: 1,014 cells. - **Contexts covered:** 4096 and 32768 only, except **one** cell above 32k: `ttx-sweep32k-serve-b16-1m-20261002T175418Z.jsonl`, B16, ctx 64000, **K=1**, accept 0.807. It is not usable as a long-context reference, for three reasons: - K=1 (bucket 16). - The code bodies wrap at that length (see §4). - The 4k/32k cells it would be compared against come from a different boot. - **No 128k MTP acceptance record exists.** There is also no record of acceptance by draft depth or by position. Current CONTROL, CI run #7499 (`ttx-sweep32k-…-w2t-b8k3-cph48-ab20261008T193735Z-r0.jsonl`, n=1, K=3 in every bucket): | cell | accept/draft | tok/row-step | TG ms/tok | step ms (= TG × tok/row-step, derived) | |---|---|---|---|---| | B1/4k | 0.572 | 2.712 | 14.42 | 39.1 | | B1/32k | 0.511 | 2.530 | 15.94 | 40.3 (+3%) | | B4/4k | 0.621 | 2.857 | 14.66 | 41.9 | | B4/32k | 0.584 | 2.748 | 16.51 | 45.4 (+8%) | | B8/4k | 0.663 | 2.983 | 15.74 | 47.0 | | B8/32k | 0.567 | 2.697 | 20.36 | 54.9 (+17%) | - **Going from 4k to 32k loses acceptance in every pair.** Paired over all records with the shipped `8:2,4:3,…` map: - B1: median Δ −0.013 (n=107; 93% of pairs negative); - B4: −0.025 (n=138; 96% negative); - B8 (K=2): −0.077 (n=170; 98% negative); - B8 at K=3: −0.094 (n=5). - **Decomposition, 4k→32k (derived):** - B1: about two thirds of the TG loss is acceptance (tok/row-step −6.7%) and one third is step cost (+3.1%). - B8: acceptance is −9.6% and step cost +16.9%. - **Per-B acceptance is not a batch effect.** It is the prompt mix (`bench/batch-equiv-bench.py:109-134`): - B1 runs only `p0_prose_free`; - B4 runs the four prose prompts p0–p3; - B8 adds p4 and three code prompts. - Do not read "B8 accepts more" as a batching property. - **The B1 cells are dominated by trajectory chaos.** With a single prompt, any bit-level change to the numerics changes the greedy trajectory. Across arms on the same K map, B1 jumps between a handful of discrete values spanning about 0.1: 0.474–0.573 at 4k and 0.452–0.546 at 32k. So per-arm Δaccept at B1 of about ±0.05 is not evidence about the drafter's quality. - **Warm-tail evidence (c139, B8, K=3):** - cold → warm-2048 is **+0.076 at 4k** (0.5685→0.6442) but only **+0.019 at 32k** (0.5542→0.5735); - must-fail at 32k is 0.5569, essentially the same as cold. - Records: `ttx-sweep32k-…-mtp-stack-20260930T231547Z.jsonl`, `…-mtp-stack-warm-20261001T021550Z.jsonl`, `…-mtp-stack-warm-mf-20261001T030430Z.jsonl`. - **Draft vocab (`dv32k`) gets worse with context:** B1 −0.10 at 32k vs −0.03 at 4k (`…-dv32k-ab20261003T003751Z-r0.jsonl`). It is not shipped, which is correct. - **swpk B1/4k ≈0.505** (run 7502) is reported by the parent agent, but the record is **not on master**. Gap. ## 2. What degrades MTP acceptance at long context in OUR stack (ranked by how likely each is to matter) 1. **The drafter sees only the last 2,048 prompt tokens.** This is the main suspect. - `QWEN36_MTP_WARM_TAIL` is capped at 2048 (`mtp_batch_host.py:352-354`, `WARM_BUCKETS=(128…2048)`). - The MTP KV is indexed `pos − origin` with origin = L−2048 (`mtp_batch_host.py:340-349`; `docs/MTP-BATCH.md:86-95`, §13a). - So at 128k the head attends over about 2k of prompt plus the generated tokens: **1.6% coverage, against 50% at 4k**. That is a train/inference mismatch: Qwen's MTP layer was trained with full causal attention. - **Upstream warms the whole prompt chunk by chunk:** `tt-metal` main `models/demos/blackhole/qwen36/tt/spec_decode.py` `_warm_mtp_chunk`, docstring: "with an empty cache at the first draft, acceptance collapses". That is #55548, **merged 2026-10-02**; docs/MTP.md:18 still says "open", which is stale. - The c139 pattern (warm gain shrinks from +0.076 to +0.019 as coverage drops) fits this. 2. **The warm KV is built from prefill-path hiddens**, while decode reseeds from verify-path hiddens. - The warm pass consumes the prefill residual (`mtp_batch.py:389-413`), whose numerics come from bf8 prefill norm, LoFi prefill SDPA and `PREFILL_MLP_LOWP`. - With a full warm, about 99% of the drafter's context at 128k would come from the prefill path. So **every prefill-numerics lever becomes an acceptance lever**; swpk is the warning case. - Upstream measured how sensitive acceptance is to this kind of path mismatch: a composite-vs-fused GDN disagreement of about 1e-5 dropped accept from 2.82 to 2.00 of 3 (#55548 review D5). 3. **MTP head KV is tied to k8v4.** `allocate_kv` refuses any MTP KV dtype that differs from the main caches (`mtp_batch.py:882-896`), so V is bf4 for the head. With N keys, bf8 K noise flattens the softmax over more competitors as context grows. Unmeasured. 4. **Draft-chain numerics:** - `mtp.fc` is bf8, HiFi2 (`mtp_batch.py:157-165`, `:204-206`); - the shared bf4 LoFi lm_head (`QWEN36_LMHEAD_FID=lofi`, `lmlofi`) and the `csplit` path apply to both target and draft. - These are context-independent first-order effects. They matter only if they interact with mechanisms 1–3. 5. **GDN state** is bf16 (`QWEN35_GDN_STATE_BF16=1`) over 128k recurrence steps. Drift moves the target, and the head (trained on bf16-exact hiddens) sees off-manifold inputs. This is second-order for acceptance because verify defines truth. 6. **RoPE / YaRN:** not a suspect at ≤128k. - `model_config.py:51-66` reads `rope_parameters` (θ=1e7, default type, partial rotary, `attention_scaling` 1.0). - Qwen3.x native context is 262,144; YaRN only appears past that (`serving/speculative/dspark_reference.py:406-409`). - The warm pass uses absolute RoPE (§13a). Keep a must-fail (RoPE+1) in any warm change. 7. **kvfold / kvd:** kvfold is a bit-exact KV-update fold (LEDGER `R-2026-10-06-kvfold`). kvd is boot-only, and its records show B1 acceptance identical to its control (0.5243/0.5183). Not suspects. ## 3. Levers (ESTIMATES unless a record is cited) Model: TG ∝ tok_per_row_step / step_ms, with tok/row-step ≈ 1 + K·a. Linear extrapolation of the CONTROL step cost (derived, not measured): B8 step ≈ 64 ms at 64k and ≈ 82 ms at 128k. B1 ≈ 44.5 ms at 128k. At B8/128k, **+0.05 accept/draft at K=3 is worth about +5.5% TG**. | # | lever | expected TG at 64–128k | effort | gate first | |---|---|---|---|---| | L1 | **Full-prompt MTP warm** (upstream parity), or a sink+window W ∈ {8k, 32k, full}. Extend `_MTPWarm` from the last chunk to every prefill chunk (segment-add already exists) | +5…12% if the coverage hypothesis holds (a back to roughly the 4k level). Cost: warm ≈1/65 of prefill (TTFT), plus K draft steps × 1 layer reading the full MTP KV (≈3/16 of the base attention KV bytes per step at K=3) | M (Python, no kernel) | host oracle W-sweep on captured hiddens. Must-fail pair_minus1 and RoPE+1 at 128k | | L2 | **Hybrid MTP + prompt-lookup/suffix drafts per row.** Use lookup when a suffix match ≥ n exists in the 64–128k context (tool output, file being edited), else MTP. Drafts are only ids into the existing verify, so `plan.n_draft[b]` is already per-row | Workload-shaped. On copy-heavy agent turns tok/row-step can reach the K+1 = 4 cap (+48% over 2.7). On free text ≈0 (lookup alone 1.16–1.41/block, `lookup-draft-acceptance-20260919T0400Z.jsonl`) | M (host plan, no kernel at K≤3) | #98 oracle, but on **real long agent transcripts**, not synthetic edits | | L3 | **Harness: 64k/128k cells + acceptance-by-depth/position telemetry** (§4) | 0 by itself; gates L1, L2, L4–L6 | L | — | | L4 | **Per-row K / K by (bucket, ctx)**, extending #139 to MTP. Drop drafts via `n_draft` below break-even, and go deeper where the T≤4 kvfold cap allows | ±3% at B8. Mostly protects B1/B4 if acceptance collapses at 128k. K≥4 already lost at B1/4k (LEVERS.md:112-114). Re-measure the verify slope at 64k/128k: c131 gave +6.2→+10.4 ms per extra T at B4, but that was before spec-fold and kvfold | L–M | depth histogram from L3 | | L5 | **Decouple MTP KV dtype** (bf8/bf8 or bf16), lifting the refusal at `mtp_batch.py:892-896` | small–moderate, unknown. Memory: +0.2…1.2 GiB/chip at a 1M pool | L | oracle: k8v4-emulated vs bf16 head KV at 128k | | L6 | **Prefill-numerics acceptance gate**: every prefill LoFi/bf8 lever must pass a 64k/128k accept check once L1 lands | protects against −0.05…−0.07 regressions (swpk-class) | L (policy + harness) | — | | L7 | **DSpark** (#190). DFlash2's native window is 2048 (`dflash2-accept-thinkingcap-20260930T164522Z.jsonl` manifest), so it may have the same coverage limit | short-ctx oracle 3.00/3.95 tokens/round at K=3/7; long ctx unknown | H (in flight; card screen blocked on the mesh slot) | its own card screen at 64k | | L8 | Tree/multi-candidate drafts | ruled out at B8 (M≤32). At B1/B4 the GDN per-branch state makes it expensive | H | not now | | L9 | fp32 GDN state | target quality more than acceptance; costs decode bandwidth | M | not a TG lever | **Combos.** - L1+L2 are complementary: warm helps MTP on novel text, lookup takes the copy spans. - L2+L4 share the per-row `n_draft` plumbing. - L1+L5+L6 form one precision story for the drafter's context. **Upstream notes.** - tt-metal #55548 (merged): full-prompt warm. Auto-K is 11 up to a 4k prompt and 7 above (B=1). The PR's B=1 table shows 34.75 tok/s at 64k and 46.08 at 128k (non-monotonic, single runs). - tt-metal #42491: DeepSeek dynamic speculation depth per user; "depth>3 no speedup". - vLLM ships `method: suffix` (Arctic Inference), which pattern-matches over prompt and output with adaptive draft length: https://docs.vllm.ai/en/latest/features/speculative_decoding/suffix/ (NeurIPS'25 SuffixDecoding; 1.3–3× over PLD end-to-end on OpenHands/SWE-Bench). - Long-context drafting literature: LongSpec (ACL'26: constant-KV drafter, position-index fix for short-train/long-infer mismatch), SpecExtend (Findings ACL'26: cross-model retrieval of the drafter KV by target attention), MagicDec (sparse-KV self-spec; acceptance holds better with KV compression than with model compression). ## 4. Harness gap and proposal **Corpus defect at ≥64k.** - `bench/serving-bench.py:123-126` wraps bodies with `body = body + body` once a body exceeds the corpus. - The code corpus is 126,387 chars (≈35k tokens) and prose v1 is 272,760 chars (≈76k tokens). - So a 64k code prompt and **every** 128k prompt contain the corpus verbatim twice. That inflates both MTP acceptance and lookup acceptance. - Prose v2 (523,515 chars, ≈145k tokens) holds one 128k body but not 4–8 disjoint ones. **Proposed corpus: agent-v1.** Sha-pinned, committed, strict-disjoint at 128k × 8 (≈3.8 M chars). It is built from multi-turn tool transcripts in the `qwen3_xml` tool format over our own trees: tt-stack and the tt-metal qwen36 sources, `rg`/`git diff`/pytest outputs, LEDGER excerpts. Three task tails per kind: | kind | task | |---|---| | (a) edit | "return the modified file" (copy-heavy) | | (b) analyse | free text | | (c) new | write a new function or test | Report acceptance per kind. Keep the old corpus at 32k as the continuity anchor. **Cells and memory.** Basis: the CONTROL boot uses 14,144 B per token per chip (13,312 base K8/V4 + 832 MTP head). The B8 boot freed 4,838 MiB at pool 786,432 with a 1,280 MiB trace (`bench/arms/serve-b16-1m.toml` header). Card usable DRAM is 31.87 GiB before trace (`docs/HARDWARE.md:25`). | cell | tokens | pool | fits? | |---|---|---|---| | B1/B4 × 64k/128k, B8/64k | ≤ 533k | current 786,432 | **yes**; only `max_model_len` changes (suite param, `tools/ttx/ttxlib/suites.py:399`) | | B8/128k | 8 × (130,048 prompt + 1,024 out) = 1,048,576 | 1,048,576 | +262,144 tokens × 14,144 B = **+3.45 GiB/chip** vs 4.72 GiB free → about 1.2 GiB margin (ESTIMATE; boot is the proof). Same pool as serve-b16-1m, which booted on 10-02 at B16 with MTP | **Metrics to add.** Host-only and logit-inert; extend `mtp_batch_host.finish()`/`summary()` at `:778-805`: - `accept_hist[m]` for m = 0..K, per bucket, which gives the per-depth conditional acceptance; - acceptance by absolute position bucket (prompt-length cell × generated-offset bins of 128); - `warm_kept` vs re-origin counts; - per-kind (a/b/c) splits; - saved completions as token ids, so the lookup and suffix oracles (L2) and a teacher-forced MTP oracle (L1, L5) can replay offline without new card time. **Statistics.** - At least 8 prompts per cell at B1 (run them sequentially), never a single prompt (see the chaos note in §1). - Report the mean ± spread over prompts. - Arm deltas are judged on teacher-forced oracle acceptance where possible. Served acceptance is confounded by trajectory divergence. ## 5. Proposed first card screen (NOT run; needs owner OK) **LC0: CONTROL-only baseline, 1 rep.** - Arm A: `…-w2t-b8k3-cph48`, B1/B4/B8 × {32k anchor, 64k, 128k}, with B8/128k excluded. - Arm A-lc128: the same tree with `QWEN36_MAX_TOKENS_ALL_USERS=1048576`, `max_model_len 131072`, B8/128k only. - Corpus: agent-v1, plus the old corpus at 32k. - With the inert stats patch (L3) landed first. - Card time ≈ 40–50 card-min (ESTIMATE: B8/128k prefill ≈1.05M tokens at ~5–6k tok/s ≈ 3–3.5 min per cell; 2 boots). - **Deliverable:** the first acceptance-vs-context curve to 128k, per-depth histograms, and token-id captures. - **Then** the host oracles: W-sweep for L1, KV-dtype what-if for L5, suffix/lookup on the captured agent streams for L2. - Only then the L1/L2 implementation PRs, and a second card screen of `-warmfull` (+must-fail) vs CONTROL at 64k/128k. ## Grill questions 1. Accept the definition fix in §0 and re-base the #98/#190 stacking bar to **2.79 tok/row-step at B4/4k**? 2. Is the agent-v1 corpus (§4) acceptable as the long-context bench, with the old corpus retired above 32k because of the wrap? 3. Is B8/128k at pool 1,048,576 with 130,048-token prompts the right definition of "128k"? (GOALS' 1,081,344 figure is for prefix-caching align mode.) 4. L1: is full warm parity with upstream preferred, or a bounded sink+window (cheaper draft steps at 128k)? Decide after the oracle W-sweep. 5. L2 policy: lookup replaces MTP per row when it matches, or lookup fills the drafts after MTP's first draft? And what minimum match length? 6. Approve LC0 (≈40–50 card-min) once L3 has landed? Desk work by agent Tenstorrent. No card time used.
Author
Member

LC0 results: CONTROL …-dx-w2t-b8k3-cph48, agent-v1 corpus, 1 rep

PR #219 · run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/517 (id 7539) · artifact 631 (bench-runs). The cards ran 09:29–10:08 Prague. The CI job is red because serving-bench cell checks failed (cause below). The host MTP counters and captures are complete for every cell.

Acceptance and TG per B × ctx

These are host counters over each cell window, K=3, greedy exact accept. tok/row-step is emitted tokens per row-step.

B ctx accept tok/row-step d1 / d2 / d3 (conditional) TG ms/tok/user (tok/s) TTFT max
1 32k 0.7182 3.148 .875 / .825 / .772 12.748 (78.44), 8/8 waves 5.1 s
1 64k 0.7133 3.134 .880 / .809 / .770 partial: 13.148 (76.06), 7/8 waves 11.0 s
1 128k 0.7551* 3.258* .941 / .892 / .578 partial: 13.435 (74.43), 7/8 waves* 25.3 s
4 32k 0.7140 3.136 .873 / .817 / .779 14.910 (67.07), 2/2 waves 20.2 s
4 64k 0.7125 3.131 .874 / .814 / .777 partial: 15.679 (63.78), 1/2 waves 43.2 s
4 128k 0.6826 3.042 .903 / .845 / .501 partial: 19.695 (50.77), 1/2 waves 100.1 s
8 32k 0.7406 3.215 .891 / .836 / .788 17.294 (57.82) 40.6 s
8 64k 0.7306 3.185 .886 / .830 / .776 not measured —
8 128k (pool 1,081,344) 0.7111 3.127 .894 / .842 / .648 not measured —
  • Bold TG means the cell passed all checks. "Partial" means the mean over the waves that produced decode timing. Some of those waves failed the low-entropy check, so treat partial values as indicative only.
  • * Contaminated by degenerate tails (see caveat).
  • mhist m=0/1/2/3:
    • B1: 32k 333/398/428/1450 · 64k 322/439/428/1433 · 128k 156/256/890/1219
    • B4: 32k 340/417/411/1452 · 64k 338/426/414/1446 · 128k 269/378/1025/1029
    • B8: 32k 286/373/401/1494 · 64k 302/387/423/1468 · 128k 286/371/694/1276

B8/128k boot

The pool1081k arm (QWEN36_MAX_TOKENS_ALL_USERS=1081344) booted in 229 s with no OOM. All 8 requests (prompts of 130.4k–131.2k tokens) decoded 1025–1029 tokens each, and acceptance was measured. TG was not recorded because serving-bench rejected the cell (same cause as below).

Caveat: why the 64k/128k TG cells failed

The server runs --enable-auto-tool-choice --tool-call-parser qwen3_xml. Agent-format prompts make the model answer with tool calls, and the parser moves those out of content. Streams then arrive with no or short content, so serving-bench returns ok=False with an empty errors list.

On top of that, under ignore_eos the model keeps going after its turn ends, in <|im_start|>/newline loops. Some analyse/new docs at 128k have a distinct-token fraction of only 0.04–0.06. These loops inflate the B1/B4 128k d1/d2 and B1 128k overall numbers.

The edit docs are clean and are the trustworthy long-context signal.

What the data says

  1. Acceptance does not degrade with context on CONTROL. Edit-only acceptance from captures is 0.760 / 0.768 / 0.769 at B1 for 32k / 64k / 128k. All 32k and 64k cells sit at 0.71–0.74.
  2. Output position matters more than context. By output step, acceptance is ≈0.60–0.65 for steps 1–7 and ≈0.48–0.55 for steps 8–31 (the lowest). It is ≈0.64–0.71 for steps 32–127 and ≈0.72–0.81 for steps 128+. Rows whose prompt sat just under the ctx bin (early output) show the same dip.
  3. Depth-3 drops at 128k only: d3 is .50–.65 at 128k vs .77–.79 at 32k/64k.
    • It appears both below and above position 131072, so it is not a 2^17 boundary.
    • It also appears in the clean B8 cell.
    • This is open and should be investigated by replaying the captures (drafter step-3 numerics / RoPE at large positions).
  4. Offline prompt-lookup replay (B1 captures, n=3 suffix match against prompt+generated, at the served step boundaries; mean accepted tokens/step):
kind ctx MTP K=3 (served) lookup K=3 lookup K=8 naive mix K=8 (lookup when matched, else MTP)
edit 32k / 64k / 128k 2.27 / 2.30 / 2.30 2.50 / 2.52 / 2.46 6.32 / 6.35 / 6.23 6.33 / 6.36 / 6.24
analyse 32k / 64k 2.12 / 2.03 1.12 / 1.03 2.52 / 2.32 3.45 / 3.23
new 32k / 64k 2.01 / 2.31 0.26 / 0.58 0.34 / 0.76 1.71 / 1.80 (worse)

The 128k analyse/new rows are omitted because of the loops. This replay is an acceptance-only estimate: it ignores verify cost at width 9 and holds the step boundaries fixed.

What the saved ids enable

There are 169 request captures (B8 24 incl. warm, B4 52, B1 77, pool 16). Each has the exact greedy output ids plus per-step m/nd, and the prompts can be rebuilt bit-exactly from the corpus fixture + cut_chars. That allows, with no cards:

  • lookup/suffix drafter replay and gating rules (above);
  • warm-tail/window sensitivity replay;
  • the d3-at-128k investigation;
  • KV-dtype teacher-forced replay.

Recommendation

  • First lever PR: lookup mix, gated per row. Use prompt-lookup drafts with K up to 8 when the suffix match is strong, and MTP K=3 otherwise. Width fits at B1–B3 (Bw·(K+1) ≤ 32); at B8 keep K=3 and only swap the draft source.
    • On copy-heavy edit streams the replay shows ~2.7× accepted tokens/step.
    • A naive gate hurts "new" docs, so the PR needs a match-length/recent-hit gate. Tune it on the captures first.
  • Full-prompt MTP warm second. It targets the step 1–31 deficit, which is roughly the first 10% of steps. Even lifting those steps to 0.75 is worth only about +2% overall acceptance. Context-length degradation, the thing it would fix, is not observed.
  • Bench fix before the next LC screen: disable the tool parser for the bench (or send tool_choice:"none"), and/or drop ignore_eos for agent prompts. That makes 64k/128k TG valid and removes the degenerate tails.
## LC0 results: CONTROL `…-dx-w2t-b8k3-cph48`, agent-v1 corpus, 1 rep PR #219 · run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/517 (id 7539) · artifact 631 (`bench-runs`). The cards ran 09:29–10:08 Prague. The CI job is red because serving-bench cell checks failed (cause below). The host MTP counters and captures are complete for every cell. ### Acceptance and TG per B × ctx These are host counters over each cell window, K=3, greedy exact accept. tok/row-step is emitted tokens per row-step. | B | ctx | accept | tok/row-step | d1 / d2 / d3 (conditional) | TG ms/tok/user (tok/s) | TTFT max | |---|---|---|---|---|---|---| | 1 | 32k | 0.7182 | 3.148 | .875 / .825 / .772 | **12.748 (78.44)**, 8/8 waves | 5.1 s | | 1 | 64k | 0.7133 | 3.134 | .880 / .809 / .770 | partial: 13.148 (76.06), 7/8 waves | 11.0 s | | 1 | 128k | 0.7551* | 3.258* | .941 / .892 / .578 | partial: 13.435 (74.43), 7/8 waves* | 25.3 s | | 4 | 32k | 0.7140 | 3.136 | .873 / .817 / .779 | **14.910 (67.07)**, 2/2 waves | 20.2 s | | 4 | 64k | 0.7125 | 3.131 | .874 / .814 / .777 | partial: 15.679 (63.78), 1/2 waves | 43.2 s | | 4 | 128k | 0.6826 | 3.042 | .903 / .845 / .501 | partial: 19.695 (50.77), 1/2 waves | 100.1 s | | 8 | 32k | 0.7406 | 3.215 | .891 / .836 / .788 | **17.294 (57.82)** | 40.6 s | | 8 | 64k | 0.7306 | 3.185 | .886 / .830 / .776 | not measured | — | | 8 | 128k (pool 1,081,344) | 0.7111 | 3.127 | .894 / .842 / .648 | not measured | — | - Bold TG means the cell passed all checks. "Partial" means the mean over the waves that produced decode timing. Some of those waves failed the low-entropy check, so treat partial values as indicative only. - \* Contaminated by degenerate tails (see caveat). - mhist m=0/1/2/3: - B1: 32k 333/398/428/1450 · 64k 322/439/428/1433 · 128k 156/256/890/1219 - B4: 32k 340/417/411/1452 · 64k 338/426/414/1446 · 128k 269/378/1025/1029 - B8: 32k 286/373/401/1494 · 64k 302/387/423/1468 · 128k 286/371/694/1276 ### B8/128k boot The pool1081k arm (`QWEN36_MAX_TOKENS_ALL_USERS=1081344`) booted in 229 s with no OOM. All 8 requests (prompts of 130.4k–131.2k tokens) decoded 1025–1029 tokens each, and acceptance was measured. TG was not recorded because serving-bench rejected the cell (same cause as below). ### Caveat: why the 64k/128k TG cells failed The server runs `--enable-auto-tool-choice --tool-call-parser qwen3_xml`. Agent-format prompts make the model answer with tool calls, and the parser moves those out of `content`. Streams then arrive with no or short content, so serving-bench returns ok=False with an empty errors list. On top of that, under `ignore_eos` the model keeps going after its turn ends, in `<|im_start|>`/newline loops. Some analyse/new docs at 128k have a distinct-token fraction of only 0.04–0.06. These loops inflate the B1/B4 128k d1/d2 and B1 128k overall numbers. The **edit** docs are clean and are the trustworthy long-context signal. ### What the data says 1. **Acceptance does not degrade with context on CONTROL.** Edit-only acceptance from captures is 0.760 / 0.768 / 0.769 at B1 for 32k / 64k / 128k. All 32k and 64k cells sit at 0.71–0.74. 2. **Output position matters more than context.** By output step, acceptance is ≈0.60–0.65 for steps 1–7 and ≈0.48–0.55 for steps 8–31 (the lowest). It is ≈0.64–0.71 for steps 32–127 and ≈0.72–0.81 for steps 128+. Rows whose prompt sat just under the ctx bin (early output) show the same dip. 3. **Depth-3 drops at 128k only:** d3 is .50–.65 at 128k vs .77–.79 at 32k/64k. - It appears both below and above position 131072, so it is not a 2^17 boundary. - It also appears in the clean B8 cell. - This is open and should be investigated by replaying the captures (drafter step-3 numerics / RoPE at large positions). 4. **Offline prompt-lookup replay** (B1 captures, n=3 suffix match against prompt+generated, at the served step boundaries; mean accepted tokens/step): | kind | ctx | MTP K=3 (served) | lookup K=3 | lookup K=8 | naive mix K=8 (lookup when matched, else MTP) | |---|---|---|---|---|---| | edit | 32k / 64k / 128k | 2.27 / 2.30 / 2.30 | 2.50 / 2.52 / 2.46 | 6.32 / 6.35 / 6.23 | 6.33 / 6.36 / 6.24 | | analyse | 32k / 64k | 2.12 / 2.03 | 1.12 / 1.03 | 2.52 / 2.32 | 3.45 / 3.23 | | new | 32k / 64k | 2.01 / 2.31 | 0.26 / 0.58 | 0.34 / 0.76 | 1.71 / 1.80 (worse) | The 128k analyse/new rows are omitted because of the loops. This replay is an acceptance-only estimate: it ignores verify cost at width 9 and holds the step boundaries fixed. ### What the saved ids enable There are 169 request captures (B8 24 incl. warm, B4 52, B1 77, pool 16). Each has the exact greedy output ids plus per-step m/nd, and the prompts can be rebuilt bit-exactly from the corpus fixture + `cut_chars`. That allows, with no cards: - lookup/suffix drafter replay and gating rules (above); - warm-tail/window sensitivity replay; - the d3-at-128k investigation; - KV-dtype teacher-forced replay. ### Recommendation - **First lever PR: lookup mix**, gated per row. Use prompt-lookup drafts with K up to 8 when the suffix match is strong, and MTP K=3 otherwise. Width fits at B1–B3 (Bw·(K+1) ≤ 32); at B8 keep K=3 and only swap the draft source. - On copy-heavy edit streams the replay shows ~2.7× accepted tokens/step. - A naive gate hurts "new" docs, so the PR needs a match-length/recent-hit gate. Tune it on the captures first. - **Full-prompt MTP warm second.** It targets the step 1–31 deficit, which is roughly the first 10% of steps. Even lifting those steps to 0.75 is worth only about +2% overall acceptance. Context-length degradation, the thing it would fix, is not observed. - **Bench fix before the next LC screen:** disable the tool parser for the bench (or send `tool_choice:"none"`), and/or drop `ignore_eos` for agent prompts. That makes 64k/128k TG valid and removes the degenerate tails.
Author
Member

LC0 follow-up: bench fix, depth-3 at 128k, lookup-mix grill

Bench fix: #221 (based on lc0-agent-corpus-stats, not master, so it started no CI and no cards).

  • Why tool_choice:"none" wouldn't help. In streaming, vLLM 0.25's parser engine runs the tool parser whatever tool_choice is (_in_tool_call_phase), and "none" is already the default.
  • What #221 does. --token-ids (implied by --corpus agent-v1) sends return_token_ids. Timing, token counts and output identity then come from the streamed ids. The variety guard grades only the answer, i.e. the ids before the first <|im_end|>, taken from the server's /tokenize; in the served vocabulary that is 248046, not Qwen3's 151645.
  • ignore_eos stays, so the output length stays fixed at 1024.
  • Tests: 15/15 local in test_lc0.
  • Merging #221 into the LC0 branch re-triggers #219's cards, so that waits for the card queue.
  • One cell may still fail, correctly. In the B1/128k doc a5, the answer itself is a degenerate loop of repeated <tool_call>{"function": "read_file"} blocks (distinct-id fraction 0.03). The same doc at B4/B8 is fine (0.33–0.37), so greedy output there depends on batch composition. The fixed guard would still flag that B1 cell. That's the right call, and it deserves a look of its own.

Depth-3 drop at 128k: it comes from ignore_eos, not long context. Conditional d1/d2/d3, split at the first <|im_end|>:

ctx edit answer new answer analyse answer analyse post-EOS tail
32k .938/.829/.733 .840/.828/.805 .805/.763/.712 .899/.890/.879
64k .944/.837/.730 .855/.828/.831 .748/.637/.607 .900/.883/.860
128k .945/.840/.737 .855/.821/.847 .749/.557/.400 .943/.938/.281
  • The 128k analyse tails include period-3 loops like \n<|im_start|><|im_end|>. MTP gets depths 1–2 right there and misses depth 3 (2,396 depth-3 tries in those tails), and that is what pulled the cell-level d3 down.
  • Edit and new answers have the same d3 at 128k as at 32k.
  • Analyse answers do lose d2/d3 as context grows, but on small samples (865 / 606 / 160 depth-3 tries) and with shorter answers. This is open and low priority.
  • Net: no long-context drafter collapse on CONTROL.

Lookup-mix grill: #98 comment #98 (comment). Offline gate on the 72 LC0 requests, answer corpus, ℓ≥12; TG figures are estimates using the #191 cost slope:

  • Step 1, swap the draft source only at the same K: about +7% TG on every bucket, +13–14% on edit.
  • Step 2, K=7 at B1/B4: +28% at B1 and +13% at B4 under the upper cost bound; edit +61% / +47%.
## LC0 follow-up: bench fix, depth-3 at 128k, lookup-mix grill **Bench fix: #221** (based on `lc0-agent-corpus-stats`, not master, so it started no CI and no cards). - **Why `tool_choice:"none"` wouldn't help.** In streaming, vLLM 0.25's parser engine runs the tool parser whatever `tool_choice` is (`_in_tool_call_phase`), and `"none"` is already the default. - **What #221 does.** `--token-ids` (implied by `--corpus agent-v1`) sends `return_token_ids`. Timing, token counts and output identity then come from the streamed ids. The variety guard grades only the answer, i.e. the ids before the first `<|im_end|>`, taken from the server's `/tokenize`; in the served vocabulary that is 248046, not Qwen3's 151645. - **ignore_eos stays,** so the output length stays fixed at 1024. - **Tests:** 15/15 local in `test_lc0`. - **Merging** #221 into the LC0 branch re-triggers #219's cards, so that waits for the card queue. - **One cell may still fail, correctly.** In the B1/128k doc a5, the *answer* itself is a degenerate loop of repeated `<tool_call>{"function": "read_file"}` blocks (distinct-id fraction 0.03). The same doc at B4/B8 is fine (0.33–0.37), so greedy output there depends on batch composition. The fixed guard would still flag that B1 cell. That's the right call, and it deserves a look of its own. **Depth-3 drop at 128k: it comes from ignore_eos, not long context.** Conditional d1/d2/d3, split at the first `<|im_end|>`: | ctx | edit answer | new answer | analyse answer | analyse post-EOS tail | |---|---|---|---|---| | 32k | .938/.829/.733 | .840/.828/.805 | .805/.763/.712 | .899/.890/.879 | | 64k | .944/.837/.730 | .855/.828/.831 | .748/.637/.607 | .900/.883/.860 | | 128k | .945/.840/.737 | .855/.821/.847 | .749/.557/.400 | **.943/.938/.281** | - The 128k analyse tails include period-3 loops like `\n<|im_start|><|im_end|>`. MTP gets depths 1–2 right there and misses depth 3 (2,396 depth-3 tries in those tails), and that is what pulled the cell-level d3 down. - Edit and new answers have the same d3 at 128k as at 32k. - Analyse answers do lose d2/d3 as context grows, but on small samples (865 / 606 / 160 depth-3 tries) and with shorter answers. This is open and low priority. - **Net: no long-context drafter collapse on CONTROL.** **Lookup-mix grill: #98 comment** https://git.bitp.cz/bitpartner/tt-stack/issues/98#issuecomment-13551. Offline gate on the 72 LC0 requests, answer corpus, ℓ≥12; TG figures are estimates using the #191 cost slope: - Step 1, swap the draft source only at the same K: about +7% TG on every bucket, +13–14% on edit. - Step 2, K=7 at B1/B4: +28% at B1 and +13% at B4 under the upper cost bound; edit +61% / +47%.
Author
Member

LC0 (#212) revalidation (PR #219) on master 90fe3e6 (CONTROL E-dfr) vs 10 Oct (CONTROL …-dx-w2t-b8k3-cph48)

Run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/727 (id 9047), head 267c627e, 1 rep, agent-v1 corpus. Every number is copied from the CI screen reports: today's #219 (comment), and 10 Oct's #219 (comment). Δ TG is relative and Δ accept is absolute. "Early-bin accept" is the lowest base-position bin in the per-position table, the first steps of each request's decode.

B ctx TG tok/s/user 10-10 → 10-16 (Δ) ms/tok 10-10 → 10-16 accept 10-10 → 10-16 (Δ) early-bin accept 10-10 → 10-16
8 32768 58.51 → 58.65 (+0.24%) 17.092 → 17.050 0.7401 → 0.7401 (+0.0000) 0.4444 → 0.4444 (pos≥16384, rows 124)
8 65536 49.38 → 49.38 (+0.00%) 20.251 → 20.251 0.7312 → 0.7306 (-0.0006) 0.6018 → 0.6018 (pos≥49152, rows 188)
8 131072 39.61 → not measured 25.246 → — 0.7108 → — 0.6682 (pos≥114688) → —
4 32768 67.02 → 66.98 (-0.06%) 14.921 → 14.930 0.7108 → 0.7108 (+0.0000) 0.4463 → 0.4463 (pos≥16384, rows 125)
4 65536 61.71 → 61.55 (-0.26%) 16.204 → 16.246 0.7100 → 0.7114 (+0.0014) 0.6262 → 0.6262 (pos≥49152, rows 184)
4 131072 52.71 → 52.71 (+0.00%) 18.970 → 18.971 0.6826 → 0.6813 (-0.0013) 0.6447 → 0.6447 (pos≥114688, rows 689)
1 32768 77.56 → 77.73 (+0.22%) 12.893 → 12.865 0.7182 → 0.7182 (+0.0000) 0.4317 → 0.4317 (pos≥16384, rows 126)
1 65536 75.44 → 75.44 (+0.00%) 13.255 → 13.255 0.7133 → 0.7133 (+0.0000) 0.6138 → 0.6138 (pos≥49152, rows 186)
1 131072 75.33 → 75.19 (-0.19%) 13.275 → 13.300 0.7551 → 0.7551 (+0.0000) 0.6667 → 0.6667 (pos≥114688, rows 674)

Read: both runs are n=1. On E-dfr, TG moves between -0.26% and +0.24% at every measured cell, and accept is identical or within ±0.0014. Early-bin accept and the per-depth rates match 10 Oct to the digit, except tiny moves at B4/65k, B4/128k and B8/65k. So E-dfr leaves long-context MTP acceptance and TG where cph48 had them. This is not a speed claim.

Same as 10 Oct: run 1 exits 1 on the B=1 ctx=131072 serving-bench cell check (wave 6/8 ok=False). The table still reports that cell's numbers, as it did on 10 Oct.

pool1081k (B=8 × 128k): not measured. The run refused, it did not run out of memory. ttx run refused because a container named ttx-mesh-…-dfr-lc0-pool1081k already existed. That container was left over from cancelled run 724. It was stopped (docker stop), not removed, to free the mesh, and the exited container kept its name. The DRAM headroom question for pool1081k on E-dfr is still open. A rerun needs that exited container removed first (ttx down …-dfr-lc0-pool1081k, as the refusal suggests).

## LC0 (#212) revalidation (PR #219) on master 90fe3e6 (CONTROL E-dfr) vs 10 Oct (CONTROL `…-dx-w2t-b8k3-cph48`) Run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/727 (id 9047), head 267c627e, 1 rep, agent-v1 corpus. Every number is copied from the CI screen reports: today's https://git.bitp.cz/bitpartner/tt-stack/pulls/219#issuecomment-17821, and 10 Oct's https://git.bitp.cz/bitpartner/tt-stack/pulls/219#issuecomment-14642. Δ TG is relative and Δ accept is absolute. "Early-bin accept" is the lowest base-position bin in the per-position table, the first steps of each request's decode. | B | ctx | TG tok/s/user 10-10 → 10-16 (Δ) | ms/tok 10-10 → 10-16 | accept 10-10 → 10-16 (Δ) | early-bin accept 10-10 → 10-16 | | --- | --- | --- | --- | --- | --- | | 8 | 32768 | 58.51 → 58.65 (+0.24%) | 17.092 → 17.050 | 0.7401 → 0.7401 (+0.0000) | 0.4444 → 0.4444 (pos≥16384, rows 124) | | 8 | 65536 | 49.38 → 49.38 (+0.00%) | 20.251 → 20.251 | 0.7312 → 0.7306 (-0.0006) | 0.6018 → 0.6018 (pos≥49152, rows 188) | | 8 | 131072 | 39.61 → not measured | 25.246 → — | 0.7108 → — | 0.6682 (pos≥114688) → — | | 4 | 32768 | 67.02 → 66.98 (-0.06%) | 14.921 → 14.930 | 0.7108 → 0.7108 (+0.0000) | 0.4463 → 0.4463 (pos≥16384, rows 125) | | 4 | 65536 | 61.71 → 61.55 (-0.26%) | 16.204 → 16.246 | 0.7100 → 0.7114 (+0.0014) | 0.6262 → 0.6262 (pos≥49152, rows 184) | | 4 | 131072 | 52.71 → 52.71 (+0.00%) | 18.970 → 18.971 | 0.6826 → 0.6813 (-0.0013) | 0.6447 → 0.6447 (pos≥114688, rows 689) | | 1 | 32768 | 77.56 → 77.73 (+0.22%) | 12.893 → 12.865 | 0.7182 → 0.7182 (+0.0000) | 0.4317 → 0.4317 (pos≥16384, rows 126) | | 1 | 65536 | 75.44 → 75.44 (+0.00%) | 13.255 → 13.255 | 0.7133 → 0.7133 (+0.0000) | 0.6138 → 0.6138 (pos≥49152, rows 186) | | 1 | 131072 | 75.33 → 75.19 (-0.19%) | 13.275 → 13.300 | 0.7551 → 0.7551 (+0.0000) | 0.6667 → 0.6667 (pos≥114688, rows 674) | **Read:** both runs are n=1. On E-dfr, TG moves between -0.26% and +0.24% at every measured cell, and accept is identical or within ±0.0014. Early-bin accept and the per-depth rates match 10 Oct to the digit, except tiny moves at B4/65k, B4/128k and B8/65k. So E-dfr leaves long-context MTP acceptance and TG where cph48 had them. This is not a speed claim. **Same as 10 Oct:** run 1 exits 1 on the B=1 ctx=131072 serving-bench cell check (wave 6/8 `ok=False`). The table still reports that cell's numbers, as it did on 10 Oct. **pool1081k (B=8 × 128k): not measured. The run refused, it did not run out of memory.** `ttx run` refused because a container named `ttx-mesh-…-dfr-lc0-pool1081k` already existed. That container was left over from cancelled run 724. It was stopped (`docker stop`), not removed, to free the mesh, and the exited container kept its name. The DRAM headroom question for pool1081k on E-dfr is still open. A rerun needs that exited container removed first (`ttx down …-dfr-lc0-pool1081k`, as the refusal suggests).
Author
Member

LC0 (#212) on CONTROL S, PR #219, (master ffb4bf91) vs E-dfr (16 Oct) and cph48 (10 Oct)

Run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/737 (id 9120), head 21aeb525, 1 rep, agent-v1 corpus. Every number is copied from the CI screen reports: S #219 (comment), E-dfr (run 727) #219 (comment), and 10 Oct #219 (comment). TG is in tok/s/user, and ΔTG is relative. "Early-bin" is the accept rate in the lowest base-position bin (pos ≥ ctx − 16k, the first decode steps).

B ctx TG 10-10 / E-dfr / S ΔTG S vs E-dfr ΔTG S vs 10-10 accept 10-10 / E-dfr / S early-bin 10-10 / E-dfr / S
8 32768 58.51 / 58.65 / 62.89 +7.23% +7.49% 0.7401 / 0.7401 / 0.7869 0.4444 / 0.4444 / 0.7548
8 65536 49.38 / 49.38 / 53.79 +8.93% +8.93% 0.7312 / 0.7306 / 0.7574 0.6018 / 0.6018 / 0.8004
8 131072 39.61 / — / 41.30 — +4.27% 0.7108 / — / 0.7117 0.6682 / — / 0.7355
4 32768 67.02 / 66.98 / 73.73 +10.08% +10.01% 0.7108 / 0.7108 / 0.7688 0.4463 / 0.4463 / 0.6996
4 65536 61.71 / 61.55 / 65.94 +7.13% +6.85% 0.7100 / 0.7114 / 0.7427 0.6262 / 0.6262 / 0.7849
4 131072 52.71 / 52.71 / 57.93 +9.90% +9.90% 0.6826 / 0.6813 / 0.7425 0.6447 / 0.6447 / 0.7126
1 32768 77.56 / 77.73 / 85.31 +9.75% +9.99% 0.7182 / 0.7182 / 0.7764 0.4317 / 0.4317 / 0.7266
1 65536 75.44 / 75.44 / 80.18 +6.28% +6.28% 0.7133 / 0.7133 / 0.7371 0.6138 / 0.6138 / 0.807
1 131072 75.33 / 75.19 / 79.74 +6.05% +5.85% 0.7551 / 0.7551 / 0.7754 0.6667 / 0.6667 / 0.7418

Read (n=1 each):

  • S raises long-context TG by +6.0% to +10.1% over E-dfr at every measured cell.
  • Mean accept rises from about 0.68–0.76 to 0.71–0.79.
  • Early-bin accept rises sharply: for example B1/32k 0.4317 → 0.7266 and B8/32k 0.4444 → 0.7548. That fits dv64k + wtspan improving the first speculative steps. The early bins hold fewer rows on S (91–155 vs 124–188), because fewer row-steps are needed per request.
  • At B8×128k, TG is +4.27% vs 10 Oct and accept is flat (0.7108 → 0.7117).

pool1081k (B=8 × 128k) on S: the boot succeeded (answered after 212.7 s), with no out-of-memory error. The 1,081,344-token pool fits on S, and all eight 128k requests ran: 41.30 tok/s/user (24.211 ms/tok), TTFT max 202.6 s, accept 0.7117, early-bin 0.7355. The E-dfr B8×128k cell was never measured, because its 16 Oct pool1081k run was refused.

Same as before: run 1 exits 1 on the B=1 ctx=131072 serving-bench cell check (wave 6/8 ok=False), as on 10 Oct and in run 727. The table still reports that cell's numbers.

Host: this run left no container behind on cfx-llm2. The only container there (…-dfr-dv64k-wtspan) belongs to another run and was left alone.

## LC0 (#212) on CONTROL S, PR #219, (master ffb4bf91) vs E-dfr (16 Oct) and cph48 (10 Oct) Run https://git.bitp.cz/bitpartner/tt-stack/actions/runs/737 (id 9120), head 21aeb525, 1 rep, agent-v1 corpus. Every number is copied from the CI screen reports: S https://git.bitp.cz/bitpartner/tt-stack/pulls/219#issuecomment-17933, E-dfr (run 727) https://git.bitp.cz/bitpartner/tt-stack/pulls/219#issuecomment-17821, and 10 Oct https://git.bitp.cz/bitpartner/tt-stack/pulls/219#issuecomment-14642. TG is in tok/s/user, and ΔTG is relative. "Early-bin" is the accept rate in the lowest base-position bin (pos ≥ ctx − 16k, the first decode steps). | B | ctx | TG 10-10 / E-dfr / S | ΔTG S vs E-dfr | ΔTG S vs 10-10 | accept 10-10 / E-dfr / S | early-bin 10-10 / E-dfr / S | |---|---|---|---|---|---|---| | 8 | 32768 | 58.51 / 58.65 / 62.89 | +7.23% | +7.49% | 0.7401 / 0.7401 / 0.7869 | 0.4444 / 0.4444 / 0.7548 | | 8 | 65536 | 49.38 / 49.38 / 53.79 | +8.93% | +8.93% | 0.7312 / 0.7306 / 0.7574 | 0.6018 / 0.6018 / 0.8004 | | 8 | 131072 | 39.61 / — / 41.30 | — | +4.27% | 0.7108 / — / 0.7117 | 0.6682 / — / 0.7355 | | 4 | 32768 | 67.02 / 66.98 / 73.73 | +10.08% | +10.01% | 0.7108 / 0.7108 / 0.7688 | 0.4463 / 0.4463 / 0.6996 | | 4 | 65536 | 61.71 / 61.55 / 65.94 | +7.13% | +6.85% | 0.7100 / 0.7114 / 0.7427 | 0.6262 / 0.6262 / 0.7849 | | 4 | 131072 | 52.71 / 52.71 / 57.93 | +9.90% | +9.90% | 0.6826 / 0.6813 / 0.7425 | 0.6447 / 0.6447 / 0.7126 | | 1 | 32768 | 77.56 / 77.73 / 85.31 | +9.75% | +9.99% | 0.7182 / 0.7182 / 0.7764 | 0.4317 / 0.4317 / 0.7266 | | 1 | 65536 | 75.44 / 75.44 / 80.18 | +6.28% | +6.28% | 0.7133 / 0.7133 / 0.7371 | 0.6138 / 0.6138 / 0.807 | | 1 | 131072 | 75.33 / 75.19 / 79.74 | +6.05% | +5.85% | 0.7551 / 0.7551 / 0.7754 | 0.6667 / 0.6667 / 0.7418 | **Read (n=1 each):** - S raises long-context TG by +6.0% to +10.1% over E-dfr at every measured cell. - Mean accept rises from about 0.68–0.76 to 0.71–0.79. - Early-bin accept rises sharply: for example B1/32k 0.4317 → 0.7266 and B8/32k 0.4444 → 0.7548. That fits dv64k + wtspan improving the first speculative steps. The early bins hold fewer rows on S (91–155 vs 124–188), because fewer row-steps are needed per request. - At B8×128k, TG is +4.27% vs 10 Oct and accept is flat (0.7108 → 0.7117). **pool1081k (B=8 × 128k) on S:** the boot succeeded (answered after 212.7 s), with no out-of-memory error. The 1,081,344-token pool fits on S, and all eight 128k requests ran: 41.30 tok/s/user (24.211 ms/tok), TTFT max 202.6 s, accept 0.7117, early-bin 0.7355. The E-dfr B8×128k cell was never measured, because its 16 Oct pool1081k run was refused. **Same as before:** run 1 exits 1 on the B=1 ctx=131072 serving-bench cell check (wave 6/8 `ok=False`), as on 10 Oct and in run 727. The table still reports that cell's numbers. **Host:** this run left no container behind on cfx-llm2. The only container there (`…-dfr-dv64k-wtspan`) belongs to another run and was left alone.
Member

Delivered: the corpus, 64k–128k cells and capture telemetry landed (PR #219-era lineage) and the 64k/128k TG upgrade shipped in R-2026-10-16-ship-s; the grill answered itself — no long-context acceptance collapse (edit 0.760→0.769 at 32→128k), the 128k d3 drop was an ignore_eos artifact. Residues re-homed: lookup → R-2026-10-18-lk12-s2 reopen clause; K-by-ctx → R-2026-10-18-k-sweep-s2 NO-GO. Verified 2026-11-18.

Delivered: the corpus, 64k–128k cells and capture telemetry landed (PR #219-era lineage) and the 64k/128k TG upgrade shipped in R-2026-10-16-ship-s; the grill answered itself — no long-context acceptance collapse (edit 0.760→0.769 at 32→128k), the 128k d3 drop was an ignore_eos artifact. Residues re-homed: lookup → R-2026-10-18-lk12-s2 reopen clause; K-by-ctx → R-2026-10-18-k-sweep-s2 NO-GO. 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
3 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#212
No description provided.