Repository navigation
Backbone: routing table against tuned MTP, and which GEMM kernels the served engine runs - #166
Conversation
…ed engine runs Hold 3, one exclusive session. On tuned MTP the routing table gains nothing: B/A per pair 0.993 and 0.989 at c = 1 (0.2% of that is fewer tokens per verify cycle, 3.273 against 3.279), and the c = 8-128 pairs straddle 1 within the session's 0.8-2.4% spread. An nsys trace of plain decoding (node-level graph trace, c = 1 and 16) read by insitu_gemm.py shows every route dispatching as tabled (152 GEMV calls at M = 1, 120 Triton calls at M = 16), and the decode-graph span shrinking by 102 us at M = 1 and 45 us at M = 16 against isolated predictions of 197 and 120 us. Unprofiled windows of the same servers shorten the step by 111 and 15 us. This accounts for part of the c = 8 shortfall reported in #153.
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. |
|
Verdict: APPROVE (provisional, on 81dd77e: Codex has not reviewed this head yet. I will confirm once it does.) MTP serving (
In-situ trace (
Checks. The README, engine README, evidence index and TASKS rows match. Pre-commit from main is clean, and there is no hostname or AI attribution. Optional. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 459bf2d72e
ℹ️ 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".
| python -m bench.sweep --arm mtp-tuned --label backbone-mtp-v1-B --session abba-1 \ | ||
| --sglang-worktree ~/sglang-wt/backbone --env SGLANG_BACKBONE_GEMM=1 --env SGLANG_BACKBONE_PDL=1 \ | ||
| --env SGLANG_BACKBONE_MERGE_IN_PROJ=1 --env SGLANG_BACKBONE_GEMM_TABLE=<table> \ | ||
| --concurrency 1 8 32 128 --repeats 1 --port 30471 --out ~/vp-data/backbone/e2e/mtp-v1 |
There was a problem hiding this comment.
Add all four paired sweep invocations
This block launches only backbone-mtp-v1-B for session abba-1, while the following bench.pareto command consumes B/A/A/B directories spanning both abba-1 and abba-2. Merely removing the environment switches, as the comment suggests, would retain the B label and first session, so the three remaining runs behind the committed points, launches, and pairs cannot be regenerated; include their exact labels, sessions, and invocations.
AGENTS.md reference: AGENTS.md:L15-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c022937. The commands block now gives all four sweeps of each paired hold as a loop with their labels and sessions (B1/A1 abba-1, A2/B2 abba-2), and the B profiling run with SGLANG_BACKBONE_GEMM, _PDL, _MERGE_IN_PROJ and _GEMM_TABLE in run_profiles.py's environment, writing to plain-B. Hold 2's sweep block had the same gap and is fixed the same way.
| python experiments/profiling/run_profiles.py --arm plain --mode nsys --concurrency 1 16 \ | ||
| --out-dir ~/vp-data/backbone/nsys/plain-A --port 30472 \ | ||
| --extra-server-args "--disable-radix-cache --max-mamba-cache-size 128 --max-running-requests 128 --stream-interval 4" |
There was a problem hiding this comment.
Add the missing B profiling command
Following this block produces only the A reports under plain-A, but the analysis immediately consumes plain-B/plain_bs{1,16}.nsys-rep and the commit includes nsys_windows_plain_B.jsonl. The preceding comment does not provide an executable B invocation, its output directory, or how the four lever variables are applied, so half of the in-situ evidence cannot be reproduced from the documented commands; add the exact B command.
AGENTS.md reference: AGENTS.md:L15-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c022937. The commands block now gives all four sweeps of each paired hold as a loop with their labels and sessions (B1/A1 abba-1, A2/B2 abba-2), and the B profiling run with SGLANG_BACKBONE_GEMM, _PDL, _MERGE_IN_PROJ and _GEMM_TABLE in run_profiles.py's environment, writing to plain-B. Hold 2's sweep block had the same gap and is fixed the same way.
Codex on 459bf2d: the commands block showed only the first B sweep and only the A profiling run. It now gives all four sweeps of each paired hold, with their labels and sessions, and the B profiling run with the lever variables in its environment. Reviewer nits: the c = 128 MTP spread is 0.81% on the mean basis of the other rows, and the summaries say that only one of the two c = 1 MTP pairs is beyond the session's spread.
|
@codex review |
|
Verdict: APPROVE (provisional, on c022937: Codex has not reviewed this head yet. I will confirm once it does.) c022937 changes only text and resolves both Codex P2s and my two nits.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0229372de
ℹ️ 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".
| The same design in one exclusive hold (2026-10-01, 22:05-22:23 UTC): arm `mtp-tuned` (native MTP, | ||
| three-step chain, buffered GDN verify, radix cache off, 128 GDN slots), both arms on the backbone |
There was a problem hiding this comment.
Test against the actually tuned low-concurrency MTP arm
For c = 1, 8, and 32 this uses mtp-tuned, although bench/arms.toml explicitly defines that arm as high-concurrency and mtp-tuned-triton as the low-concurrency tuned arm. The confirmation evidence shows the latter is substantially faster at these points (for example, 532 vs. 456 tok/s at c = 1 and 3,009 vs. 2,682 at c = 8). Because the routing kernels can interact with the different attention backend through GPU scheduling, these runs do not establish the repeated repository-wide claim that the routing table gains nothing against tuned MTP at those concurrencies; rerun the pairs with mtp-tuned-triton or narrow the conclusion to the FlashInfer/high-concurrency configuration.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed, the claim was wider than the run. Fixed by scoping in 471ffa1, with no rerun in this PR. Every statement of the result (evidence/backbone/README.md, README.md, evidence/README.md, engine/sglang/README.md, TASKS.md and the PR body) now names the arm, MTP with FlashInfer attention (mtp-tuned), and says the routing table is untested against mtp-tuned-triton at c = 1-32. The same B-A-A-B on mtp-tuned-triton at c = 1, 8 and 32 is queued as an exclusive hold, and its result will come in a later PR.
|
Verdict: REQUEST CHANGES (c022937; withdraws my provisional approval. Codex r4161235048 (P1) is valid.)
Narrow every such sentence to the arm measured, for example: "against bench's high-concurrency MTP arm ( |
Codex P1 on c022937: bench/arms.toml tunes mtp-tuned for high concurrency and mtp-tuned-triton for c = 1-32, where it serves MTP faster (532 against 456 tokens/s at c = 1). Hold 3 ran mtp-tuned only, so every statement of its result now names the arm, MTP with FlashInfer attention (mtp-tuned), and says the routing table is untested against mtp-tuned-triton at c = 1-32. That pairing is queued as hold 4.
|
@codex review |
|
Verdict: APPROVE (provisional, on 471ffa1: Codex has not reviewed this head yet. I will confirm once it does.) 471ffa1 resolves Codex r4161235048 (P1). Every MTP sentence is now scoped to the arm measured: Pre-commit from main is clean, and the commit has no AI attribution. My number checks of 81dd77e and c022937 stand. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 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 9c3e6c2) This confirms my provisional approval. Codex found no issues on this head (22:44 UTC). |
…backbone routing against MTP and the in-situ GEMM trace (#166) P2 Test 2 now gives the engine's exact recycle and keep sweeps at B = 16 and 32 and P2's rejection; a new P12 subsection reports the static screen on the head compiled through the last FFN. The backbone paragraph adds the Nsight trace of the served decode step and the session against mtp-tuned, and narrows backbone-served to mtp-tuned-triton and exactness under MTP. Register entries repair-jacobi and repair-p12 added; status rows P2, P12 and H6.
This adds hold 3's two results to
evidence/backbone/("Paired serving: lever v1 against MTP with FlashInfer attention" and "Which GEMM kernels the served engine runs"): paired serving of the routing table (lever v1) against MTP with FlashInfer attention (mtp-tuned), and an nsys trace of plain decoding. The trace accounts for part of the gap #153 left open: at c = 8, plain decoding gained 0.4%, against about 90-98 µs of isolated savings predicted. No code changes. The analysis script,experiments/backbone/insitu_gemm.py, merged with #153 and ran at main 43dd775.Lever v1 against MTP with FlashInfer attention (
mtp-tuned)One exclusive session, order B A A B. Both arms run the backbone engine and A has every switch off. The arm is
mtp-tuned, measured at c = 1, 8, 32 and 128.bench/arms.tomltunesmtp-tunedfor high concurrency; at c = 1-32 bench serves MTP faster withmtp-tuned-triton(532 against 456 tok/s at c = 1). The routing table is untested against that arm. Foreign CPU averaged 0.19-0.36 cores, and no point is invalid.mtp-tuned.pending.In-situ trace (plain decoding, c = 1 and 16, A then B)
insitu_gemm.pylabels every complete decode-graph replay of a 2-second window with node-level graph tracing.in_proj_qkvz,out_proj,o_proj,gate_upanddown;qkv_projandin_proj_bastay on cuBLAS.Also
README.md,evidence/README.mdandengine/sglang/README.mdare updated.TASKS.md: the backbone rows (H6, the workstream table and the task list) record PR Backbone: served exactness of each switch and paired plain serving of the routing table #153 and this PR, and name the one item not run.~/vp-data/backbone/nsys/. The unprofiled windows' records are committed asserved/nsys_windows_plain_{A,B}.jsonl.Not covered
mtp-tuned-tritonat c = 1-32. It is queued as hold 4 (exclusive, normal lane), and its result will come in a later PR.mtp-tunedat c = 1 is slower.Except for hold 4, none of these is queued.
Review rounds
mtp-tuned(FlashInfer), which bench tunes for high concurrency, notmtp-tuned-triton. Fixed by scoping in 471ffa1, with no rerun in this PR. Every statement in the evidence README, README.md, evidence/README.md, engine/sglang/README.md, TASKS.md and this body now names the arm, MTP with FlashInfer attention (mtp-tuned), and says the routing table is untested againstmtp-tuned-tritonat c = 1-32. The B-A-A-B onmtp-tuned-tritonat c = 1, 8 and 32 is queued as hold 4 (exclusive ticket 5-1790894464300992200, linted).