Repository navigation
Bind Gemma prompt arithmetic to registered cluster stages - #1569
Closed
jonathan308 wants to merge 4 commits into
Closed
jonathan308 wants to merge 4 commits into
jonathan308 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Gemma's registered stage previously used wide prompt projections and expert reductions that can produce different bytes across Apple GPU generations. This draft activates the reviewed token-preserving prompt scope only for prefill and binds both changed arithmetic policies into the exact receipt used for plan/cache identity.
The stable family policy, required environment, chunk framing, decode scopes, normalization and head behavior remain unchanged. This is a separate child of #1568, and pins SDK commit
7a2582c736abfe1b3b33bf4fef347d9db9f3da3cin SDK #345.Before
After
Validation: eight actual SDK CPU tests and one runtime receipt test pass; all 231 SDK and 351 Runtime source files compile. The independent review checked all 12 preimages/postimages and retained the tiny CPU normalization diagnostic as an explicit limitation. Reviewed root patch SHA-256:
6a77ee3805b702ae266d12685dddd4cf9c2ee4b5858d95c456744033ca936fdd. The root publication files match that review exactly; SDK formatting is the only source transformation.These checks pass. The focused runtime suite is
GemmaPrefillArithmeticTests; the SDK suites areGemma4PrefillProjectionTestsandGemma4PrefillExpertTests. Recorded CPU checks use isolated actual-source closures, and do not imply full-model Metal qualification.This remains a draft: complete artifact/rank/context parity, installed worker behavior, memory and throughput need fresh hardware validation. The change does not establish whole-layer singleton equivalence, add a tensor adapter or restore vision/video ingress. Final acceptance requires tensor parallel for every included model with all supported capabilities retained. Prior text-only or phase-split results are partial or excluded evidence, respectively. No numerical tolerance or memory safeguard is relaxed.
Additional actual-weight diagnostic: six layer-zero shared-MLP widths (1, 8, 127, 128, 511, 512) ran on both M5 Max and M3 Ultra using the production arithmetic flags. Corrected full intermediate and post-normalization bytes match across chips for all six widths; the original wide path differs at 127/128/511/512. Original rectangular normalization is retained and its diagnostic token partition matches at the actual 2816-wide geometry. This is component evidence, not full-model or modality/TP qualification.
Need help on this PR? Tag
@codesmith-botwith what you need.