Skip to content

Fix Antirez DS4 GGUFs - #2256

Merged
ikawrakow merged 2 commits into
mainfrom
ik/fix_antirez_ggufs
Aug 5, 2026
Merged

Fix Antirez DS4 GGUFs#2256
ikawrakow merged 2 commits into
mainfrom
ik/fix_antirez_ggufs

Conversation

@ikawrakow

@ikawrakow ikawrakow commented Aug 4, 2026

Copy link
Copy Markdown
Owner

GGUFs from antirez will have the number of MTP layers set to 1 (the deepseek4.nextn_predict_layers GGUF 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_layers to zero if the arch is LLM_ARCH_DEEPSEEK4, the number of layers is 43, and nextn_predict_layers is greater than zero.

Closes #2248

@SamuelOliveirads SamuelOliveirads left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later we can try to detect actual MTP tensor presence, that's it, if we need to improve this.

@ikawrakow
ikawrakow merged commit 6633d19 into main Aug 5, 2026
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.

Bug: After #2216 DS4 segfaults. Previous commit runs.

2 participants