Repository navigation
MiMo-V2.6-Flash-RL: sidecar MTP draft (-md mtp-*.gguf --spec-type draft-mtp) fails with "blk.0.attn_q not found" — draft should reuse main model weights #29345
Description
Name and Version
llama.cpp 0.4.1-dev (build 50, commit 9575389); reproduced on latest master (same commit) as well
Ubuntu 22.04.5 LTS (Linux)
Operating systems
Linux
GGML backends
CUDA
Hardware
2× Intel Xeon Platinum 8269 (Cascade Lake, 52C/104T), 768 GB DDR4-2133 ECC,
8× NVIDIA RTX 3080 20GB (sm86), dual NUMA
Models
Custom (official GGUF release): ggml-org/MiMo-V2.6-Flash-RL-GGUF
(main: MiMo-V2.6-Flash-RL-MXFP4)
Problem description & steps to reproduce
Running speculative decoding with the officially released MTP draft for
MiMo-V2.6-Flash-RL, per the model repo README:
main model via -m, mtp sidecar via -md, plus --spec-type draft-mtp.
The main model loads and runs fine without the MTP flags (~18.6 tok/s decode
on this box with 40/48 expert layers offloaded to GPU). Crash occurs as soon
as the MTP draft is enabled. Command:
numactl --interleave=all ./build/bin/llama-server -m /mnt/data4t/models/mimo-v26rl-gguf/MiMo-V2.6-Flash-RL-MXFP4-00001-of-00002.gguf -md /mnt/data4t/models/mimo-v26rl-gguf/mtp-MiMo-V2.6-Flash-RL-MXFP4.gguf --spec-type draft-mtp --spec-draft-n-max 7 --spec-draft-ngl 999 -ngl 999 -t 48 -c 262144 -np 1 -fa on -b 4096 -ub 1024 -ctk q8_0 -ctv q8_0 -ot 'blk\.(0|1|2|3)\.ffn_.*_exps\..*=CUDA0,blk\.(4|5|6|7)\.ffn_.*_exps\..*=CUDA1,blk\.(8|9|10|11)\.ffn_.*_exps\..*=CUDA2,blk\.(12|13|14|15)\.ffn_.*_exps\..*=CUDA3,blk\.(32|33|34|35)\.ffn_.*_exps\..*=CUDA4,blk\.(36|37|38|39)\.ffn_.*_exps\..*=CUDA5,blk\.(40|41|42|43)\.ffn_.*_exps\..*=CUDA6,blk\.(44|45|46|47)\.ffn_.*_exps\..*=CUDA7,blk\..*\.ffn_.*_exps\..*=CPU' -ts 1,1,1,1,1,1,1,1 --temp 1.0 --top-p 0.95 --repeat-penalty 1.05 --chat-template-kwargs '{"enable_thinking":false}' --path /home/cw/llama-ui-dist --port 8899 --host 0.0.0.0 --jinja
### First Bad Commit
## Expected Behavior
The MTP draft loads (reusing the main model's base weights, per the MTP
architecture) and speculative decoding runs.
## Current Behavior
Crash during model load. With MTP enabled, the main model itself fails first:
loader reports `check_tensor_dims: tensor 'blk.0.attn_q.weight' not found`,
then the draft sidecar load also fails with the same error. A retry pass then
attempts a ~50 GB CUDA0 allocation and OOMs. No request is ever served.
(The sidecar alone, loaded as `-m`, also fails with the same
`blk.0.attn_q.weight not found`.)
Analysis: the MTP draft is designed to reuse the main model's weights
(attention Q/K/V from base layers) and only adds its own small MTP layer set
(blk.48-50 + MTP head); the sidecar therefore only contains MTP-specific
tensors. The `-md` sidecar loading path appears to treat the draft as a
complete standalone model, requiring base-layer tensors not present in the
sidecar. The embedded-MTP packaging (MTP tensors inside the main GGUF, as in
tnhnyzc/MiMo-V2.5-MTP-GGUF) reportedly works with `--spec-type draft-mtp` on
the same build, so this is specific to the sidecar (`-md`) path.
Reproduced on latest master (9575389) as well.
### Relevant log output
## Failure Logs
0.00.000.704 I srv llama_server: initializing ...
0.00.295.789 I cmn common_param: common_params_print_info: verbosity = 3 (adjust with the -lv N CLI arg)
0.00.295.993 W srv llama_server: security: no API key is set and CORS allows all origins (see #25655)
0.00.313.694 I srv load_model: loading model '/mnt/data4t/models/mimo-v26rl-gguf/MiMo-V2.6-Flash-RL-MXFP4-00001-of-00002.gguf'
0.02.576.976 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.0.attn_q.weight' not found
0.02.576.995 E llama_model_load_from_file_impl: failed to load model
0.02.577.065 W operator(): failed to measure the memory of the extra model, fitting without it: failed to load model
0.02.577.105 W common_fit_params: failed to fit params to free device memory: n_gpu_layers already set by user to 999, abort
0.02.839.485 W load: control-looking token: 128247 '' was not control-type; this is probably a bug in the model. its type will be overridden
0.09.486.699 E ggml_backend_cuda_buffer_type_alloc_buffer: cudaMalloc failed: out of memory
0.09.486.705 E alloc_tensor_range: failed to allocate CUDA0 buffer of size 53203257600
0.11.920.771 E llama_model_load: error loading model: unable to allocate CUDA0 buffer
0.11.920.806 E llama_model_load_from_file_impl: failed to load model
0.11.920.886 E cmn common_init_: failed to load model '/mnt/data4t/models/mimo-v26rl-gguf/MiMo-V2.6-Flash-RL-MXFP4-00001-of-00002.gguf'
0.11.920.928 E srv load_model: failed to load model, '/mnt/data4t/models/mimo-v26rl-gguf/MiMo-V2.6-Flash-RL-MXFP4-00001-of-00002.gguf'
0.11.920.959 I srv operator(): operator(): cleaning up before exit...
0.11.925.110 E srv llama_server: exiting due to model loading error
## Additional Context
Related: #25924 ("Feature Request: MTP support for MiMo V2.5") and #26228
("mimo2: add MTP draft support") — the same sidecar-vs-embedded MTP packaging
question. Issue #26605 / #25574 touch MTP layer memory allocation, possibly
relevant to the ~50 GB retry OOM above.<details>
<summary>Logs</summary>
<!-- Copy-pasted short logs go into the "console" area here -->
```console
Activity
DanMurdoch2025 commentedon Sep 27, 2026
Models Tested
ggml-org/MiMo-V2.6-Flash-RL-GGUF(MiMo-V2.6-Flash-RL-MXFP4-00001-of-00002.gguf)ggml-org/MiMo-V2.6-Flash-RL-GGUF(mtp-MiMo-V2.6-Flash-RL-MXFP4.gguf)Test 1: Base Model Only (Succeeds)
The main model loads and runs without issue using manual expert tensor offloading across the 3× P40s and CPU:
Test 2: Base Model + MTP Sidecar (Fails)
Enabling the MTP draft sidecar via
-md mtp-MiMo-V2.6-Flash-RL-MXFP4.gguf --spec-type draft-mtp --spec-draft-n-max 3:Observations
-mddraft initialization route expects standalone model tensor architecture and looks forblk.0.attn_q.weight, rather than binding to the base model's existing attention layers when using--spec-type draft-mtp.ggerganov commentedon Sep 27, 2026
Re-download the MTP sidecar - it should now work.
DanMurdoch2025 commentedon Sep 28, 2026
Downloaded and tested. Q4 and Q8 MTP drafts look good. I did run into an issue with DFlash:
GitHub Follow-up Comment
2. DFlash Crash on Prompt Evaluation (
draft-dflash)Using
dflash-MiMo-V2.6-Flash-RL-Q8_0.ggufunder the exact same environment and build (a97cce86a):The server initializes and binds the speculative draft engine without error, but the process aborts as soon as the first prompt is launched: