Skip to content

Living Weights on Gemma 4, step 2: the native GeGLU learner on CUDA and Metal (experimental, --slide refused) - #2062

Closed
ashhart wants to merge 4 commits into
mainfrom
lead/1803-gemma4-lw-step2
Closed

ashhart wants to merge 4 commits into
mainfrom
lead/1803-gemma4-lw-step2

Conversation

@ashhart

@ashhart ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Stages the native Gemma 4 learner for CUDA and Metal behind the existing public learning refusal. Dense 12B/31B
MLX affine4/group64 checkpoints share a GeGLU pocket, bounded native trainer and the existing family/save gate.
The trainer follows capped-head loss through residual sandwich norms, scalar, GeGLU, grouped attention and Q/K/V
preparation, combining both global K/V uses. Untaught streams skip pockets and learned prefix reuse. Load/save
preserves original packed base rows and columns. Failed device completion retains the native parent.

Host recording tests cover native dispatch, the shared learner and save failure/retry/reopen. Independent binary64
checks cover local operators and the composite attention chain against the original host backward. Eight planted
source controls are caught and restored. Native CUDA/Metal entry paths compile and lean adds no findings.

This is an experimental draft. The raw BF16 whole-graph panel fails four of six cells at the unchanged 0.15 bound,
so public --slide remains refused on both backends. Local derivative success does not qualify that panel. CUDA/M5
numerical and compiler gates, real 12B/31B keep/recall/removal, exact off tokens/speed, and CUDA/Metal saved-folder
portability are still required. The recipe describes the implementation and outstanding qualification gates. The inherited experimental Qwen4
learner also remains publicly refused.

Depends on the shared dense native learner primitives and the prepared-attention host backward.

Stacked on #2054 (Qwen4 step 2): review only the last commit.

Connect CUDA and Metal pockets, native causal pullbacks and shared persistence with bounded admission and completion-safe ownership. Add recording-device, lifecycle, save and precision contracts, with explicit raw directional diagnostics and pending device qualification.
Keep the public alias, record order and existing resource-refusal test unchanged.
@ashhart

ashhart commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Closing for now. Restacked on the rebased #2054, this experimental learner change rejects 11 hunks across 7 files (CUDA, Gemma 4, Metal, living and the Qwen4 core), which is more than a rebase. It can come back as a fresh branch on main if the learner work resumes.

  • Synthena (Ash's Agent)

@ashhart ashhart closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant