Fix Antirez DS4 GGUFs - #2256
Merged
Merged
Conversation
SamuelOliveirads
approved these changes
Aug 4, 2026
SamuelOliveirads
left a comment
Collaborator
There was a problem hiding this comment.
Later we can try to detect actual MTP tensor presence, that's it, if we need to improve this.
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.
GGUFs from antirez will have the number of MTP layers set to 1 (the
deepseek4.nextn_predict_layersGGUF meta entry) even if they do not contain the actual MTP layer. On top of that the number of layers for DS4-Flash will be set to 43 (i.e., the layer count excluding the MTP layer), which breaks a lot of logic related to tensor loading and MTP. In the initial DS4 PR we still somehow made it work, but after #2216, antirez GGUFs stopped working (see #2248).This PR makes it so that antirez GGUFs work again. I did not see another way other than to simply reset
nextn_predict_layersto zero if the arch isLLM_ARCH_DEEPSEEK4, the number of layers is 43, andnextn_predict_layersis greater than zero.Closes #2248