Skip to content

Tune the plain, MTP and DFlash baselines and define the tuned arms - #57

Merged
SamMausberg merged 14 commits into
mainfrom
bench/baselines
Oct 1, 2026
Merged

SamMausberg merged 14 commits into
mainfrom
bench/baselines

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

This PR tunes the speculative and plain baselines on the tune split and defines the arms that the confirmation sweep, the quality check and every later before/after comparison will use. Confirmation results on the held-out split will come in a separate PR.

How the tuning was done

All runs used the tune split of mixed-v2, client concurrency 1, 8, 32 and 128, max(32, 4c) measured requests per point, 512 fixed output tokens, greedy decoding with thinking on, --stream-interval 4, and host-load recording. Each configuration ran once. Three slots were used (bench/campaigns/tuning_depth.sh, tuning_knobs_dflash.sh, tuning_backend_dflash.sh), 92 points in all. Three points are invalid for host contention (mean foreign load above 2 cores) and were excluded from every choice. Full tables, invalid points and rejected configurations are in the tuning/ section of evidence/bench/README.md.

What decided the configuration

  • Speculation wins at low concurrency and loses at high. MTP s3 is 1.65x plain at c=1 but trails it from c~32 up (9.6K vs 13.4K tok/s at c=128).
  • GDN verify cost is a likely mechanism. Verify keeps one recurrent-state snapshot per draft token per request. By the derivation in the README (labelled derived), each snapshot is 50.3 MB of FP32 state, about 0.6 TB/s of writes for MTP s3 at c=128.
  • Buffered verify recovers much of the loss. SGLang's --enable-linear-replayssm-spec replaces the snapshots and gains 24% at c=128 for 3% at c=1. Depth barely matters at low concurrency (s3-s5 within 4%), and s3 is best at high concurrency.
  • Without the radix cache, plain is +3% and MTP +5% at c=128. That setting is required for DFlash block 8 at capacity 128 and for deeper drafts. This workload has no prefix reuse, so the tuned arms state it as their policy.
  • Triton attention helps every speculative family at low concurrency (MTP +17%, DFlash +18% at c=1) and hurts at c=128. Plain decoding is indifferent. Following the integrator's rule, each speculative family therefore has a Triton arm for the low end and a FlashInfer arm for the high end, with plain under both backends as matched baselines.
  • DFlash (z-lab/Qwen3.5-4B-DFlash at a pinned revision) is the strongest speculator at low concurrency. Block 16 under Triton reaches 851 tok/s at c=1, or 957 tok/s per user, 3.4x plain. Block 8 with FA4 draft attention, which runs on sm_90 and helped at every valid point, covers capacity 128. Block 16 cannot fit capacity 128: its 16 verify states per request need about 0.8 GB.
  • Rejected at launch, not on performance:
    • DFlash with buffered verify (refused on non-KDA models at this commit);
    • buffered verify with FlashInfer GDN decode (NotImplementedError);
    • tc_piecewise prefill graphs (torch.compile failure on Qwen3.5);
    • SGLang's adaptive depth, which ran but dropped to zero draft steps at c=128 and still stayed below plain, so it lost on performance as well.

Arms (bench/arms.toml)

Arm Flags (beyond the bench defaults and radix cache off) Role
plain-tuned / plain-tuned-triton attention FlashInfer / Triton arm A, matched baselines
plain-tuned-replayssm --enable-linear-replayssm buffered GDN decode, high concurrency
mtp-tuned / mtp-tuned-triton NEXTN s3 top-1, --enable-linear-replayssm-spec, FlashInfer / Triton arm B, high / low concurrency
mtp-stockverify NEXTN s3 top-1, stock verify exact-stack fallback for arm B
dflash-tuned block 8, FA4 draft attention, FlashInfer arm C, all concurrencies
dflash-tuned-b16 block 16, Triton, capacity 64 arm C, low concurrency

The arms with buffered GDN state carry lossy = "pending ...". Their greedy outputs are being classified against plain with the state workstream's comparator, against the 3.42/1K plain batch-1 vs batch-32 floor (bench/campaigns/equality_tuned.sh, queued). Each one stays on the exact-stack frontier only if it falls within that floor.

Other changes

  • KV cap. The bench defaults now cap --max-total-tokens at 1M. Without it, radix-off configurations with buffered verify ran out of memory in prefill: SGLang gave about 2M tokens to the target KV cache and then allocated the draft KV outside the static pool.
  • Launch-check fix. The launch check no longer demands a draft-decode graph from one-step MTP, which has none.
  • Campaigns. The confirmation campaign runs six arms per repeat, each over its own concurrency list (c up to 128 with 48 and 96 added to locate the crossover). A supplementary campaign covers the fallback arms. The quality campaign takes a list of arms.

Validation

  • pytest tests/test_bench_harness.py: 27 passed, including a test for the one-step MTP launch check.
  • pre-commit passes on all changed files.
  • Every tuning launch that produced points passed the strict launch checks: graphs to capacity, overlap scheduler, capacity, backend and speculative settings. The DFlash runs that used --no-strict passed them too (checked from launch.json).

Review round 1

  • B1 (bench/campaigns/equality_tuned.sh): the script links the reference runs and passes --extra-flags=.... The skipped arms had a second cause: argparse read a separate value starting with -- as a new option, so run_matrix.py exited for three of the four configurations. The script reruns only missing configurations, uses labels without commas (compare.py writes its table unquoted), and fails if any pair is skipped or missing from summary.json. bench/divergence.py reports each pair's rate and its ratio to the floor with 95% intervals and classes. The rerun is in the queue.
  • B2: the README now scopes host load per slot, names the runs without the KV cap, uses 50.3 MB (48 MiB), names the metric behind 1.64x (y; 1.65x in x), reports accept length at c=32 throughout, and says the plain radix comparison spans sessions.
  • DFlash block 4 leads DFlash at c=128 by 8%. It is now the high-concurrency arm dflash-tuned-b4 and is in the confirmation plan.
  • Foreign maxima of ~10 cores were self-attribution: CPU of the run's own short-lived processes was charged as foreign when they exited inside a sampling interval. The sampler now counts reaped children as the run's own (commit 567ef70, with a test). The tuning means are upper bounds, and the three invalid tuning points may be false positives; they stay excluded.

With a single draft step SGLang produces the draft token in the draft
extend pass and captures no draft-decode graph, so the launch check
rejected a valid configuration.
Plain decoding and MTP chains of 2-7 steps with and without the radix cache
and with SGLang's buffered GDN verify, at c=1, 8, 32, 128. MTP gains 1.65x
at c=1 but falls behind plain from c~32; buffered verify recovers 24% for
three steps at c=128. Also adds the next tuning slot's campaign scripts.
The evidence README derives the per-draft-token state snapshot size (50.3
MB) and its write rate at c=128 from measured throughput and acceptance
(0.5-0.75 TB/s for MTP chains), labelled as derived. The confirmation sweep
adds c=48 and c=96 so the plain/speculative crossover can be located.
With the radix cache off and buffered GDN verify, almost no static memory
goes to recurrent state, so SGLang gave ~2M tokens to the target KV cache,
allocated the draft's KV for the same token count outside the static pool,
and ran out of memory in the first prefill. 1M tokens covers a full batch
of 128 at 7.8K tokens each.
…DFlash

DFlash block 8 is the strongest speculator at c<=8 (686 tok/s at c=1);
plain is best at c=128. Triton attention helps MTP at low concurrency and
hurts it at c=128; plain is indifferent. DFlash buffered verify is refused
on GDN models. Adds the next slot's campaign (DFlash under both backends,
blocks 4 and 16, FA4 draft attention, MTP depth 4 under Triton).
The two appended reruns were edited before bash reached them: the MTP
depth-4 rerun was replaced by plain decoding under Triton attention, which
the shared-backend question needed more.
Tuned arms (tune split, evidence/bench/tuning/): plain, MTP s3 with
buffered GDN verify and DFlash (block 8 with FA4 draft attention; block 16
under Triton at capacity 64), each family with a Triton arm for low
concurrency and a FlashInfer arm for high concurrency, all without the
radix cache. Arms whose numerics differ from stock (buffered GDN state) are
marked pending classification against plain. The confirmation campaign
runs six arms per repeat with per-arm concurrency lists; a supplementary
campaign covers MTP with stock verify and buffered plain decoding; the
quality campaign takes a list of arms.
DFlash under Triton leads at low concurrency (block 16: 851 tok/s at c=1)
and loses at high concurrency; FA4 draft attention runs on sm_90 and helps
block 8 at every valid point. Three points are invalid for host contention
and are excluded from the choices.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T01:04:15.413232Z a235363 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a235363c0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bench/campaigns/equality_tuned.sh Outdated
--extra-flags "--disable-radix-cache --attention-backend triton"
cat > ~/vp-data/bench/equality/pairs.json <<'PAIRS'
[
["floor: plain c1 vs c32", "plain/c1", "plain/c32"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Link the plain reference runs before comparing

On a fresh output directory, the script never links or copies ~/vp-data/state/runs/plain into $RUNS/plain, although these entries are resolved relative to $RUNS. The comparator silently skips missing paths and exits successfully, so five of the six requested comparisons—including every comparison against plain and the c1-vs-c32 floor—are omitted after the expensive GPU runs. Create the documented link or otherwise point the comparator at the reference runs before invoking it.

Useful? React with 👍 / 👎.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head a235363 against main at a4fb20f. The tuning data supports most of the configuration choices, and the arm definitions match the tuned launches. Two things block: one Codex finding (the equality campaign never links its reference runs), and several README statements that the committed CSVs contradict.

Checked and correct

  • Tables against points.csv. Every number in the T1, T2 and T3 tables matches points.csv (y, rounded). The three invalid points are marked in invalid_reason with mean foreign load 2.1, 3.5 and 2.8 cores, and frontier.csv excludes them.
  • Arms against the tuned launches. The chosen arms match their tuned launches in launches.csv: radix cache off, max-mamba-cache-size 128 (64 for b16), FA4 draft attention for dflash-tuned, Triton for the -triton arms, and NEXTN s3/top-1/4 draft tokens with enable-linear-replayssm-spec for the MTP arms.
  • Derived claims.
    • +24% at c=128 for buffered verify: 11,941 / 9,593. The 3% cost at c=1: 446.9 / 460.9.
    • +17% / +18% for Triton at c=1: 535 / 456 and 807 / 686.
    • Radix off: +5% for MTP (10,106 / 9,593).
    • Snapshot traffic: 50.3 MB per snapshot; 23.0 cycles/s and 11,773 snapshots/s, about 593 GB/s, for MTP s3 at c=128; 13.69 GiB = 73 x 4 x 48 MiB; 1.35 TB/s of plain state traffic; 35 vs 43 ms per cycle.
    • 0.8 GB = 16 x 50.3 MB for block 16.
  • Launch-check fix. One-step MTP needs no draft-decode graph, and the new test covers both directions.
  • Tests and hygiene. pytest tests/test_bench_harness.py gives 27 passed. Pre-commit passes, and no commit has AI co-author lines.
  • Equality campaign configs. The configs it names exist in experiments/state_safety/server.py on main.

Blocking

B1. The equality campaign never links its reference runs (Codex P1, bench/campaigns/equality_tuned.sh:20).

  • The comment says the state workstream's plain runs are "linked into the runs directory", but nothing links ~/vp-data/state/runs/plain into $RUNS.
  • compare.py:314-315 prints skip ...: missing and carries on. So five of the six pairs, including the c1-vs-c32 floor and every comparison against plain, would silently be dropped after the GPU runs, and the lossy = "pending ..." labels could never be resolved.
  • Fix: ln -sfn ~/vp-data/state/runs/plain "$RUNS/plain" before the comparison. Also make the script fail if any pair is skipped, for example by checking that summary.json has all six labels.

B2. Several README statements contradict the committed CSVs (evidence/bench/README.md, ## tuning/).

  1. Foreign load and invalid points. The section opens with "Mean foreign CPU load stayed between 0.5 and 1.1 cores on every point ... no point is invalid". Across the 92 points the mean ranges from 0.26 to 3.45 cores, and three points are invalid, as the T2 and T3 paragraphs below it say. Scope that sentence to T1, or replace it with the overall range.
  2. "Capped at 1M tokens throughout" for T2 is not what ran. In launches.csv, tune-plain-noradix, tune-plain-noradix-replayssm and tune-mtp-s3-rspec-noradix-triton launched without max-total-tokens. Two of these are the chosen plain-tuned and mtp-tuned-triton configurations. The arms now inherit the cap from the defaults. Say which tuning points had the cap, and that the arms add it. A 1M-token cap cannot bind at these sizes, so no conclusion changes.
  3. Snapshot size. "one GDN state snapshot (~47 MB in FP32)" in the T1 reading should be 50.3 MB (48 MiB), as the derivation below it says.
  4. The 1.65x. "MTP gains 1.65x over plain at c=1" sits next to a table in y, where it is 461 / 282 = 1.64x. 1.65x is the per-user rate, x_e2e 465.1 / 281.8. Name the metric or use 1.64x. The PR body repeats it.
  5. "Block 4 never led" is false at c=128 within DFlash. tune-dflash-b4-noradix reaches 11,477 tok/s at c=128. That is 8% above the chosen dflash-tuned (block 8, FA4: 10,594) and above every block-8 variant. Correct the statement. Then either add a high-concurrency DFlash arm (block 4, ideally also tried with FA4), or keep block 8 for all concurrencies and say that the DFlash arm is 8% below the best DFlash point measured at c=128, and why. The baselines are meant to be strong denominators, so this choice should be explicit. Plain leads at c=128 either way, so the frontier there does not change.

Suggestions (not blocking)

  • The ~10-core foreign maxima. Every point at c >= 32 records foreign_cpu_max of 9.4-11.7 cores, while the means stay low, for example 1.09 at plain c=128. The README attributes the bursts to other agents' document builds, but they appear at every high-concurrency point across six hours and not at c=1. That pattern looks systematic, perhaps aiperf worker processes attributed to "foreign" during start-up. Validity uses the mean, so nothing changes, but please check the attribution.
  • Matched baseline in the PR body. "957 tok/s per user, 3.4x plain" for DFlash b16 under Triton uses plain FlashInfer (281.8). Against the matched Triton plain (286.1) it is 3.35x.
  • The accept-length column in the T1 and T2 tables mixes concurrencies. For example, s4's 3.72 is c=128, while s7's 4.60 is c=1, and it is 4.56 at c=128 in the snapshot table. Say which one it reports, or give the c=1 and c=128 values.
  • Confounded radix comparison. "Without the radix cache, plain is +3% at c=128" compares T1 tune-plain (radix on, no cap) with T2 tune-plain-noradix (another session). It is a single-run comparison across sessions; say so.
  • The cap and older evidence. The bench defaults now include max-total-tokens = 1000000, so rerunning the commands behind earlier committed bench evidence (before 31e8eee) no longer reproduces those launches exactly. Add a line saying that runs before this change had no cap.

… DFlash b4

- equality_tuned.sh links the reference runs into its runs directory,
  passes run_matrix.py's flags as --extra-flags=... (argparse read a
  separate value starting with '--' as a new option, so three of four
  configurations never ran), reruns only missing configurations, uses pair
  labels without commas (compare.py writes its table unquoted), and fails
  if compare.py skips a pair or summary.json lacks one.
- bench/divergence.py reports each pair's divergence rate per 1K tokens
  and its ratio to the plain batch-1 vs batch-32 floor with 95% intervals
  and the event classes.
- Host-load sampling counts the run's own CPU including children reaped
  within the interval (cutime/cstime); before, CPU of the run's own
  short-lived processes appeared in the host total but not in the own tree
  and was counted as foreign, which inflated foreign maxima at c>=32.
- New arm dflash-tuned-b4 (block 4, FlashInfer): 8% above block 8 at c=128
  on the tune split; the confirmation sweep runs it at c=32-128.
Scope the host-load statement per slot and explain the inflated foreign
maxima (own short-lived processes counted as foreign before 567ef70); say
which runs lacked the KV cap; use 50.3 MB (48 MiB) for a snapshot; name
the metric behind 1.64x; report accept length at c=32 throughout; state
that block 4 leads DFlash at c=128 and is now the high-concurrency DFlash
arm; give block 16's ratio against its matched Triton baseline (3.35x).
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Re-reviewed head 5a7fe67 (567ef70 and 5a7fe67 on a235363). B1 and B2 are fixed and the suggestions are taken. Two of the new README sentences contradict the run records, so this round has two small blocking items.

Earlier items

  • B1 (fixed, including the coordinator's check). equality_tuned.sh now links the reference runs into $RUNS and runs under set -euo pipefail. compare.py ... | tee therefore propagates a failure, and the script exits 1 if compare.log has any skip line or summary.json lacks any of the six labels. It also fixes the second cause: --extra-flags=... instead of a separate argument that argparse read as a new option. Labels without commas avoid the unquoted table. bench/divergence.py reports rates and a ratio to the floor with 95% intervals, and its documentation says it is a screen, not an equivalence test. The one available pair, 3.80/1K (3.28-4.41) with ratio 1.11 (0.90-1.37), is not used to label an arm.
  • B2 (fixed). The foreign-load ranges per slot match the raw point.json files: 0.26-1.26 in T1, 0.38-2.81 in T2 and 0.39-3.45 in T3. The uncapped runs are listed correctly, as all of T1 plus the three T2 configurations. The accept-length column is now consistently the c=32 value, and I checked all 23 rows. 50.3 MB, 1.64x in y against 1.65x in x, and block 4 at c=128 are all correct.
  • Suggestions taken.
    • Host-load sampler. It now charges the run's reaped children to the run, through the root tree's cutime/cstime differences. I checked that this stays continuous when processes in the tree exit within the interval, and the new test covers it.
    • Other suggestions. The tuning means are documented as upper bounds. The README gives 3.35x for b16 against the matched Triton baseline and says the radix comparison spans two sessions. dflash-tuned-b4 is added to confirmation.
  • Tests and hooks. pytest tests/test_bench_harness.py gives 29 passed, and pre-commit passes.

Blocking

  1. "The uncapped pools held 1.1-2M tokens against at most ~80K in use" is not what the launches show (README, "KV cache cap").
    • The uncapped pools (max_total_num_tokens in launches.csv) range from 54,077 tokens (tune-mtp-s5, T1, radix on, max-mamba-cache-size 640) to 2.12M. Others: s4 257K, s7 radix-off 453K, s3 460K, s2 663K, s5 radix-off 859K.
    • tune-mtp-s5's server log shows "KV cache pool is full. Retract requests" three times at c=128, with 122-127 requests running. Its c=128 point (8,719 tok/s) was limited by the KV pool. It is the only tuning run with retractions.
    • The depth conclusion still holds through the unaffected pairs: s5 trails s3 at c=128 both with the radix cache off (9,456 against 10,106) and with buffered verify (11,186 against 11,941).
    • Fix: give the actual pool range, flag the s5 c=128 point as KV-limited (3 retractions), and rest "depth 3 beat 4 and 5 at high concurrency" on those pairs.
  2. "[Accept length] varies by at most 0.1 across concurrency for a given configuration (adaptive depth excepted)" is false for DFlash block 16: 5.52-5.74 (0.22) on FlashInfer and 5.53-5.77 (0.24) under Triton. Fix the bound, or name block 16 as an exception as well.

Suggestions (not blocking)

  • The b4 arm's description. dflash-tuned-b4 says block 4 "lost below c=64", but c=64 was never measured. It lost at c <= 32, and c=64 is unmeasured; the confirmation run's 48/64/96 points will settle where it crosses.

envelope.csv names the best arm per concurrency with its lead over the
runner-up; pairs.csv pairs repeats of a test arm with its matched-flag
baseline (--pair TEST:BASELINE) and reports y and x_e2e ratios.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…ing, pending tuning evidence

- 2c and lever row 4: bit-identical at kernel level on synthetic activations, one layer;
  the end-to-end bitwise probe has not run (first attempt failed before serving) and is
  queued; both one_batch arms aborted on the patched engine, stock not tried.
- Lever row 2: Triton attention for the target is pending bench's equality
  classification; draft-only Triton is exact.
- 2e: SGLang's chunked kernel is not a usable fast path for P7 (synthetic, one layer,
  one request); a purpose-built kernel is untested.
- 2b is marked pending bench's PR #57 and shows the cycle/GPU-busy derivation.
The retraction counter read a metric name SGLang does not export
(sglang:num_retracted_reqs_total; the counter is
sglang:num_retracted_requests_total), so it always reported zero. Each point
now also counts the scheduler's KV retractions in its log segment, and
points.csv carries the largest logged running batch and the retractions.

README: uncapped KV pools ranged from 54K to 2.12M tokens, not 1.1-2M; MTP
s5 with the radix cache was KV-limited at c=128 (123 running, four requests
retracted), so the depth comparison rests on the three unaffected pairs.
Accept length varies by up to 0.24 for DFlash block 16, not 0.1. Block 4
trails block 8 at c<=32; c=64 was not measured.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Addressed in ab3d94b:

  1. KV pools: the README now gives the measured range (54,077 tokens for MTP s5 with the radix cache, up to 2.12M) and how the pool shrank with draft depth with the radix cache on (663K, 460K, 257K, 54K for s2-s5). MTP s5 at c=128 is marked KV-limited in both tables (scheduler logged at most 123 running, four requests retracted in three events). The depth statement now rests on the three unaffected pairs at c=128: s3 vs s4 with the radix cache (9,593 vs 9,276), s3 vs s5 radix-off (10,106 vs 9,456) and with replayssm-spec (11,941 vs 11,186).
  2. Accept length: at most 0.09 across concurrency except DFlash block 16 (0.22 FlashInfer, 0.24 Triton, both from c=1 over 32 requests) and adaptive depth.
  3. dflash-tuned-b4 description and README: lost at c<=32, c=64 not measured.

While checking (1) I found the harness's retraction counter read a metric name SGLang does not export (sglang:num_retracted_reqs_total; the counter is sglang:num_retracted_requests_total), so it always reported zero. Fixed; each point now also counts the scheduler's retractions in its log segment, and points.csv carries max_running_logged and kv_retractions (blank for runs before this commit). The tuning points.csv was regenerated; frontier.csv and launches.csv are byte-identical.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed head ab3d94b (a67b792 and ab3d94b on 5a7fe67). Both items from the last round are fixed, and nothing new blocks.

Last round's items

  • KV pools (fixed). The range is given as 54,077 to 2.12M. The pool shrinks with depth when the radix cache is on (663K, 460K, 257K and 54K for s2-s5), which matches launches.csv. MTP s5 at c=128 is marked KV-limited in both tables: three retraction events that retracted four requests in total, against my count of 2 + 1 + 1. The depth claim now rests on three pairs that were not KV-limited (9,593 / 9,276; 10,106 / 9,456; 11,941 / 11,186), and none of those runs logged a retraction.
  • Accept-length bound (fixed). Block 16 and adaptive depth are named as exceptions. The b4 arm now reads "at c<=32 (c=64 not measured)".
  • Retraction counter (fixed). The fix to bench/results.py (sglang:num_retracted_requests_total) is right. The regenerated points.csv keeps every old field identical (0 changed fields across 92 rows) and adds max_running_logged and kv_retractions. frontier.csv and launches.csv are unchanged.

Other checks. pytest tests/test_bench_harness.py gives 30 passed, and pre-commit passes. The PR has no new Codex comments.

Not blocking, but fix before pairs.csv backs a committed result.

  • Repeat pairing (bench/pareto.py, paired_ratios). Runs are paired by their order after invalid points are dropped, with zip(..., strict=False).
    • If the test arm's point is invalid in repeat 1 but the baseline's is not, the test arm's repeat 2 is paired with the baseline's repeat 1.
    • The mismatch is silent, and every later pair shifts with it.
    • Fix: pair by the confirmation repeat index (the rN directory, or the repeat recorded in point.json), drop a pair when either side is invalid, and report how many pairs were dropped.
  • Accept-length nit. The "at most 0.09" bound counts invalid points for block 16 (its 0.22 comes from the invalid c=1 point). On that same basis, FA4 block 8 is 0.10 (4.71-4.81, including its invalid c=8 point). Either exclude invalid points everywhere, which gives block 16 about 0.06, or name FA4 too.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Addendum: e2cbff4 was pushed after my approval. My approval covers ab3d94b. If #57 merges now, merge it at ab3d94b. e2cbff4 needs one fix first.

e2cbff4 ("Draw the envelope over all arms and over stock-arithmetic arms") draws a second Pareto envelope over arms with "blank exactness". It treats an arm as stock-arithmetic when it has no lossy note in arms.toml and sets neither of the two ReplaySSM flags (NUMERICS_FLAGS).

Blocking: Triton target attention would count as stock arithmetic without classification (bench/pareto.py, NUMERICS_FLAGS and exactness(); bench/arms.toml).

  • plain-tuned-triton and dflash-tuned-b16 set attention-backend = "triton" for the target and carry no lossy note. The new code would put them on the stock-arithmetic envelope.

  • The module's own definition of stock arithmetic is "greedy outputs differ from plain decoding only as much as batch shape alone makes them differ". That has not been measured for Triton target attention: equality_tuned.sh classifies Triton only in combination with buffered verify, as the 3.80/1K pair.

  • The integrator applied the same rule to Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60 this round: target Triton attention changes the attention arithmetic and stays "pending bench's equality classification".

  • Fix:

    1. Mark plain-tuned-triton and dflash-tuned-b16 lossy = "pending: ...".
    2. Add a non-default attention-backend to the flags that force "pending" when no arm says otherwise.
    3. Add a plain-Triton and a DFlash-b16-Triton pair against plain c1 to equality_tuned.sh.

    Draft-only attention backends (FA4 in dflash-tuned) do not touch the target's arithmetic and can stay blank.

The rest of e2cbff4 is fine. The worst class per label is taken over launches, the current arms.toml is preferred only when the run's args and env still match, and the envelope's dominance check is correct. Tests: 30 passed.

SamMausberg added a commit that referenced this pull request Oct 1, 2026
Address review B1 on #64. Merged evidence does not support the "exact
up to the noise floor" class for replayed verification. Moonshot lever
5 (#60) calls it pending, with a mechanism that suggests lossy, because
its verify outputs come from a chunked transform on TF32 tensor cores.
bench/arms.toml (#57) also marks those arms lossy = "pending". The
levers table's class and footnote and the chosen-arms sentence now say
this.

Triton attention for the target changes the target's arithmetic, as
ruled in #60, so the Triton arms and the attention-backend lever are
pending too, and bench-equality covers them.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix E: integrate the baseline tuning (#57)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant