Repository navigation
Stack results: the composed exact stack on tuned DFlash-16, c = 1-8, three sessions - #177
Conversation
…s fell short Codex r4160910683 on #138: s4 and s5 passed the session-name check even when s1-s3 already gave three valid FULL-against-S0 ratios, so a session added after an inconclusive interval would have been pooled. admitted_sessions() applies the declared replacement clause: s4 only if s1-s3 all ran and leave fewer than three valid ratios at some c, s5 only if that still holds after s4, otherwise the analysis stops; a replacement counts only at the concurrencies that fell short, for every arm and the four-way pattern. The output records the sessions admitted at each c. Six tests (104 pass).
Written before any session's data was analysed (s1-s3 queued); it describes the rule analyze.py now enforces.
…and figure data analyze_campaign.sh runs the declared analysis into a fresh directory per run (command lines, UTC time and the committed HEAD recorded) and refuses an uncommitted tree. provenance.py records the checks amendment 1 moved to analysis time; startup_memory.py reads each server's start-up memory from its log; figures.py builds the figure tables from committed data and draws the figures from those tables.
…d the H start-up failure
… and acceptance (post hoc)
…rds and README Analysis at 2026-10-02 02:16:21 UTC (analyze_campaign.sh at 8687b45). FULL = FGH against tuned DFlash-16: per-user rate 0.986x at c = 1 and throughput 1.073x at c = 8, both decided, exact-up-to-rounding; H alone could not start at full capacity (certified-head verify graphs need about 3.2 GB more than stock), so its own ratio is void by the declared rule.
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35608a5162
ℹ️ 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 call chain of the scheduler's exception (function names of its traceback frames). | ||
| tb = log.split('Scheduler hit an exception', 1)[1] if row['scheduler_exception'] else '' | ||
| tb = tb.split('Error:', 1)[0] | ||
| row['exception_frames'] = ' > '.join(re.findall(r'File "[^"]+", line \d+, in (\w+)', tb)) |
There was a problem hiding this comment.
Regenerate the startup-memory evidence with this field
The parser now always adds exception_frames, and the README says startup_memory.csv includes the failing call chain, but the committed CSV header ends at scheduler_exception. Consequently, running the documented generation command produces a different schema from the committed evidence, while the advertised call-chain data is absent. Regenerate and commit the CSV after this parser change.
AGENTS.md reference: AGENTS.md:L15-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in dc80c7d. The evidence now comes from a fresh run of analyze_campaign.sh at b011a9c (2026-10-02 03:09:16 UTC), which includes this parser change, so the committed startup_memory.csv has the exception_frames column. Each H launch shows the same chain: run_scheduler_process > __init__ > init_model_worker > prewarm_sampling > _measure_sampling_peak > compute_dflash_sampling_correct_drafts_and_bonus > build_dflash_verify_target_probs > softmax. Every statistics file from the re-run is byte-identical to the first run at 8687b45; the README records both runs.
| bx.set_title( | ||
| '(b) Tokens per cycle for 5x (derived)\nrepair Stage A cycles, Triton verify, c = 1; open: interpolated', | ||
| fontsize=9, |
There was a problem hiding this comment.
Regenerate the gap figure after changing its title
The committed gap.png still contains the previous single-line panel title (Tokens per cycle for 5x: repair Stage A...), which is visibly clipped at the right edge, rather than this new two-line title. Thus the documented figure command no longer reproduces the committed bitmap and the intended clipping fix is not present in the delivered evidence; rerun the figure generator and commit the refreshed image.
AGENTS.md reference: AGENTS.md:L15-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
|
Red team at 35608a5: no blocking findings. The headline and every lever ratio survive an independent recomputation. Four wording fixes are below; none changes a number. What I checked
Wording to fix (optional)
Also noted
|
…n, H at c = 4 and 8, scope of the exactness class and of block 16 (red team on #177)
…: start-up call chains, figure labels; statistics byte-identical to the first run
|
Red team (issuecomment-5944781673): thanks for recomputing the ratios from the raw launch records. All four wording fixes are in at dc80c7d (README and PR body):
The exactness class now carries the equality step's scope: 320 prompts of 256 tokens at c = 1, running limit 4, the runner's default pools. The README's analysis time and commit are updated (03:09:16 UTC, b011a9c), and the statistics files are byte-identical to the 8687b45 run's. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc80c7de14
ℹ️ 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".
| vals = [ | ||
| statistics.fmean(float(r['accept_length']) for r in launches) | ||
| for (s, c2, a), launches in sorted(valid.items()) | ||
| if c2 == c and a == arm | ||
| ] |
There was a problem hiding this comment.
Pair acceptance ratios with sessions having valid S0
When an admitted session has a valid arm cell but an invalid or missing S0 cell, this comprehension still includes that arm's acceptance value while acc['S0'] excludes the session. The resulting accept_over_S0 and x_ratio_over_accept_ratio therefore compare different session populations, even though an invalid S0 launch is declared to invalidate every arm's ratio; restrict ratio inputs to sessions where both the arm and S0 cells are valid.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed; the populations should be paired. In this campaign they are the same, so the committed accept.csv is unaffected. In points.csv, every admitted session (s1-s3, admitted at every c per composition.json) has both S0 launches at every c, with no invalid reason, and invalid_points is empty. So every arm cell counted in accept.csv has a valid S0 cell in the same session. To avoid another evidence refresh here, the fix comes in a small follow-up PR after this one merges: restrict the ratio inputs to sessions where both cells are valid, add a test with an invalid S0 launch, and re-run to confirm the outputs are byte-identical.
| stop = datetime.fromisoformat(end.group(1)) if end else datetime.max.replace(tzinfo=None) | ||
| windows.append((start.group(1), datetime.fromisoformat(start.group(2)), stop)) |
There was a problem hiding this comment.
Close unfinished session windows before later sessions
If a session is interrupted before writing its end line and a later or replacement session subsequently runs, assigning the unfinished window an infinite end makes it overlap every later window. Because session_of returns the first match, later launches are silently attributed to the interrupted session in startup_memory.csv; cap an unfinished window at the next session's start or reject overlapping windows.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed; an unfinished window should not swallow later launches. In this campaign no window is open: all three session logs have their end line (s1 00:26:13-00:53:14, s2 00:53:17-01:20:15, s3 01:49:23-02:16:15 UTC, disjoint). Of the 27 launches in startup_memory.csv, the 24 with points carry the same session as their own sweep.json in points.csv. The three without points (the H launches at 00:39:08, 01:06:18 and 02:02:18) fall inside s1, s2 and s3. The fix comes in a small follow-up PR after this one merges: close an unfinished window at the next session's start and reject overlapping windows, with tests, plus a re-run confirming byte-identical outputs.
|
Verdict: APPROVE at dc80c7d Statistics are byte-identical to the declared analysis run. I hashed every file under
Statistics recomputed. From the per-session ratios in Declared rules.
Red team. At 35608a5 it found no blocking items. Its four wording fixes are in b011a9c, and I checked the new numbers:
Codex. The two P2s at 35608a5 are fixed by the refresh and answered. The two P2s at dc80c7d (diagnostics pairing with an invalid S0 cell; an unfinished session window) are answered with an explicit scope, and I verified it:
They don't affect this campaign's files. The follow-up PR the replies promise should land before any campaign with a replacement session. Hygiene. Host identity is clean on the evidence and README. Commits are authored and committed by Samuel Mausberg, with no co-author lines. |
…s and new Appendix E.4 Folds evidence/stack (#177). Fold verify, backbone GEMM routing and the certified head, composed on the tuned stock DFlash arm with 16-token blocks and timed in three pre-registered sessions: per-request rate at c = 1 0.986x (95% t interval 0.982-0.989), throughput at c = 1 0.990x (0.987-0.993) and at c = 8 1.073x (1.057-1.089), exact up to rounding in the equality step (320 prompts at c = 1). The certified head alone did not start at full capacity: its verify CUDA graphs took 3.2-3.3 GB more than stock's beside the stock verify's 48.75 GB per-position state cache. Intervals are rounded outward, as in evidence/stack/README.md. Appendix E.4 gives every arm (Table tab:stack-arms, from ratios.csv), the equality step, the start-up memory, the FGH-against-FG reading labelled as such, and the derived ceilings. The stack-composition register entry becomes an evidence entry. Section 4.5 also takes the writing lead's three wording notes (sentence split, "which excludes ... but not smaller ones", MTP "at 0.991 times its throughput").
…s and new Appendix E.4 Folds evidence/stack (#177). Fold verify, backbone GEMM routing and the certified head, composed on the tuned stock DFlash arm with 16-token blocks and timed in three pre-registered sessions: per-request rate at c = 1 0.986x (95% t interval 0.982-0.989), throughput at c = 1 0.990x (0.987-0.993) and at c = 8 1.073x (1.057-1.089), exact up to rounding in the equality step (320 prompts at c = 1). The certified head alone did not start at full capacity: its verify CUDA graphs took 3.2-3.3 GB more than stock's beside the stock verify's 48.75 GB per-position state cache. Intervals are rounded outward, as in evidence/stack/README.md. Appendix E.4 gives every arm (Table tab:stack-arms, from ratios.csv), the equality step, the start-up memory, the FGH-against-FG reading labelled as such, and the derived ceilings. The stack-composition register entry becomes an evidence entry. Section 4.5 also takes the writing lead's three wording notes (sentence split, "which excludes ... but not smaller ones", MTP "at 0.991 times its throughput").
…s and new Appendix E.4 Folds evidence/stack (#177). Fold verify, backbone GEMM routing and the certified head, composed on the tuned stock DFlash arm with 16-token blocks and timed in three pre-registered sessions: per-request rate at c = 1 0.986x (95% t interval 0.982-0.989), throughput at c = 1 0.990x (0.987-0.993) and at c = 8 1.073x (1.057-1.089), exact up to rounding in the equality step (320 prompts at c = 1). The certified head alone did not start at full capacity: its verify CUDA graphs took 3.2-3.3 GB more than stock's beside the stock verify's 48.75 GB per-position state cache. Intervals are rounded outward, as in evidence/stack/README.md. Appendix E.4 gives every arm (Table tab:stack-arms, from ratios.csv), the equality step, the start-up memory, the FGH-against-FG reading labelled as such, and the derived ceilings. The stack-composition register entry becomes an evidence entry. Section 4.5 also takes the writing lead's three wording notes (sentence split, "which excludes ... but not smaller ones", MTP "at 0.991 times its throughput").
This PR reports the stack campaign declared in #138: every lever with evidence of a gain at client concurrency 1-8, composed in one SGLang engine on top of tuned DFlash block 16 (
dflash-tuned-b16) and timed in three pre-registered sessions. It adds the declared analysis, its evidence, figure data for the paper and a results section inevidence/stack/README.md. No declared range, rule or arm changed.Result
The full stack is FULL = FGH: the snapshot-free GDN verify (F), the backbone GEMM routing table (G) and the certified LM head on the verify (H) all passed the equality step. Together they are exact-up-to-rounding against stock DFlash block 16: G rounds differently, F is bitwise and H changes no token (0 of 250,464 check-mode rows differ from the stock head). The class has the equality step's scope: 320 prompts of 256 tokens at c = 1, running limit 4, the runner's default pools. The timed sessions did not compare outputs.
Against tuned DFlash-16 (S0), session-paired over s1-s3, 95% t intervals, declared decisions (
evidence/stack/composition.json):The declared headline is the per-user rate at c = 1 (P2's latency question) and throughput at c = 8: the stack loses 1.4% at c = 1 and gains 7.3% at c = 8. It is inside its declared range only at c = 1 and below it at c = 2, 4 and 8. It leaves a factor of 5.07 to the 5x goal at c = 1 and 4.64 at c = 8 (derived). The levers this stack could time recover 1.08x of a 3.15x bandwidth ceiling at c = 8 and lose at c = 1, so by the derived bounds most of the gap is drafting (the README's gap section, with
evidence/frontier/frame.jsonand the drafter's requirement). The stack ran on block 16 only. At c = 8 the throughput envelope's arm is block 8, where F alone measured 1.058x in the drafter's single session (#133), and no composed stack was timed there.Per lever (per-user rate, c = 1 / 2 / 4 / 8):
accept.csv, post hoc).H
H alone never started. In every session its server ran out of GPU memory in DFlash's sampling prewarm. The certified head's verify CUDA graphs take 6.13-6.25 GB against 2.91 GB stock. With the stock verify's 48.75 GB intermediate GDN state cache at the tuned arm's full capacity (64 running requests, static memory 0.85), that leaves 2.43-2.56 GB after the captures (S0: 5.81 GB), too little for the 970 MiB prewarm. F removes that cache, so FGH starts. The int8 head copy itself is counted in SGLang's pool sizing. The equality hold's H runs fit because they used far smaller pools.
evidence/stack/startup_memory.csvhas every server's start-up memory.By the declared rule H's ratio is void (n = 0), and FULL = FGH stands: no other comparison uses the H arm. Amendment 2 admits replacement sessions only for FULL against S0, so none ran. The certified head's served effect alone on DFlash is unmeasured here; the certified-head benchmark measures it with matched flags. As a reading, neither declared nor a test, FGH against FG in the same sessions is +1.1% at c = 1, +0.1% at c = 2, -0.7% at c = 4 (below 1 in all three sessions) and -0.3% at c = 8, where most verifies exceed H's declared 64-row limit and run on the stock head (
last_lever.csv). The order is unbalanced: FG runs once, in the middle.Validity and checks
provenance.json):01502cc, fingerprint equal to the gate's;6cf280f7…, 320 prompts, and was last modified before the hold;84717d2, the commit every launch record names.8687b45), after s3 and after amendment 2, as a fresh run ofexperiments/stack/analyze_campaign.shthat records its command lines and HEAD. The committed files come from a re-run at 03:09:16 UTC (commitb011a9c;analysis_run.json,analysis_commands.txt), which adds the start-up call chain and two figure-label fixes. Its statistics are byte-identical to the first run's: composition, sessions, ratios, frontier, cross-session, gap and diagnostics tables, points and launches. Two earlier runs on s1-s2 tested the code; no number comes from them.drift.csv,position.csv, post hoc).dflash-tuned, cross-session, no interval), FULL's throughput at c = 8 is 1.027x.evidence/stack/equality/. Their gate and summary hash to the campaign pin.Files
experiments/stack/):analyze_campaign.shruns the whole analysis into a fresh directory per run and refuses an uncommitted tree;provenance.pyrecords amendment 1's checks;startup_memory.pyreads each server's start-up memory and the failing call chain from its log;diagnostics.pywrites the post hoc drift, launch-time and acceptance tables;figures.pybuilds the figure tables and drawsfrontier.png,ratios.pngandgap.pngfrom them.tests/test_stack_figures.py.sessions.csv: one row per arm, c and session, with x_e2e, y, accept length and exactness class;ratios.csv: geometric mean, interval, decision, declared range and exactness class;frontier.csv,gap_by_concurrency.csvandgap_by_block.csv.levers.csvrows D3, D4, D5 and D9 are updated from merged evidence (hostgap hold 4: full series validated; tuned MTP served +7.5-9.6% per user, token-identical outputs #163, Backbone: routing table against tuned MTP, and which GEMM kernels the served engine runs #166). D3 names drafter patch 0005 (open PR Drafter: narrow value tiles for the fold's ring-writing verify (patch 0005): exact; removes the c <= 4 loss but costs the c = 8 gain (record of the trade-off) #167), which targets F's small-batch cost and is not in this campaign. The evidence index row forstack/is updated too.Testing
tests/test_stack_analysis.py,tests/test_stack_figures.py): 122 passed, and pre-commit passed on the PR's code, README and inventory files, in a CPU window atb011a9c, the commit the committed analysis ran at.dc80c7dadds only the evidence refresh: the README's analysis time and commit, the regeneratedstartup_memory.csv(withexception_frames),frontier.pngandgap.png,provenance.json(new check time) and the run record.ratios.csv(issue comment on this PR). Its four wording fixes are in the README and this body: the foreign-CPU statistic, FGH against FG at c = 4 and 8, FULL's launch-level variation in s3, and the scope of the gap claim and of block 16.scripts/check_paper_references.py: not applicable, since this PR changes no paper file.Not done: the diagnostic
hold_oracle.sh(perfect blocks on the composed stack, outside the decision) has not run.