Skip to content

lfm2_moe, minimax_m3 cuda: refuse leftover checkpoint tensors on full loads - #4552

Open
ashhart wants to merge 2 commits into
mainfrom
lead/cuda-leftovers-lfm2-minimax
Open

ashhart wants to merge 2 commits into
mainfrom
lead/cuda-leftovers-lfm2-minimax

Conversation

@ashhart

@ashhart ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

Follows #4537 (Qwen3). The LFM2 MoE and MiniMax M3 CUDA loaders checked each tensor they bind but ignored any they never read. On a full load (no layer limit) they now end with the checkpoint's leftover-tensor refusal. LFM2's embedding, bound twice for the tied head, is marked used once. MiniMax scopes the check to the language model's own names, so the vision tower and drafter tensors in the same directory never count as leftovers. Loads limited to a layer prefix keep today's behaviour.

Checks

  • Host tests: one extra tensor is refused by name, a complete checkpoint loads, a prefix load with the other layers present loads, and MiniMax's vision and drafter tensors do not trip the refusal; fmt, ast-check.

Still to run

Load the real LFM2 MoE and MiniMax M3 checkpoints we list for CUDA on a GB10 and confirm none is refused.

Both loaders bound their expected names but never audited what the
checkpoint held back, so a stray tensor loaded silently. Full loads
now refuse unconsumed names; a thin layer-prefix check still leaves
deeper layers unbound on purpose.

- lfm2_moe: refuseLeftovers gated on a whole-model layer count
- minimax_m3: openModelPrefix scopes the index to language_model. so
  the vision tower's and drafters' names never enter the audit, and
  the LM's real depth decides full vs thin
@ashhart
ashhart force-pushed the lead/cuda-leftovers-lfm2-minimax branch from 809f152 to ededc1c Compare November 23, 2026 17:31

This branch has not been deployed

No deployments
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