Repository navigation
fix: preserve Gemma 4 12B long-context MTP parity - #2315
Merged
Merged
Conversation
Long-context 12B MTP verification diverged from classic decode because buffered sliding-ring and full attention used a different reduction order, and serving prefill did not follow the classic chunking policy. Match the measured 12B geometry to row-wise singleton verification, extend probe coverage, and retain fail-closed dispatch for unsupported layouts. Record M1 Ultra evidence: 107 focused tests, a 256-position teacher trace, three byte-identical free generations, and unchanged 31B/Qwen regressions. Startup-cost and release-throughput measurements remain pending. Refs #1986
Preserve the existing 31B and CUDA policies while enabling the measured 12B correction only for active Metal execution, not CPU-selected Metal or unmeasured ROCm. Add a pure backend/geometry matrix test and update the shared contract comments. The focused test and workspace formatting check pass. Existing M1 release evidence retains its pre-refinement artifact provenance; final-head release validation follows separately. Refs #1986.
Record three counterbalanced release repetitions, matching output hashes, real MTP counters and the negative M1 throughput result. Include startup cost with its interval definition and distinguish measured artifacts from the subsequent backend-scope refinement. Preserve exact request bodies and validation switches rather than describing forced B=1 runs as product defaults. Final-head release smoke remains pending. Refs #1986.
Record matching final-source classic/MTP outputs and live draft counters for all three long prompts. A separate startup with no runtime environment overrides passes the exactness guard; this is not a default throughput claim. Keep repeated performance measurements tied to their original artifact and expose the negative M1 result in the benchmark index. Refs #1986.
4 tasks
Record the long-buffered divergence, measured correction, backend restriction, and final-source smoke in English and Korean. Preserve the negative M1 Ultra throughput result, startup cost, artifact provenance, unchanged defaults, and unmeasured backend limits. Validation: - cargo fmt --check - git diff --check - benchmark JSON and report evidence consistency checks Refs #1986
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduce Gemma 4 12B long-buffered MTP divergence on current Metal, then extend the exact-verification contract only to its active-Metal geometry. Preserve existing CUDA/31B policy, physical-ring and maskless single-query attention, classic prefill chunking, fail-closed layout restrictions and CUDA-only row-wise RoPE.
Validation on M1 Ultra: 107 narrow tests and the refined backend matrix pass. Corrected width-4 verification has 0/256 teacher-forced top-1 disagreements and 0/155 decided disagreements behind 1,536 tokens, versus 18/256 and 2/155 before correction. Three long-prompt completions match stable classic references; all six 31B/Qwen before/after MTP outputs and counters match.
Three counterbalanced release repetitions preserve all 27 output hashes. Forced-width MTP is slower here: paired MTP/classic throughput medians are 0.837x/0.903x/0.815x. Scheduler-setup-to-probe-pass increases from 1.245s to 7.041s; process-to-health from 4.796s to 10.408s. These are pinned validation settings, not untouched defaults. Default eligibility/profitability policy is unchanged. Benchmark evidence retains dispersion, load, exact requests and artifact provenance.
Final-source release smoke also matches all three classic/MTP outputs and prior hashes; a separate default-environment startup passes without an inexact override. Implementation, security review and bilingual reports are complete; all applicable CI checks pass. Repeated release measurements retain bd6d33f provenance before the backend-scope refinement; final-source correctness is recorded separately. M5, CUDA, ROCm and CPU are unmeasured here; this does not claim original-M5 validation or a CUDA-only resolution.
Closes #1986