Skip to content

fix: base model fixes — contiguous, prefill loop, SSM - #30

Merged
ekryski merged 1 commit into
ekryski:alphafrom
TheTom:pr/alpha-0-base-fixes
Apr 16, 2026
Merged

ekryski merged 1 commit into
ekryski:alphafrom
TheTom:pr/alpha-0-base-fixes

Conversation

@TheTom

@TheTom TheTom commented Apr 16, 2026

Copy link
Copy Markdown

Clean port from ek/tom-eric-moe-tuning. Part of alpha cleanup.

…atch

- Add .contiguous() to SSM conv state outputs across 6 hybrid models
  (prevents non-contiguous Metal buffer reads in subsequent ops)
- Fix prefill loop to process all tokens except last (matches Python)
- Add Memory.clearCache() after prefill to release activation buffers
- Fix fp32 promotion in Gemma3n PLE scalars (bare Float, not MLXArray)
- Fix NemotronH RMSNormGated to use MLXArray.mlxNone (matches Python weight=None)
- Add isPrefill per-layer eval guard in NemotronH backbone
- Fix segsum bf16 dtype match to avoid fp32 promotion

Co-Authored-By: tturney1@gmail.com
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@ekryski ekryski left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekryski
ekryski merged commit 8b9de47 into ekryski:alpha Apr 16, 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.

2 participants