Skip to content

quant : fix quantizing moe with mtp#24986

Merged
ggerganov merged 1 commit into
masterfrom
cisc/quantize-moe-mtp-fix
Jun 25, 2026
Merged

quant : fix quantizing moe with mtp#24986
ggerganov merged 1 commit into
masterfrom
cisc/quantize-moe-mtp-fix

Conversation

@CISC

@CISC CISC commented Jun 24, 2026

Copy link
Copy Markdown
Member

Overview

Fixes #24379
Fixes #24661

Additional information

Due to the following check and the fact that n_layer() instead of n_layer_all was being used it was impossible to quantize MoEs with MTP.

if (i_layer < 0 || i_layer >= n_layer) {
throw std::runtime_error(format("Bad layer %d for tensor %s. Must be in [0, %d)", i_layer, name, n_layer));
}

Supersedes #24832

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: арась
  • Language disclosure: Komi-Zyrian

@CISC CISC requested a review from ggerganov as a code owner June 24, 2026 20:38
@CISC CISC added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Jun 24, 2026
@CISC CISC changed the title fix quantizing moe with mtp quant : fix quantizing moe with mtp Jun 24, 2026
@ggerganov ggerganov merged commit b3ce5ce into master Jun 25, 2026
23 of 25 checks passed
@ggerganov ggerganov deleted the cisc/quantize-moe-mtp-fix branch June 25, 2026 05:36
papamoose pushed a commit to papamoose/llama.cpp that referenced this pull request Jun 27, 2026
LyndonBlack added a commit to LyndonBlack/llama.cpp-Ternary-1.58Bit-and-TurboQuant that referenced this pull request Jul 5, 2026
Key upstream additions preserved alongside turboquant modifications:
- EAGLE3 speculative decoding support (ggml-org#18039)
- Eagle3 for Qwen3.5 & 3.6 (ggml-org#24593)
- Flash MTP3 support (ggml-org#24340)
- MoE+MTP quantization fix (ggml-org#24986)
- New models: Granite Speech Plus, Cohere2-MoE
- mtmd batching API and OCR support
- KV cache sharing framework (mem_other, layer_share_cb)
- Various CUDA optimizations and server improvements

All entropy-adaptive KV cache, turboquant types, and TURBO_K_Q8
env var features preserved in merge.
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Can't quantize Qwen 3.6 35B A3B finetune Misc. bug: llama-quantize error when quantizing MiMo V2.5 / GLM 5.1

2 participants