Repository navigation
State #175: the concurrency pair's cache check, plain-decoding switches and targeted tests (App D, notes) - #188
Conversation
… pairs and targeted tests App D: the concurrency pair rerun with the cache-hashing tap and fixed pools enters every differing kernel with identical caches (gated norm 30, decode attention 5, batched-prefill down-projection 5; tie rule and head GEMM 0). Notes: the plain-decoding switches change plain outputs as often as MTP's, so neither effect is specific to speculation; aborts on a small recurrent-state pool (slot assignment not recorded), run-to-run repeats (176 of 176 bitwise) and chunked prefill (changes only at ties or one step; prompt-position drifts unexplained, not read as a state error). state-targeted becomes a register entry; state-mech shrinks to the runs still queued.
|
@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: d7e6a8f12f
ℹ️ 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".
| \paragraph{Plain decoding against MTP} For plain decoding against MTP speculation with three draft steps, both at batch 1, it is layer 0's GDN recurrence output at the first speculative cycle, in all 167 prompts analysed, while that layer's causal-convolution output, the recurrence's immediate input, is bitwise equal. At that commit, decode and target verify call different Triton kernels (\code{fused\_recurrent\_gated\_delta\_rule\_packed\_decode} and \code{fused\_sigmoid\_gating\_delta\_rule\_update}), which fuse the gating and the state update differently. Rerun with the cache-hashing tap on 40 of these prompts, every cache entering every forward is identical up to that output, and the first cache to differ is layer 0's recurrent state, which the differing kernel writes~\ev{state-cache}; the two kernels therefore produce different bits from identical inputs and identical state. The two tapped servers had different pools, and MTP's draft layer attends over its own cached prefix, so a different copy of a shared prefix could change the proposals, the accepted lengths and the later verify forwards without any target attention output differing first. The location of the first difference bounds the pools only for that difference, which is at output index 1, the first position of the first verify forward, whose layer-0 recurrence output depends on its token and on the state left by the prefill, not on the proposals or on cached attention values (reasoning from the row-wise structure of the kernels); whether the pools contributed to the divergences that follow is not yet known~\pend{state-mech}. | ||
|
|
||
| \paragraph{Plain decoding at two concurrencies} For plain decoding at concurrency 1 against 32 (batches of up to 16; 40 tapped prompts), it is a GDN gated RMSNorm in decode in 29 prompts, a full-attention layer's output in decode in 6, and the MLP down-projection of a prefill batched with other requests in 5; never the GDN recurrence and never a decode GEMM. These two tapped servers also had different pools. A different copy of a shared prefix's attention values would first show at a full-attention output, so for the 6 prompts that first differ there the pools and the prefix cache's history are possible causes besides the attention kernel's dependence on the batch; for the other 34, every attention output before the first difference agrees. The gated norm chooses how many positions each program reduces from the batch's size (one per program for a batch of 1, two for a batch of 16), which changes the reduction tile and so the FP32 sum order of a position; the same function returns a constant in batch-invariant mode. FlashInfer's decode plan and cuBLAS's GEMM choice also depend on the batch. For this pair these are first differing module \emph{outputs} only; that both runs enter the differing kernel with equal caches has not been checked yet~\pend{state-mech}. | ||
| \paragraph{Plain decoding at two concurrencies} For plain decoding at concurrency 1 against 32 (batches of up to 16; 40 tapped prompts), it is a GDN gated RMSNorm in decode in 29 prompts, a full-attention layer's output in decode in 6, and the MLP down-projection of a prefill batched with other requests in 5; never the GDN recurrence and never a decode GEMM. These two tapped servers also had different pools. A different copy of a shared prefix's attention values would first show at a full-attention output, so for the 6 prompts that first differ there the pools and the prefix cache's history are possible causes besides the attention kernel's dependence on the batch; for the other 34, every attention output before the first difference agrees. The gated norm chooses how many positions each program reduces from the batch's size (one per program for a batch of 1, two for a batch of 16), which changes the reduction tile and so the FP32 sum order of a position; the same function returns a constant in batch-invariant mode. FlashInfer's decode plan and cuBLAS's GEMM choice also depend on the batch. Rerun with the cache-hashing tap and identical fixed pools (at most 16 running, 98,304 attention-cache tokens, 80 recurrent-state slots), with both sessions serving all 320 prompts in the same order, all 40 prompts diverge again, and in every one the caches entering every forward are identical up to the first differing module output: a gated norm in decode in 30, layer 3's attention in decode in 5 and the batched-prefill down-projection in 5~\ev{state-cache}. The 5 attention cases are 5 of the 6 above and enter with identical attention values, so FlashInfer's decode attention itself gives different bits in a batch of 15 or 16 than alone; the sixth, \code{mt\_bench-0056}, first differs at a gated norm at output index 29 once both sessions share one request history. At the divergence: tie rule 0, head GEMM 0; \modelcons{} 3 rounding flips, 16 order flips, 21 ambiguous; \modelhopper{} 14, 17, 9. |
There was a problem hiding this comment.
Update the figure caption with the completed cache check
This rerun resolves the concurrency-pair question by finding identical entering caches and identical fixed pools, but the caption immediately below still says that cache agreement is pending and that each pair's tapped servers had different pools. As a result, Appendix D gives contradictory statuses for the same concurrency mechanism; update the caption to distinguish the original plotted run from this completed fixed-pool rerun and remove the stale pending claim.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 66ffd68. The caption now says the plotted runs' tapped servers had different pools, and that 40-prompt reruns with the cache-hashing tap find the entering caches identical for both pairs: for the concurrency pair with identical fixed pools, up to the first differing module (30, 5 and 5 against the plotted 29, 6 and 5). The stale 'pending' clause is gone, and so is the matching line in the file's header comment.
…ed fixed-pool cache check (Codex on #188)
|
@codex review |
|
Verdict: REQUEST CHANGES at 66ffd68 Reviewer 2 (paper fidelity). I read every changed sentence against
Two summary sentences in the notes drop or overstate something, and those two block approval. Checked and correct
Blocking
Optional
Build: my build of d7e6a8f is queued in the CPU window. I will build the next head and check it together with Codex. |
…he token; H5 row adds MTP's 28 of 40 aborts and the unexplained prefill drifts (reviewer 2 on #188)
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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 at ad45fbd Reviewer 2. I checked the delta from 66ffd68, where I had requested changes, to ad45fbd. Both blocking items and the optional item are fixed.
Build at ad45fbd, CPU window, one core: 0 LaTeX warnings, 0 overfull or underfull boxes. The paper is 48 pages, unchanged, with the Conclusion and the References heading on p10. The notes are 54 pages. |
Folds state's #175 results (merged at 13dada4) into Appendix D and the research notes. The text is state's, with two scoping constraints from main and the reviewer. First, the abort test ran on a small recurrent-state pool; slot reuse was its intent but was not measured, so it is never written as a tested condition, the register title included. Second, the chunked-prefill drifts in prompt-position log-probabilities are unexplained, and they are not read as a state error. The paper's main text is unchanged.
Appendix D (
sections/app_exactness.tex)state-mech) is now measured (cachecheck_v4_plain_c1_vs_c32.json). The concurrency pair was rerun with the cache-hashing tap and identical fixed pools: at most 16 running, 98,304 attention-cache tokens and 80 recurrent-state slots, with both sessions serving all 320 prompts in the same order.perturbation_pinned.json. The sentence now says "any of the three floors".Research notes
engine.tex, configuration switches: the plain-decoding counterparts are now measured.engine.tex, targeted tests (closesstate-targeted):engine.tex, open questions: shortened to the runs still queued.serving.tex: adds the plain-decoding counterpart of the prefix-cache prefill change (192 of 193 long prompts, 0 of 127 short).status.tex: the H5 row is updated.Registers (both documents).
state-targetedbecomes an entry (notes only, as only the notes cite it).state-cachegainscachecheck_v4_plain_c1_vs_c32.jsonandrun_tap_v4_batch.sh, and its description covers the concurrency pair.state-pinnedadds the plain-decoding switches, the second MTP session and the bench comparison.state-mechshrinks to the runs still queued: the log-probabilities-off, retraction, FlashInfer and ReplaySSM runs, and the remaining cache checks.Review. Codex at d7e6a8f, one P2: the Appendix D figure caption still called the concurrency pair's cache check pending. Fixed in 66ffd68: the caption now separates the plotted runs (different pools) from the fixed-pool rerun (identical entering caches), and the file's header comment is updated to match. The thread has a reply.
Reviewer 2 at 66ffd68 (REQUEST CHANGES), two notes summaries, fixed in ad45fbd. First,
serving.texnow says the switches change the first output token's top-five log-probabilities, which come from the prefill alone; in tokens they change 96 and 166 plain outputs. Second, the H5 row instatus.texnow gives MTP's 28 of 40 abort probes, the rest at ties or within one BF16 step, and the unexplained prefill drifts of up to 5.22 nats. Optional: App D's "different pools" sentence now excepts the fixed-pool concurrency rerun.Build. CPU window, one core,
latexmk -g, at d7e6a8f; the rebuild at the head is queued.scripts/check_paper_references.py --rev HEAD: clean.