Repository navigation
hostgap hold 4: full series validated; tuned MTP served +7.5-9.6% per user, token-identical outputs - #163
Conversation
hold_mtp.sh exported OUT for the equality step, and ab_sweep.sh reads OUT as its output directory, so hold 4's sweeps landed in equality_x/ instead of ab/. OUT is no longer exported, and the sweeps get theirs explicitly.
…ed A/B Patches 0001-0005 on the tuned MTP arm, one exclusive hold: the GPU tests and plan check pass, greedy outputs match stock on 192/192 requests with equal pools, and in-engine validation matched every plan. The held decode cycle is 6.0-8.8% shorter (patched run first, the reverse of hold 2), the stock idle measured with its own trace is 1.39-1.81 ms (hold 2's estimate agrees), and the interleaved served A/B raises per-user output rate by 7.5-9.6% at c = 1-32, every pair between 1.067 and 1.101. The remaining synchronization of 0001-0003 is FlashInfer's mask_indptr[0] = 0, which 0004 removes. The engine README's default apply command is now the whole series.
|
Verdict: REQUEST CHANGES (aa355b6; 2 blocking, both small) Blocking
Checked
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa355b683c
ℹ️ 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".
| nvidia-smi --query-compute-apps=pid,used_memory --format=csv,noheader | ||
| # A failed plan check, equality or validation check fails the hold (the stock | ||
| # profiles above still ran, so the hold's output is usable for the stock side). | ||
| [ "$OK" = 1 ] || { echo "=== hold failed: plan check, MTP equality or validation did not pass"; exit 1; } |
There was a problem hiding this comment.
Gate success on pytest's exit status
When tests/test_hostgap_plan.py fails but plan_equivalence.py succeeds, $RC is only printed and $OK is subsequently set to 1 from the equivalence check. This final guard therefore runs the remaining patched experiments and exits successfully despite a failed required GPU test, allowing an invalid hold to be treated as validated; incorporate $RC into the gate before setting or testing $OK.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in aff0c0f: after the plan check, [ "$RC" = 0 ] || OK=0 folds the pytest exit code into the gate, so a failed GPU test skips the patched steps and fails the hold (the final guard now exits 1). Hold 4 itself passed its tests (8 passed, evidence/hostgap/hold4/pytest_hostgap_plan.log), so no evidence changes.
| `6b1d344887`) passed the GPU plan check, the GPU tests, in-engine validation and greedy output | ||
| equality with stock (`evidence/hostgap/README.md`, hold 4): |
There was a problem hiding this comment.
Scope the equality claim to the tested MTP arm
For readers evaluating the DFlash path, this states that the whole series passed in-engine validation and greedy output equality, but the committed evidence explicitly says the full-series DFlash pinned-KV equality is still pending (evidence/hostgap/README.md, lines 53-57); hold 4 only ran serving equality for MTP. Qualify this claim as MTP-specific so patch 0003's DFlash integration is not presented as fully validated.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in aff0c0f. The engine README now says the GPU tests and the plan check cover the EAGLE verify and the DFlash draft block, while in-engine validation and token-identical greedy outputs were checked on the tuned MTP arm only. DFlash serving equality has run only on 0001-0003 with an unpinned KV pool, and the full-series DFlash check is pending (queued hold_dflash.sh).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…igits Codex on #163: the pytest exit code was printed but not part of the hold's gate, so a failed GPU test could still run the patched steps and pass; and the engine README presented serving equality on the full series as covering DFlash, which has only run on 0001-0003. Review on #163: outputs are token-identical (tokens, verify counts, histograms), and B = 128 is -5.9%, c = 1-8 is 9.4-9.6%, two ITL medians rounded the wrong way.
|
Update to my verdict on aa355b6 (still REQUEST CHANGES): Codex's two comments on this head are valid. Add them to my two items.
|
cycle_profile.py appends windows to a label's windows.jsonl and ab_summary.py pairs every run under a label, so rerunning a hold with the same TAG would have folded old runs into new summaries without an error. A profile step now refuses a label that already holds windows, and each hold writes its sweeps to ab-<TAG>/.
|
Verdict: APPROVE (provisional, on aff0c0f: Codex has not reviewed this head yet. I will confirm once it does.) aff0c0f resolves all four items.
Pre-commit from main is clean, and the commit has no hostname or AI attribution. |
|
@codex review |
|
Verdict: APPROVE (provisional, on 53317ad: Codex has not reviewed this head yet. I will confirm once it does.) 53317ad is a self-review commit on top of aff0c0f, whose four fixes I checked in my previous comment.
|
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Verdict: APPROVE (confirmed on 53317ad) This confirms my provisional approval. Codex found no issues on this head. |
…ved A/B (#163) The host-gap paragraph, the levers-table row, the H6 status row, the hostgap register entry and the hostgap-served pending item now carry #163's results for the tuned MTP arm: all five patches validated and token-identical, the held cycle 5.9-8.8% shorter, and served per-request rate 1.067-1.101x in interleaved pairs at concurrency 1-32 (one session). DFlash with FlashInfer draft attention stays pending. Text from the host-gap agent, checked against evidence/hostgap/README.md.
Follow-up to #120 with the results of the queued MTP hold (hold 4). The whole hostgap series, patches 0001-0005, passes the GPU tests and the GPU plan check against stock SGLang, and on bench's tuned MTP arm its in-engine validation and token-identical greedy outputs. On that arm it raises served per-user output rate by 9.4-9.6% at c = 1-8, 8.9% at c = 16 and 7.5% at c = 32, in an interleaved stock / hostgap / hostgap / stock comparison where all twelve pairs fall between 1.067 and 1.101. Evidence:
evidence/hostgap/hold4/and the new "Full series 0001-0005 (hold 4)" section ofevidence/hostgap/README.md.Hold 4
One exclusive hold, 2026-10-01 19:49-20:28 UTC, repository
02a9803, engine6b1d344887(0001-0005), tuned MTP arm (s3, replayssm-spec, radix off; bench'smtp-tunedflags).Exactness (measured):
tests/test_hostgap_plan.py: 8 passed. This is its first GPU run, which Remove blocking reads from FlashInfer planning in the speculative cycle (hostgap) #120 listed as pending.segment_packbitsand the draftkv_indptr.Held-batch decode cycle, untraced (measured; patched server first, the reverse of hold 2):
Where the gain is (traced, attribution only): the GPU's wait between the draft and the verify fell from 1.54-2.18 ms to 0.52-0.97 ms, and verify planning is exposed for 0.13-0.58 ms instead of 1.09-1.75. No blocking synchronization remains on the verify or draft planning paths. That includes the last one 0001-0003 left, which the #120 reviewer asked about: FlashInfer's
_compute_page_mask_indptrrunsmask_indptr[0] = 0on a CUDA tensor, which PyTorch performs as a blocking 4-byte copy from pageable host memory. 0004 uploads those offsets from pinned memory and no longer calls the helper. The wait before the draft did not shrink (0.89-1.14 ms traced, against 0.81-1.07 in stock): the host still needs 1.67-1.82 ms after the previous verify before it launches the draft. That is what is left.Served A/B (measured,
hold4/ab_mtp.json): bench.sweep with one server per sweep, identical flags except the patched worktree and its flags, c = 1-32. Every point is valid, and the mean CPU load of other processes during each point was at most 0.81 cores.Other changes
*.patch); 0004 and 0005 are no longer marked unvalidated.hold_mtp.shexportedOUTfor its equality step, andab_sweep.shreadsOUT, so hold 4's sweeps landed in~/vp-data/hostgap/equality_x/instead ofab/. The data is intact and the README's reproduction row says where it is. The script no longer exportsOUTand passes the sweep directory explicitly.hold_mtp.shandhold_dflash.shnow exit non-zero when their GPU tests (MTP), plan check, equality or validation fail; before, they always exited 0. A failed GPU test also skips the patched steps.cycle_profile.pyappends. Each hold writes its sweeps toab-<TAG>/, sinceab_summary.pypairs every run under a label.5567ce5, no conflicts).Review and Codex on aa355b6
hold4/*.json.[ "$RC" = 0 ] || OK=0before the gate is used). Hold 4's own run passed (8 passed), so no evidence changes.Pending
hold_dflash.shis queued with the full series. It runs the DFlash block-8 pinned-KV equality (binding 240K cap), patched-first cycle profiles with same-driver stock traces, and the interleaved served A/B. The DFlash gain from #120 (0.7-1.7%, sequential) stays unconfirmed until it reports. I will add the results to this PR, or open a third one if this merges first.Checks
Pre-commit passes on every changed file, including the host-identity hook. The commits are by the configured identity, with no AI attribution lines. Every number above was recomputed from the committed JSON. No new dependencies were installed.