bench: MTP harness borrow — decode telemetry + lossless sample-compare + EOS checkpoint token #134

Open
opened 2026-09-30 09:08:35 +02:00 by tenstorrent · 2 comments
Member

Parent / blocked-by tracking via #90 (amd-qwen / tinygrad borrow-adapt lane).

Grill call: GO (desk/harness first; no device until measure says so)

Hypothesis. Three portable harness pieces from the amd-qwen / tinygrad AMD path land as desk tooling before any silicon claim: (1) decode telemetry with host/device step breakdown comparable to the AMD path (feeds #93 Tracy story), (2) lossless MTP sample-compare — bit/token-level accept vs target sample compare harness, (3) checkpoint-token-before-end — don't drop/miscount the trailing checkpoint token at the EOS boundary. Combined because they are one harness lane, not three product bets.

Source. tinygrad / jacobrosenthal amd-qwen-on-master (AMD ROCm Qwen3.8). External — not TT silicon claims.

Depends on. Local MTP path (#82 / #63); Tracy naming story on #93 for telemetry usefulness.

Measure first. One concrete experiment: run a fixed MTP accept/reject corpus through the compare harness with telemetry on; assert bit/token agree with the reference accept mask, and that the EOS-adjacent checkpoint token is counted once (not dropped). Telemetry must emit host vs device step breakdown fields the #93 Tracy lane can consume.

Out of scope. RDNA micro-opts; ngram-DFlash / ngram oracle (already #98); MTP_DRAFT_VOCAB (own issue); device ports until the desk harness is green.

Refs: #90; related #82/#63 MTP, #93 Tracy, #98 ngram; grill 2026-09-29/30 Tenstorrent amd-qwen eval.

Parent / blocked-by tracking via #90 (amd-qwen / tinygrad borrow-adapt lane). ## Grill call: **GO** (desk/harness first; no device until measure says so) **Hypothesis.** Three portable harness pieces from the amd-qwen / tinygrad AMD path land as desk tooling before any silicon claim: (1) decode telemetry with host/device step breakdown comparable to the AMD path (feeds #93 Tracy story), (2) lossless MTP sample-compare — bit/token-level accept vs target sample compare harness, (3) checkpoint-token-before-end — don't drop/miscount the trailing checkpoint token at the EOS boundary. Combined because they are one harness lane, not three product bets. **Source.** tinygrad / jacobrosenthal amd-qwen-on-master (AMD ROCm Qwen3.8). External — not TT silicon claims. **Depends on.** Local MTP path (#82 / #63); Tracy naming story on #93 for telemetry usefulness. **Measure first.** One concrete experiment: run a fixed MTP accept/reject corpus through the compare harness with telemetry on; assert bit/token agree with the reference accept mask, and that the EOS-adjacent checkpoint token is counted once (not dropped). Telemetry must emit host vs device step breakdown fields the #93 Tracy lane can consume. **Out of scope.** RDNA micro-opts; ngram-DFlash / ngram oracle (already #98); MTP_DRAFT_VOCAB (own issue); device ports until the desk harness is green. Refs: #90; related #82/#63 MTP, #93 Tracy, #98 ngram; grill 2026-09-29/30 Tenstorrent amd-qwen eval.
Owner

Eval (2026-09-30): agree GO, narrowed to three gaps. Two of the three pieces already exist. Full write-up: docs/ISSUES-133-137-EVAL-2026-09-30.md.

  • Telemetry exists: QWEN36_MTP_BATCH_TIMING (branch mtpb-dn, 4af0836) splits prep/verify/rb/accept/commit/draft per bucket with device syncs; it is c115's -mtp-tm rung. Gap 1: ttx does not parse these lines into the record.

  • Lossless compare exists:

    • bench/batch-equiv-bench.py + near_tie_verdict and token-aligned regrade (bench/runs/mtp-batch-equiv-20260927T122949Z-regrade.jsonl);
    • the PLAIN_ONLY / FORCE_REJECT (BIT_EXACT) / commit_plus1 (must FAIL) rungs;
    • 22 host tests.

    The stronger version is TESTING-REVIEW §6 #7 (teacher-forced top-5 KL). Build that once; do not add a second compare.

  • Gap 2 (EOS): SchedulerSim covers the max_tokens trim only. There is no EOS or stop token inside an accepted block. Every MTP card run so far was --ignore-eos or 128 tokens, and the stats tokens/row-step may count trimmed post-EOS tokens. Gap 3: no to-EOS MTP rung on card.

  • Cheapest experiment (0 card-h, ~3 h): land the parser before c115 runs, so its record carries per_phase_ms. Add sim cases for EOS at the first token of a block, mid-block, on the bonus token, and a stop string. Must-fail: dropping the trim must break the position invariant. Later, +0.5 card-h: GSM8K N=50 to EOS on the MTP arm.

  • Priority: the only item in this lane worth doing before c115; off-card, today.

🤖 Generated with Claude Code

**Eval (2026-09-30): agree GO, narrowed to three gaps.** Two of the three pieces already exist. Full write-up: `docs/ISSUES-133-137-EVAL-2026-09-30.md`. - **Telemetry exists:** `QWEN36_MTP_BATCH_TIMING` (branch `mtpb-dn`, 4af0836) splits prep/verify/rb/accept/commit/draft per bucket with device syncs; it is c115's `-mtp-tm` rung. **Gap 1:** ttx does not parse these lines into the record. - **Lossless compare exists:** - `bench/batch-equiv-bench.py` + `near_tie_verdict` and token-aligned regrade (`bench/runs/mtp-batch-equiv-20260927T122949Z-regrade.jsonl`); - the PLAIN_ONLY / FORCE_REJECT (BIT_EXACT) / commit_plus1 (must FAIL) rungs; - 22 host tests. The stronger version is TESTING-REVIEW §6 #7 (teacher-forced top-5 KL). Build that once; do not add a second compare. - **Gap 2 (EOS):** `SchedulerSim` covers the max_tokens trim only. There is no EOS or stop token inside an accepted block. Every MTP card run so far was `--ignore-eos` or 128 tokens, and the `stats` tokens/row-step may count trimmed post-EOS tokens. **Gap 3:** no to-EOS MTP rung on card. - **Cheapest experiment (0 card-h, ~3 h):** land the parser before c115 runs, so its record carries `per_phase_ms`. Add sim cases for EOS at the first token of a block, mid-block, on the bonus token, and a stop string. Must-fail: dropping the trim must break the position invariant. Later, +0.5 card-h: GSM8K N=50 to EOS on the MTP arm. - **Priority:** the only item in this lane worth doing before c115; off-card, today. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Owner

Narrowed #134 is on mtpb-dn (ca4d7f5). No card time used and no speed number.

  • Parser: ttxlib/mtplog.py. Every sweep32k record of a QWEN36_MTP_BATCH=1 arm now has mtp_batch.per_ctx.<ctx>.timing.<bw>: per-phase mean/p50/p90 ms per step and tokens/row-step, plus a per-cell delta of the host stats. To support this, TIMING lines now carry t=, the row counts and per-step samples_ms. They are written every 16 steps and when the batch drains, so no window spans two cells.
  • EOS/stop in block: TestStopInBlock covers EOS at the first, middle and bonus token of a block, stop_token_ids, min_tokens/ignore_eos, max_tokens mid-block, a stop sequence with a delayed abort, a random mix, and slot reuse. The must-fail rungs are no-trim and an n (not n-1) advance.
  • No bug in the scheduler or accept path. The counter bias is confirmed and exact: host emitted = delivered + trimmed, so tokens/row-step over-counts by at most K per finished request. It is recorded as a caveat.
  • To-EOS rung: the equiv record has equiv.eos, and --require-eos fails a run where no stream stopped on EOS. The c115 lines (PLAIN_ONLY capture c115-mtpb-plain-eos at --tokens 1024, then a K=3 compare) are in MTP-BATCH.md §8a. The queue file is untouched.
  • Tests: 298 passed (tools/ttx/tests + tests/test_mtp_batch_host.py). ttx lint is OK on -mtp, -mtp-tm and -mtp-plain.

🤖 Generated with Claude Code

Narrowed #134 is on `mtpb-dn` (ca4d7f5). No card time used and no speed number. - **Parser:** `ttxlib/mtplog.py`. Every sweep32k record of a `QWEN36_MTP_BATCH=1` arm now has `mtp_batch.per_ctx.<ctx>.timing.<bw>`: per-phase mean/p50/p90 ms per step and tokens/row-step, plus a per-cell delta of the host stats. To support this, TIMING lines now carry `t=`, the row counts and per-step `samples_ms`. They are written every 16 steps and when the batch drains, so no window spans two cells. - **EOS/stop in block:** `TestStopInBlock` covers EOS at the first, middle and bonus token of a block, stop_token_ids, min_tokens/ignore_eos, max_tokens mid-block, a stop sequence with a delayed abort, a random mix, and slot reuse. The must-fail rungs are no-trim and an n (not n-1) advance. - **No bug** in the scheduler or accept path. The counter bias is confirmed and exact: host emitted = delivered + trimmed, so `tokens/row-step` over-counts by at most K per finished request. It is recorded as a caveat. - **To-EOS rung:** the equiv record has `equiv.eos`, and `--require-eos` fails a run where no stream stopped on EOS. The c115 lines (PLAIN_ONLY capture `c115-mtpb-plain-eos` at `--tokens 1024`, then a K=3 compare) are in MTP-BATCH.md §8a. The queue file is untouched. - **Tests:** 298 passed (tools/ttx/tests + tests/test_mtp_batch_host.py). ttx lint is OK on -mtp, -mtp-tm and -mtp-plain. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
bitpartner/tt-stack#134
No description provided.