Repository navigation
fix: load unprefixed standalone Qwen MTP weights - #6
Merged
Satchitananda merged 6 commits intoSep 6, 2026
Merged
Conversation
Satchitananda
marked this pull request as ready for review
September 6, 2026 19:05
This was referenced Oct 22, 2026
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.
Intent and behavior
Converted standalone Qwen MTP checkpoints may store predictor tensors at the root. The loader previously discarded them because it accepted only
mtp.*keys, causing missing-parameter failures.Normalize bare keys only for registered standalone checkpoints without existing
mtp.*keys. Both text and VLM loaders share the normalization. Full-model filtering, prefixed checkpoints, converted norms, quantization metadata, and strict weight validation retain their behavior. This does not change the MTP algorithm or enable production MTP.Validation and review
600821e: 611 XCTest passes, one skip; 835 Swift Testing passes. The pre-existing disabled three-test ConstraintCachingTests suite is explicitly recorded.MLX_ENABLE_TF32=0tests. Tolerances were unchanged; performance measurements use their separately recorded production precision setting.Conflict resolution — 2026-09-07
The base branch was rebased to
25d178awith an identical file tree. Merge commit7e0e1beincorporates that history and resolves all six conflicts while retaining exactly the prior PR tree (4ff00d706d7f6cf39d0530a5ee1c05cba66a0533). Runtime sources, tests, and the package manifest also remain identical to the fully tested600821eruntime.Fresh verification reran
Qwen35MTPRegistrationTestsagainst the retained unchanged-runtime build: four tests / eight parameter cases passed, including bare and prefixed text/VLM checkpoints and rejection of full-target weights. Command:MLX_ENABLE_TF32=0 swift test --scratch-path /private/tmp/qwen38-lm-clean --skip-build --no-parallel --filter Qwen35MTPRegistrationTests. All four relevant Swift files passedxcrun swift-format lint --strict; whitespace and tree-equality checks passed. No benchmark was restarted.Dependencies and documentation
Merge runtime #5 first, then this PR. Catalog #135 consumes this branch. QWEN38_INTEGRATION.md documents both layouts, text/VLM registration, fixture proof, and validation limits; README and CONTRIBUTING link the correct fork instructions.
Risk and privacy
The registration guard prevents full-target parameters from being treated as MTP weights. Fixtures use unique temporary synthetic checkpoints. No new network, telemetry, persistence, permission, signing, or production-data behavior is introduced. Production MTP remains disabled.
The owner stopped local benchmarks for a later restart. The completed native-MTP microbenchmark is retained, while the full model-replacement comparison remains unfinished; this PR makes no promotion claim.