Fix DeepSeek V4 checkpoint loading and mixed quantization - #1
Merged
machiabeli merged 9 commits intoApr 24, 2026
Merged
Conversation
7 tasks
Author
|
I pushed the follow-up branch updates here: https://github.com/Thump604/mlx-lm/tree/deepseek-v4-support-fixes New commits since my last note:
Validation on the branch: Conversion evidence from the official
I still treat full sparse compressed-attention/indexer parity as unproven. The branch now has conversion, lazy-load, and Q2 smoke-generation evidence, but not a production-quality or long-context claim. |
5 tasks
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.
This adds checkpoint-driven fixes on top of the DeepSeek V4 support branch.
Changes:
ape (4, 1024)andwkv/wgate (1024, 4096).mixed_3_6preserve DeepSeek-specific attention, compressor, indexer, embedding, shared-expert, and output-critical paths at higher precision.Validation:
PYTHONPATH=/Users/David/code/mlx-lm-deepseek-v4-review \ /opt/ai-runtime/venv-live/bin/python -m pytest -q tests/test_models.py # 80 passed, 1 skipped, 3 warnings, 51 subtests passedI am leaving this draft because full checkpoint conversion/load validation is still pending, and sparse compressed attention plus learned indexer parity still needs review against the reference implementation before this should be treated as complete production support.