Skip to content

fix: correct RecurrentGemma prefill state contract - #2300

Merged
inureyes merged 5 commits into
mainfrom
fix/issue-2288-recurrent-gemma-chunk-contract
Oct 14, 2026
Merged

inureyes merged 5 commits into
mainfrom
fix/issue-2288-recurrent-gemma-chunk-contract

Conversation

@inureyes

@inureyes inureyes commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Disable cache-level chunked prefill for RecurrentGemma because multi-token no-ID forwards intentionally reset model-owned RGLRU state. Add a loaded nonzero-weight regression proving independent prompts reset convolution and recurrent state, while stable sequence-ID chunks match one-pass logits.

Integrate main 5f334629, including MLX 243bdf09 and mlxcelverse, without source conflicts. The rebuilt CUDA test-fast binary passes all seven RecurrentGemma tests. CUDA Clippy with warnings denied, formatting, and diff checks pass. Earlier shared integration checks passed 123 Python tests and 49 WebUI fixtures; bilingual reports distinguish those results from the fresh final-pin validation.

Review found no remaining blocking correctness, security, or performance issue. The capability is global, so every honoring caller now uses whole-prompt prefill, potentially increasing transient memory for long prompts. DirectEngine's stable-ID state handling remains intact. Validation uses loaded synthetic weights, not an external checkpoint.

Closes #2288

Disable chunked prefill because no-ID multi-token forwards reset model-owned RGLRU state while preserving stable-ID continuation.

Add a loaded one-layer regression that compares reset prompts with a fresh model and stable-ID split execution with one-pass logits. Focused CUDA validation is running under the orchestrator.

Refs #2288
@inureyes inureyes added status:review Under review type:bug Bug fixes, error corrections, or issue resolutions priority:medium Medium priority area:models Model architectures, weights, loading, metadata area:inference Generation, sampling, decoding (incl. speculative, DRY) labels Oct 13, 2026
Preserve the newly merged MLX pin and overlay baseline declarations before validating the model prefill correction against current main. The model-specific implementation and synthetic regression are unchanged.
Merge current main through the mlxcelverse migration and revalidate loaded convolution and RGLRU state on MLX 243bdf09. All seven focused CUDA tests pass, including independent-prompt reset and stable-ID split equivalence. CUDA Clippy with warnings denied, formatting, and diff checks pass.

Refs #2288
@inureyes
inureyes merged commit a269883 into main Oct 14, 2026
25 of 26 checks passed
@inureyes
inureyes deleted the fix/issue-2288-recurrent-gemma-chunk-contract branch October 30, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:inference Generation, sampling, decoding (incl. speculative, DRY) area:models Model architectures, weights, loading, metadata priority:medium Medium priority status:review Under review type:bug Bug fixes, error corrections, or issue resolutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(recurrent_gemma): correct the no-ID chunked prefill contract

1 participant