Repository navigation
fix: calibrate DeepSeek V4.1 text generation - #3780
Merged
Merged
Conversation
Use the trained chat format when a conversion omits its template. Match activation rounding, expert weighting and local and compressed attention to the reference inference path. Verify ordinary and speculative decoding against the same 2-bit checkpoint.
A cached fp_qmv.cu from another build instantiated an unsupported CUTLASS tile in the WebUI and OpenXLA CI jobs. Restore tracked CUDA backend files absent from the active overlay set from the pinned checkout during configure.
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.
Follow-up to #3686. DeepSeek V4.1 conversions that omit the chat template now use the official turn format in CLI and API requests. The fallback defaults to direct answers and supports explicit reasoning requests.
Match FP8 activation rounding, expert weighting, attention sinks, compressed attention and residual accumulation to the training-time numerical conventions. Bound sliding-window prefill while retaining the preceding keys at chunk boundaries.
On the real 2-bit checkpoint, ordinary and DSpark CLI decoding produced identical token IDs on a 128-token greedy probe, and the chat API returned identical bytes. Repeating the probe after integrating the latest main produced 621 matching bytes across all three paths. A Korean request for the capital of France returned 파리 and stopped. Long greedy explanations still repeated in both mlxcel and mlx-vlm, with different continuations.
Local validation passed 103 V4.1 tests, formatting and Clippy. The full workspace run passed 18,844 tests with one Laya parity failure. The pre-change binary reproduced the same discrepancy on the same local checkpoint (1.1712 versus 1.1694).
The WebUI and OpenXLA CUDA builds reused an obsolete fp_qmv.cu from a previous overlay. Extend the existing configure-time restoration to tracked CUDA backend paths absent from the current overlay set so cached builds compile the pinned source.