Th/fix qwen35 mtp companion mainline - #44
Merged
Thireus merged 2 commits intoAug 16, 2026
Merged
Conversation
Thireus
commented
Aug 16, 2026
Owner
- I have read the contributing guidelines
- Self-reported review complexity:
- Low
- Medium
- High
A predictor-only MTP GGUF reports the full block count (n_main + nextn_predict_layers) but only ships the NextN block, so loading one with -md failed: check_tensor_dims: tensor 'blk.0.attn_norm.weight' not found create_qwen35_tensors() and create_qwen35moe_tensors() create every main block as required. Detect the predictor-only case the same way create_step35_tensors() does and mark the absent blocks TENSOR_SKIP|TENSOR_NOT_REQUIRED. Qwen3.5 also has to use the common MTP package contract, otherwise the predictor-only GGUF is never classified as a companion, and the target is not classified TARGET_ONLY - which is what makes it export the hidden states the companion consumes. The remaining two hunks cover cases the above newly reaches: a predictor-only GGUF passed as -m now loads far enough to abort in the graph builder, and its empty main blocks reach split_recurrent_tensors() under -sm graph.
…arch Review follow-up. A dense NextN block loads q_proj as optional because it can be shared with the last main block. A predictor-only GGUF has no main blocks, so one built that way loaded with wq == nullptr and then hung. Require the tensor in that case so the load fails naming it. eh_proj, attn_q and the MLP are all optional on that block, so the tail probe stays on enorm, which is required - the comment there said only eh_proj. Adding Qwen3.5 to the common MTP package contract also made common_speculative_has_recognized_mtp_companion() accept any GGUF classified COMPANION, with no architecture check of the kind the Step and DeepSeek branches have. Add it, plus the predictor count. Dense and MoE are separate architectures, so the comparison is on the arch itself.
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.