Skip to content

Drafter: exact snapshot-free GDN verify (fold-every-commit) for DFlash and MTP, with its exactness and timing jobs - #133

Merged
SamMausberg merged 46 commits into
mainfrom
drafter/fold-verify
Oct 1, 2026
Merged

SamMausberg merged 46 commits into
mainfrom
drafter/fold-verify

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Stock DFlash and MTP verification on Qwen3.5-4B writes one FP32 GDN state per block position per request, so that a rejected suffix can be rolled back: 48 MiB per position, 16 positions per request per cycle at DFlash block 16. SGLang already implements a snapshot-free alternative for KDA models, fold-every-commit: the verify runs the ordinary recurrent kernel, which also writes the raw per-token inputs to a ring, and the commit replays the accepted prefix into the checkpoint with a bitwise clone of the recurrent update. At the pin (bd66ce343e) it is disabled for GDN pools and for DFLASH. This PR enables it, checks whether it is exact against the stock verify, and adds the jobs that time it.

Status: complete. Exactness, the per-phase split and the served A/B on the tuned arms are all in. This PR will be updated as the queued runs land; it should not merge before they do.

Engine patches (engine/sglang/patches/drafter/)

  • 0002 lets --enable-linear-replayssm-spec run with DFLASH on GDN models, with SGLang's default GDN circular ring (compact records, chunked reconstruction). It is not bitwise (below) and is not proposed as a lever; 0003 reuses its commit hook.

  • 0003 adds SGLANG_GDN_REPLAYSSM_FOLD=1: with --enable-linear-replayssm-spec, GDN pools use the fold-every-commit protocol, for DFLASH (its direct commit hook) and for EAGLE/MTP (through spec_utils.commit_mamba_states_after_verify). The rings are indexed and sized per mamba slot, as the fold kernel expects.

  • 0004 (added after the runs, from Codex's review) takes the DFLASH commit hook only under --enable-linear-replayssm-spec: plain --enable-linear-replayssm also allocates replay rings, and without the gate a DFLASH server with only that flag would commit from a ring its verify never wrote. It changes nothing in any configuration measured here.

All are off unless their flag is set. Applying 0001-0003 to bd66ce343e reproduces the tree of engine/drafter at 31bda3e674 exactly (checked with git am), which is the engine of every run in this PR; 0004 is engine 761d69deb3. engine/sglang/README.md has the apply commands and one row per patch.

Exactness so far (evidence/drafter/README.md, "Buffered GDN verify: exactness")

  • Kernel level (gdn_verify_parity.py, random BF16 inputs at the 4B GDN shape, batch 1, 8 and 16, three seeds, random accepted lengths): the fold verify output and the folded state are bitwise equal to the stock verify output and its intermediate state at the accepted position in all nine cases, even though the stock verify launches value tiles of 4 and the ring verify tiles of 32 on sm_90. The circular verify differs in 19-20% of BF16 output words (at most 2.4e-4 absolute).
  • Served MTP s3 at c=1 (panel-v2, 80 sequences, greedy, up to 2,048 tokens, top-5 logprobs, radix off, same running limit): fold is bitwise equal to stock in tokens and top-5 logprobs on all 80.
  • Served DFlash, first check: confounded. SGLang sized the stock and fold servers' pools from free memory (running limit 2 or 5 against 8); fold matched stock on 76 of 80 at c=1.
  • Served, matched pools (run_fold_localize.sh, c0ee7ba; README "Matched pools and deterministic batching"). DFlash at c=1 with the per-cycle trace, eight requests (the four that differed plus four controls) at two pinned pool sizes: the fold equals stock in every token, top-5 logprob and every cycle's drafts, target argmax and accepted length. Both of today's arms reproduce the first check's stock run and differ from its fold run at the same four requests, so those differences followed that fold server's pools, not the fold. Deterministic batched waves (radix off): DFlash in waves of 4 and MTP s3 in waves of 8 are bitwise equal to stock on 80 of 80 sequences each, as are the stock reruns. With a closed-loop client above c=1 stock does not reproduce itself bitwise, so no claim is made there.

Timing

  • Per-phase split (measured, run_phase_timing.sh, 52d3882; README section "per-phase split and the P10 gate"). DFlash block 16, Triton GDN verify, identical pinned pools, one exclusive hold, one run per arm, GPU-timeline medians at a steady batch. The fold shortens the cycle from 10.83 to 9.90 ms at batch 8 (-8.6%) and from 15.37 to 13.54 ms at batch 16 (-11.9%): the verify loses 1.10 and 2.16 ms of per-position state writes and the commit gains 0.22 and 0.38 ms for the replay. Its tokens equal stock's on all 66 requests at both concurrencies (closed-loop runs, no logprobs; not the bitwise check). The fold phase is 4.9% and 6.6% of the cycle, below P10's 9.09% gate at both, so P10's anchor-fused replay is not built.

  • Served A/B on the tuned arms (measured, run_fold_timing.sh; README section "served A/B against the tuned DFlash arms"). One session: a single stock, fold, fold, stock sequence per arm in one exclusive hold (two runs per arm, n = 1 ABBA per point), bench confirm split, 512 tokens. Fold/stock in output tokens/s per GPU, with the range over the four run pairs, which is a within-session spread, not a confidence interval:

    arm c=1 2 4 8 16 32
    dflash-tuned-b16 0.968 (0.966-0.970) 0.983 1.005 1.061 (1.053-1.070) 1.094 1.120
    dflash-tuned (b8) 0.986 (0.981-0.990) 1.010 1.020 1.058 (1.050-1.066) 1.082 1.118

    At c=1 the fold is slower: 3.2% on dflash-tuned-b16, the c=1 leader (848 against 876 tokens/s), and 1.4% on block 8; at c=2 it is 1.7% slower on block 16. From c=8 up it is faster on both arms in this session (5.8-6.1% at c=8, smallest pairwise ratio 1.0498; 8.2-9.4% at 16; 11.8-12.0% at 32). Likely cause of the low-concurrency loss (code reading, not measured here): the ring-writing verify keeps value tiles of 32, while the stock per-position-state verify uses tiles of 4 for at most 64 sequences on sm_90; the kernel check found the two tilings bitwise equal on this GPU. The follow-up engine patch drafter/0004 selects the narrow tiles for the ring-writing verify; it is a separate PR, not part of this one.

Also on this branch

  • Panel-v2 output equality with top-5 logprobs in every run, so both margins are known at each first divergence (replaces the one-sided classes on main): DFlash 77 of 80 sequences diverge from plain decoding, 2.88 per 1,000 tokens, 76 ties and 1 one_ulp; MTP 77 of 80, 2.50 per 1,000, all ties.
  • Timed panel at c=1 (evidence/drafter/timed_panel/): per-request tokens and milliseconds per cycle for blocks 16 and 8, one exclusive run.
  • Tooling: serve_run.py takes the start-up lock with a free-memory gate and records the resolved pools; accept_probe.py --waves; compare_outputs.py counts bitwise-identical sequences and now imports the state comparison together with its sibling module (it failed on main's current experiments/state_safety/compare.py); support_screen.py --selector and run_selector_rewalk.sh for P6's selector walk and P9's corrected re-walk (code only; no selector checkpoint exists yet).
  • experiments/drafter/README.md lists every file in the directory (the organization pass found 15 of 27 missing).

Testing

  • pytest tests/test_drafter_tools.py: 6 passed, 1 skipped (the skipped test needs torch, which the repository venv does not have).
  • pre-commit on every changed file.
  • The GPU checks above; their commands are in evidence/drafter/README.md.

Review comments

  • Codex (4791838), A/B summary read pools from the top level of /server_info, where the running limit is absent: fixed in 9db308b (merges internal_states[0] first; test added).

  • Codex (4791838), fold_localize.py missed strict-prefix differences: fixed in 9db308b (first_difference returns the shorter length; cycle-count differences reported; test added). (The queued localize job was later resubmitted to run the fixed scripts; see the last item.)

  • Codex (9db308b), four comments, all fixed in bbfad39 with tests: the selector re-walk overwrote the request counter (P1; the re-walk has not run yet); A/B ratios now exclude points bench's invalid_reason rejects; untraced first-check runs are compared by outputs only (--earlier), and cycles only when both runs are traced; compare_outputs.py records strict-prefix logprob differences (no committed equality file changes: identical plus recorded sequences already sum to 80 in each, and two were regenerated to confirm).

  • Codex (bbfad39), two comments, fixed in 22b9a0e: each localize run starts from an empty directory (append-mode traces); the phase-timing profiler runs on a separate server and phase_summary.py --segments splits the timing log into client runs. Both queued jobs were resubmitted at their original queue arrivals from a worktree at 22b9a0e, so their outputs come from the fixed scripts.

  • Codex (22b9a0e), two comments on run_replay_check.sh (already run, not queued again), fixed in 332b68a: an older parity JSON is deleted before the kernel check; the MTP half writes to OUT-mtp.

  • Codex (332b68a), parity check exited 0 on a fold mismatch: fixed in 0159c13 (nonzero exit unless both fold comparisons are bitwise in every case; fold_bitwise_in_every_case recorded; the committed parity file passes).

  • Reviewer (79eec25), four items, fixed in 9d984d8/1e3e647/2eef679: main merged (Files-table conflict resolved; drafting_requirement.py from Drafter: the per-position acceptance a block drafter needs for 5x (derived from committed evidence) #134 listed); running_limit_match per group; the two overstatements corrected (smallest pairwise ratio at c >= 8 is 1.0498; the block-8 c=4 fold run at 4.80 tokens per cycle named); the A/B stated as one session with the c=1 regression in plain words, here and in both READMEs.

  • Codex (79eec25), three comments: the DFLASH commit gate (P1) is the new patch 0004; running limit per group (as above); phase_summary.py writes kernels.json, the committed name, and regenerating both phase files with the committed code reproduces them byte for byte.

engine/sglang/patches/drafter/0002 lets --enable-linear-replayssm-spec run
with DFLASH on Qwen3.5 (GDN): DFLASH commits through
update_mamba_state_after_mtp_verify, which now has the GDN circular-ring
commit that EAGLE/MTP already reach through spec_utils. run_replay_check.sh
compares it against stock DFlash verify on panel-v2 at concurrency 1 and 8
(tokens and top-5 logprobs, bitwise), and compare_outputs.py reports bitwise
identical sequences and the first logprob difference.
…at start with dashes

serve_run.py --extra must be written --extra=<flags>: argparse read
'--extra --disable-radix-cache' as a missing value, which killed the first
data-generation segment. Same fix in the replay check.
… arm in the replay check

SGLang implements a fold-every-commit buffered verify for GDN whose verify is
the recurrent kernel itself and whose commit is a bitwise clone of the
recurrent update, but enables it only for KDA. Patch 0003 enables it for GDN
behind SGLANG_GDN_REPLAYSSM_FOLD=1. run_replay_check.sh now compares stock
DFlash verify with both buffered variants (compact circular replay and fold).
…d its summary

run_phase_timing.sh times DFlash block 16 with the repair workstream's CUDA-event
phase probe applied on top of the drafter engine series, at matched flags, and
captures the GDN kernels each arm runs; phase_summary.py reports per-phase
medians, the cycle period and each phase's share (the commit phase is what P10
could remove).
…er slot

The ring-writing verify and the fold both index the raw ring by the physical
mamba slot, so the rings are sized and budgeted per slot (as for KDA), not per
active request as the compact circular replay is.
With GPU_STARTUP_MIN_FREE_GB=n the script takes the start-up lock, reads
the GPU's free memory from nvidia-smi and runs the command only if at least
n GiB are free; otherwise it releases the lock, waits GPU_STARTUP_RETRY_WAIT
seconds (default 60) and retries up to GPU_STARTUP_TRIES times (default 30),
then exits 75 without running the command. Unset, the script still execs
flock -o as before. The lock descriptor is closed for the command, so a
background server never holds it. CPU tests fake nvidia-smi on PATH.

@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: 332b68a71b

ℹ️ 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".

compare(
'fold verify output', stock_out, out_fold.reshape(batch * T, HV, V)
),
compare('fold committed state', stock_committed, fold_committed),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail when fold parity comparisons differ

When either the fold verify output or committed-state comparison is not bitwise equal—for example after a kernel regression or on a different GPU—this script merely prints the mismatch, writes gdn_verify_parity.json, and exits successfully. Consequently, run_replay_check.sh never enters its parity-failure branch and leaves a failed result looking like a completed check. Return a nonzero status and avoid the final JSON unless the first two fold checks pass; the circular mismatch should remain informational because it is expected.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 0159c13, with one deliberate difference: a fold mismatch is a result worth keeping, so the JSON is still written, now with fold_bitwise_in_every_case, and the script exits nonzero unless both fold comparisons (verify output and committed state) are bitwise equal in every case; the circular comparison stays informational. run_replay_check.sh deletes any older JSON first and logs "KERNEL PARITY FAILED" on a nonzero exit, so a failed check can no longer look complete. The committed parity file passes the new rule (all 18 fold comparisons bitwise in its 9 cases).

…ock in every case, and record it in the JSON (Codex on #133)
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 0159c13870

ℹ️ 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".

… fold at c = 8 and 16; P10's gate is not met
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 52d3882f9f

ℹ️ 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".

…ication in served DFlash and MTP (run_fold_localize)
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: c0ee7ba34b

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (79eec25, 4 blocking, all small; the substance checks out)

Checked and right

  • The engine series reproduces exactly. Applying engine/sglang/patches/drafter/0001-0003 to the pin bd66ce343e (git apply --cached on a fresh index) gives tree 954cc10a24, which is the tree of engine/drafter 31bda3e674.
  • The bitwise claims are scoped correctly. The README makes no bitwise claim for closed-loop clients above c = 1, citing stock's own 10/80 at MTP c = 8. The claims are:
    • c = 1 with the radix cache on, at two matched pool sizes;
    • deterministic waves of fixed composition: DFlash waves of 4 and MTP waves of 8, radix off.
  • The localize files match the README.
    • DFlash w4: fold against stock and stock against a rerun are both 80/80 bitwise over 132,371 tokens.
    • MTP w8: likewise 80/80 over 139,092 tokens.
    • (A): all 8 requests are identical in tokens, logprobs and per-cycle trace for fold against stock at p1 and p2, and for stock at p1 against p2.
    • Both reproduce the first check's stock run. The first check's fold run differs at the same four requests (output index 2 or 3), as stated.
  • The served A/B table matches fold_timing/summary.json in every cell. The c = 1 regression on block 16 (3.2%) and block 8 (about even) is stated, with its likely cause marked as code reading.
  • Host identity: 0 hits; the launch records carry no hostname. Attribution: clean.

Blocking

  1. The branch conflicts with main in experiments/drafter/README.md (trial merge into main). Merge main and resolve it.
  2. fold_timing/summary.json says running_limit_match: false, while the README says the running limits match (64 and 128). ab_timing_summary.py compares limits across both arm groups at once. Within each group they do match: 64 for every b16 run and 128 for every b8 run. Compute it per group (stock against fold within a group), regenerate summary.json, and keep the README sentence.
  3. Two small overstatements in the A/B bullets:
    • "every pairwise ratio at least 1.05" from c = 8: b8 at c = 8 has a minimum of 1.0498. Say "at least 1.049", or "about 1.05 or more".
    • "Tokens per cycle ... identical at c <= 8": b8 at c = 4 has fold 4.78 and 4.80 against stock 4.78 and 4.78. Say "identical at c <= 8 except block 8 at c = 4 (4.80 in one fold run)", or "within 0.02".
  4. Say that the A/B is one session. It is one A-B-B-A sequence in one hold, and the ranges are over the four stock-fold run pairs within that session, not between sessions. Write that next to the table, and say the c = 1 regression is from that one session.

Still to run on the fix head: Codex has not reviewed 79eec25 (its last review is of c0ee7ba). tests/test_drafter_tools.py and pre-commit on the range will run in the CPU window.

@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: 79eec25f76

ℹ️ 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 on lines +62 to +65
+ if mamba_pool is None or getattr(mamba_pool, "replayssm_is_kda", False):
+ return False
+ fold = getattr(mamba_pool, "replayssm_spec_fold", False)
+ if not fold and getattr(mamba_pool, "replayssm_cache_base", None) is None:

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 Gate the DFlash commit on speculative ReplaySSM

When a GDN DFlash server enables ordinary --enable-linear-replayssm but leaves --enable-linear-replayssm-spec off, replayssm_spec_fold is false while the live-replay pool can still have replayssm_cache_base (_replayssm_on is enabled by either flag later in this patch). This condition therefore enters the new speculative commit, returns before the stock intermediate-state scatter, and consumes a ring that target verify did not populate, potentially committing stale state or failing. Check mamba_pool.enable_linear_replayssm_spec before accepting either the fold or cache-base path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Valid; fixed by a new engine patch, drafter/0004 (engine 761d69deb3, in 1e3e647): the DFLASH commit hook returns False (so the stock intermediate-state scatter commits) unless the pool has enable_linear_replayssm_spec, before either the fold or the circular path. 0001-0003 are unchanged, so the committed runs (all at 31bda3e674, each with both ReplaySSM spec flags or with none) are reproducible as recorded; the engine README and evidence README say the gate changes nothing in those configurations. A served check of DFlash with decode-only --enable-linear-replayssm against stock DFlash (deterministic waves of 4) is added to the follow-up PR's queued shared check, which runs on an engine that includes 0004.

Comment on lines +133 to +139
limits = {p.get('effective_max_running_requests_per_dp') for p in pools.values()}
summary: dict[str, Any] = {
'source': str(args.root),
'base': args.base,
'test': args.test,
'pools_by_run': pools,
'running_limit_match': len(limits) == 1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Scope running-limit matching to each A/B group

run_fold_timing.sh deliberately places the b16 group (running limit 64) and b8 group (running limit 128) under one root, but this computes one global set across both groups. Consequently the committed summary reports running_limit_match: false even though stock and fold have matching limits within every comparison group. Compute the match per group, then aggregate those per-group results, so legitimate differences between independent groups are not reported as an A/B mismatch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1e3e647: running_limit_match is computed per group ({'b16': true, 'b8': true} in the regenerated fold_timing/summary.json, 2eef679); test test_ab_summary_running_limit_is_checked_per_group.

Comment thread experiments/drafter/phase_summary.py Outdated
writer = csv.DictWriter(handle, fieldnames=fields)
writer.writeheader()
writer.writerows(rows)
args.out.with_suffix('.kernels.json').write_text(json.dumps(kernels, indent=2) + '\n')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Write the kernel summary to the documented artifact

run_phase_timing.sh passes $out/summary, so with_suffix('.kernels.json') produces phase_timing/summary.kernels.json; however, the committed and documented artifact is phase_timing/kernels.json. Rerunning the documented job therefore does not regenerate that file and can leave stale kernel evidence in place. Write the sibling kernels.json path or align the runner, README, and committed artifact.

AGENTS.md reference: AGENTS.md:L15-L18

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1e3e647: phase_summary.py writes kernels.json beside OUT_PREFIX.csv, the committed name; regenerating phase_timing/summary.csv and kernels.json with the committed code from the job's logs reproduces both files byte for byte (no diff in 2eef679).

@SamMausberg

Copy link
Copy Markdown
Owner Author

Update to my verdict on 79eec25 (still REQUEST CHANGES): Codex's three comments on this head are valid. Add them to my four items.

  1. r4159172675 (P1, patch drafter/0003). The DFLASH commit hook's gate is if not fold and getattr(mamba_pool, "replayssm_cache_base", None) is None: return False. With plain --enable-linear-replayssm (decode ReplaySSM) and -spec off, the pool can still have a replayssm_cache_base, because _replayssm_on is set by either flag. The hook then takes the circular spec commit for a verify that never filled the ring, and returns before the stock scatter.
    • The same gate is already in 0002, so it predates 0003.
    • Require mamba_pool.enable_linear_replayssm_spec before either the fold or the circular path, and fall back to the stock commit otherwise.
    • The engine tree changes, so record the new tree in engine/sglang/README.md. Say that the committed exactness and timing evidence ran at 31bda3e674 with -spec on, where the new check is true, so it still applies.
    • Add a test or a short engine-level check of the decode-only ReplaySSM plus DFlash combination, if one is feasible on CPU. Otherwise say why not.
  2. r4159172686 (P2). This is my item 2: compute running_limit_match per group.
  3. r4159172702 (P2). phase_summary.py writes summary.kernels.json when given /summary, but the committed and documented file is phase_timing/kernels.json. Align the script, the runner and the README so that rerunning the documented command regenerates the committed file.

# Conflicts:
#	experiments/drafter/README.md
… A/B running limit per group; kernels.json beside the phase summary (review and Codex on #133)
…one session, c = 1 regression stated (review on #133)
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 2eef679447

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (2eef679)

1e3e647 and 2eef679 resolve all seven items from my review of 79eec25: my four, plus Codex's three.

  • Engine. Patch drafter/0004 commits the DFLASH ReplaySSM ring only under -spec, so plain decode ReplaySSM takes the stock scatter. Applying the series 0001-0004 to the pin gives tree 5b6e7eae, which is the tree of the engine branch at 761d69deb3.
  • A/B. The running-limit check is per arm group, so running_limit_match in the summary agrees with the README. The README says the A/B is one A-B-B-A session, gives its ranges as within-session ranges, and states the c = 1 regression.
  • Other items. kernels.json is committed beside the phase summary. Main is merged and the README conflict is resolved.
  • Checks. Codex found no issues on this head (18:56 UTC). tests/test_drafter_tools.py passes in the SGLang environment (14 tests), and pre-commit from 9d984d8 to 2eef679 is clean.

@SamMausberg
SamMausberg merged commit f41adf6 into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…cted by its gate (#133)

From evidence/drafter/README.md (buffered GDN verify sections) and
buffered_verify/, phase_timing/, fold_timing/ (#133):
- kernel parity: the fold's verify output and committed state are bitwise
  equal to the stock verify's in all nine cases; circular replay differs
  in 19-20% of BF16 words;
- served, matched pools: bitwise equal to stock verification for MTP s3
  on all 80 sequences at c = 1, DFlash b16 on the 8 requests rerun at c = 1
  (radix on), and both on all 80 in fixed-composition batches of 4 and 8
  (radix off); no bitwise claim for closed-loop c > 1;
- held batches: cycle 8.6% shorter at batch 8, 11.9% at 16;
- served A/B, one session on both tuned DFlash arms: +5.8-6.1% at c = 8,
  +8.2-9.4% at 16, +11.8-12.0% at 32; -3.2% at c = 1 on block 16 and
  -1.4% on block 8 (likely value-tile cause, untested);
- P10 rejected without building: the fold is 4.9% and 6.6% of the cycle
  at c = 8 and 16, below its 9.09% gate.
New paragraph in App F.8, P10 status row (P11's row updated), a levers
table row, evitem drafter-fold; the p10-split devitem goes.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix F: exact fold-every-commit verification for DFlash; P10 rejected by its gate (#133)
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…ull; at most five sessions

Codex on 84717d2: the certified-head package's fingerprint is now part of the identity the
equality hold's preflight records before any run, and build and every later check require
it unchanged. The reused stock references must match bench's declared configuration
(flags with and without Triton attention, c1 pass, concurrency 1, 256 new tokens, top-5
logprobs, 320 prompts, cold cache, S0's model and prompt set with the same prompt token
counts), as must every stack equality run; the prompt file is pinned by hash from preflight
to build. analyze.py accepts sessions stack-s1 to stack-s5 only (three and at most two
replacements). expected.py's H note and the engine README reflect the merged #45/#52
and #133. Tests for each (98 pass).
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