Open
Labels
Description
Name and Version
Commit: 42d9581
Command line:
llama server -m Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf --spec-draft-model mtp-Qwen3.8-Flash-Next-Q8_0.gguf -c 262144 --spec-type draft-mtp -lv 4
from https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF
Suggested fix from deepseek, with this change it does not assert and completes the warmup:
commit 0b11614b93a30238186feb2da59a9fbf2ab777bc
Author: Frederik M.J.V. <freqmod@gmail.com>
Date: Thu Oct 1 18:11:26 2026 +0200
Fix assert while running llama cpp (co authored by ds 4.1 flash)
diff --git a/src/models/qwen4exp.cpp b/src/models/qwen4exp.cpp
index ab12c1d54..c8c94434c 100644
--- a/src/models/qwen4exp.cpp
+++ b/src/models/qwen4exp.cpp
@@ -568,8 +568,10 @@ llama_model_qwen4exp::graph_mtp::graph_mtp(const llama_model & model, const llm_
// the draft memory has no recurrent layer, but its input still has to be allocated
ggml_build_forward_expand(gf, inp_hyb->get_recr()->s_copy);
+ // the MTP block itself is dense attention, so it needs the k-pool inputs only when its
+ // compress ratio marks it as a QSA layer; otherwise no node in this graph reads them
llm_graph_input_kpool * inp_kpool = nullptr;
- if (mctx_hyb->get_idx() && hparams.indexer_kpool > 0) {
+ if (mctx_hyb->get_idx() && hparams.indexer_kpool > 0 && hparams.dsv4_compress_ratios[il] > 0) {
GGML_ASSERT(mctx_hyb->get_idx()->get_n_kv() == mctx_hyb->get_attn()->get_n_kv() &&
"the indexer cache must track the attention cache cell for cell");
inp_kpool = build_inp_kpool(mctx_hyb);
Operating systems
Linux
GGML backends
HIP
Hardware
AMD Radeon AI PRO R9700
Models
Qwen3.8-Flash-Next-GGUF
Problem description & steps to reproduce
Start the model, wait for it to assert
First Bad Commit
No response
Relevant log output
Logs
0.06.830.912 I sched_reserve: reserving ...
0.06.949.656 I sched_reserve: ROCm0 compute buffer size = 349.02 MiB
0.06.949.660 I sched_reserve: ROCm_Host compute buffer size = 798.15 MiB
0.06.949.662 I sched_reserve: graph: nodes = 148, splits = 2, input objects = 6, input tensors = 7
0.06.949.663 I sched_reserve: reserve took 118.75 ms, sched copies = 1
/mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/ggml/src/ggml-backend.cpp:205: GGML_ASSERT(buffer) failed
...
[New LWP 49425]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
__syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
56 ret
#0 __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
56 ret
#1 0x00007feb101054cb in internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=0, a6=0, nr=61) at ../sysd
eps/unix/sysv/linux/sysdep-cancel.h:53
53 result = __syscall_cancel_arch (&pd->cancelhandling, nr, a1, a2, a3, a4, a5,
#2 syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=0, a6=0, nr=61) at ../sysdeps/unix/sysv/linux/sysdep-canc
el.h:79
79 long int r = internal_syscall_cancel (a1, a2, a3, a4, a5, a6,
#3 __GI___wait4 (pid=<optimized out>, stat_loc=<optimized out>, options=<optimized out>, usage=<optimized out>) at ../sysdeps/unix/sysv/linux/wait4.c:30
30 return SYSCALL_CANCEL (wait4, pid, stat_loc, options, usage);
#4 0x00007feb1700a48b in ggml_print_backtrace () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libggml-base.so.0
#5 0x00007feb1700a61b in ggml_abort () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libggml-base.so.0
#6 0x00007feb1701b50c in ggml_backend_buffer_get_type () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libggml-base.so.0
#7 0x00007feb17021ce9 in ggml_backend_buffer_is_host () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libggml-base.so.0
#8 0x00007feb16261174 in llama_kv_cache::set_input_k_idxs(ggml_tensor*, llama_ubatch const*, llama_kv_cache::slot_info const&) const () from /mnt/hbdd/oldryzen
home/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libllama.so.0
#9 0x00007feb1610d3c4 in llama_model_qwen4exp::llm_graph_input_kpool::set_input(llama_ubatch const*) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cpp
ARCH/llama.cpp/build/bin/libllama.so.0
#10 0x00007feb16248de0 in llm_graph_result::set_inputs(llama_ubatch const*) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/l
ibllama.so.0
#11 0x00007feb1620b715 in llama_context::process_ubatch(llama_ubatch const&, llm_graph_type, llama_memory_context_i*, ggml_status&) () from /mnt/hbdd/oldryzenho
me/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libllama.so.0
#12 0x00007feb16214aeb in llama_context::decode(llama_batch_ext const&) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libll
ama.so.0
#13 0x00007feb1666b142 in common_context_can_seq_rm(llama_context*) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libllama-
common.so.0
#14 0x00007feb1738e345 in server_context_impl::load_model(common_params&) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/lib
llama-server-impl.so
#15 0x00007feb172d2af7 in llama_server(common_params&, int, char**) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libllama-
server-impl.so
#16 0x00007feb172d4ca1 in llama_server(int, char**) () from /mnt/hbdd/oldryzenhome/freqmod/Downloads/llama.cppARCH/llama.cpp/build/bin/libllama-server-impl.so
#17 0x000055e13f5d0bad in main ()
[Inferior 1 (process 49423) detached]
Reacted by Volunteer-1
Activity
davidgumberg commentedon Oct 1, 2026
I have the same assert with the same stacktrace using the
mtp-Qwen3.8-Flash-Next-Q4_K_M.ggufMTP from unsloth.I am using a 3090 with the CUDA backend in a Fedora toolbox.
preset.iniVolunteer-1 commentedon Oct 1, 2026
Same error on my machine:
Case A): an allegedly easy fit:
According to fit, main and draft model and all else fit, nonetheless:
ggml\src\ggml-backend.cpp:205: GGML_ASSERT(buffer) failed
0.00.191.051 I common_params_fit_impl: getting device memory data for initial parameters:
0.00.573.393 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.00.573.399 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23054 + (21234 = 17721 + 2964 + 549) + -19713 |
0.00.573.400 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23206 + (20693 = 18689 + 1453 + 549) + -19323 |
0.00.573.400 I common_memory_breakdown_print: | - Host | 54291 = 54272 + 0 + 19 |
0.00.634.347 I operator (): getting device memory data for the extra model at a context size of 262144:
0.00.910.795 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.00.910.803 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23300 + ( 0 = 0 + 0 + 0) + 1275 |
0.00.910.803 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23300 + (1604 = 741 + 340 + 523) + -329 |
0.00.910.803 I common_memory_breakdown_print: | - Host | 3208 = 3194 + 0 + 14 |
0.00.969.455 I common_params_fit_impl: projected memory use with initial parameters [MiB]:
0.00.969.460 I common_params_fit_impl: - CUDA0 (NVIDIA GeForce RTX 3090): 24575 total, 21234 used, 1819 free vs. target of 1024
0.00.969.461 I common_params_fit_impl: - CUDA1 (NVIDIA GeForce RTX 3090): 24575 total, 22297 used, 908 free vs. target of 1024
0.00.969.466 I common_params_fit_impl: projected to use 43532 MiB of device memory vs. 46260 MiB of free device memory
0.00.969.509 W common_fit_params: failed to fit params to free device memory: model_params::tensor_split already set by user, abort
...
0.17.529.024 I sched_reserve: reserving ...
0.17.535.284 I sched_reserve: CUDA1 compute buffer size = 523.55 MiB
0.17.535.290 I sched_reserve: CUDA_Host compute buffer size = 14.30 MiB
0.17.535.292 I sched_reserve: graph: nodes = 145, splits = 4, input objects = 6, input tensors = 9
0.17.535.293 I sched_reserve: reserve took 6.26 ms, sched copies = 1
... ggml\src\ggml-backend.cpp:205: GGML_ASSERT(buffer) failed
Case B) a very tight fit:
And when the fit is very tight and fit decides to reduce context size to make it possible, the same error occurs:
0.00.179.293 I cmn common_init_: fitting params to device memory ...
0.00.179.293 I cmn common_init_: (for bugs during this step try to reproduce them with -fit off, or provide --verbose logs if the bug only occurs with -fit on)
0.00.179.321 I common_params_fit_impl: getting device memory data for initial parameters:
0.00.544.449 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.00.544.456 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23054 + (22372 = 18858 + 2964 + 549) + -20850 |
0.00.544.457 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23206 + (20693 = 18689 + 1453 + 549) + -19323 |
0.00.544.458 I common_memory_breakdown_print: | - Host | 53154 = 53135 + 0 + 19 |
0.00.603.624 I operator (): getting device memory data for the extra model at a context size of 262144:
0.00.890.888 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.00.890.893 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23300 + ( 0 = 0 + 0 + 0) + 1275 |
0.00.890.894 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23300 + (1604 = 741 + 340 + 523) + -329 |
0.00.890.894 I common_memory_breakdown_print: | - Host | 3208 = 3194 + 0 + 14 |
0.00.947.274 I common_params_fit_impl: projected memory use with initial parameters [MiB]:
0.00.947.279 I common_params_fit_impl: - CUDA0 (NVIDIA GeForce RTX 3090): 24575 total, 22372 used, 681 free vs. target of 1024
0.00.947.280 I common_params_fit_impl: - CUDA1 (NVIDIA GeForce RTX 3090): 24575 total, 22297 used, 908 free vs. target of 1024
0.00.947.285 I common_params_fit_impl: projected to use 44670 MiB of device memory vs. 46260 MiB of free device memory
0.00.947.286 I common_params_fit_impl: cannot meet free memory targets on all devices, need to use 458 MiB less in total
0.01.317.040 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.01.317.045 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23054 + (19161 = 18858 + 286 + 15) + -17639 |
0.01.317.045 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23206 + (18821 = 18689 + 114 + 16) + -17451 |
0.01.317.045 I common_memory_breakdown_print: | - Host | 53138 = 53135 + 0 + 3 |
0.01.378.218 I operator (): getting device memory data for the extra model at a context size of 4096:
0.01.651.861 I common_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted |
0.01.651.866 I common_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24575 = 23300 + ( 0 = 0 + 0 + 0) + 1275 |
0.01.651.866 I common_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24575 = 23300 + ( 758 = 741 + 5 + 11) + 517 |
0.01.651.867 I common_memory_breakdown_print: | - Host | 3197 = 3194 + 0 + 3 |
0.01.709.581 I common_params_fit_impl: context size reduced from 262144 to 224768 -> need 858 MiB less memory in total
0.01.709.586 I common_params_fit_impl: entire model should be fit across devices by reducing context
0.01.709.636 W common_fit_params: failed to fit params to free device memory: model_params::tensor_split already set by user, abort
...
0.18.609.167 I sched_reserve: reserving ...
0.18.615.940 I sched_reserve: CUDA1 compute buffer size = 449.41 MiB
0.18.615.946 I sched_reserve: CUDA_Host compute buffer size = 12.41 MiB
0.18.615.948 I sched_reserve: graph: nodes = 145, splits = 4, input objects = 6, input tensors = 9
0.18.615.948 I sched_reserve: reserve took 6.78 ms, sched copies = 1
... ggml\src\ggml-backend.cpp:205: GGML_ASSERT(buffer) failed
Models used:
Main: https://huggingface.co/AesSedai/Qwen3.8-Flash-Next-GGUF/tree/main/IQ4_XS-PLEQ4_0
Draft: https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF/tree/main/MTP mtp-Qwen3.8-Flash-Next-Q8_0.gguf
sky-mighty commentedon Oct 2, 2026
Can confirm that this fixes the failing assert on my end, tested with Qwen3.8-flash running across R9700+W6800+MI50. I then told Qwen3.8-flash with MTP enabled to commit this on my own repo :)
@freqmod , would you be interested in making a PR?
Volunteer-1 commentedon Oct 2, 2026
@sky-mighty This also fixes the assertion on my machine.
llama-server.exe (main and draft model) -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --no-kv-unified --cpu-strict 1 -C 55550000 -t 8 -Cb 55550000 -tb 8 -fa on -ctk q8_0 -ctv q8_0 -ncmoe 23 -ctkd q8_0 -ctvd q8_0 -cmoed -ngl auto -sm layer -ts 34,16 -mg 0 --temp 1.0 --top-k 20 --top-p 0.95 --min-p 0.0 --presence-penalty 0.0 --repeat_penalty 1.0 -lm dio -b 16 -lv 4 -lzm off -ot "per_layer_token_embd.weight=CPU"
Unfortunately, speed is horrendous: tg1000 is 14.7-16.0 t/s on various attempts.
Same command without MTP: tg1000 is 19.1 t/s.
freqmod commentedon Oct 2, 2026
I can make a pr this evening (European time), but the code is made with AI and I won't say I understand the concequences of the change myself even though it seems very limited in scope.
Volunteer-1 commentedon Oct 2, 2026
You won't be able to get the PR merged without being able to explain every detail of the proposed changes. This is how most PRs get rejected or abandoned.
fat-tire commentedon Oct 2, 2026
For fun I tried it-- this made memory usage explode on my single gpu to the point that the entire computer locked up. Tried taking context down to 8000 it made no difference. Web UI did come up, but it never could generate a single token before I had to kill it (or the system did). OTOH the assert went away, so there's that. This is with unsloth's non-shared mtp gguf. The shared one failed to load entirely.
There is a bug here but I don't think this is the complete fix.
Update: the model is https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF/tree/main/IQ3_S but I'm going to try with a lower quant and/or unsloth.
tjandrasg commentedon Oct 2, 2026
The cf89052 fix worked for me ✅ And the MTP can speed up token generation to 36 tok/s 👍 (without MTP it just 24 tok/s)
oscarmherrera commentedon Oct 2, 2026
Another data point, on the Vulkan backend: AMD Strix Halo (Radeon 8060S iGPU, unified memory). Upstream master
b56f34ab, stockllama-server.Same abort at load,
ggml-backend.cpp:205: GGML_ASSERT(buffer) failed, with the same backtrace:load_model→common_context_can_seq_rm→decode→llm_graph_input_kpool::set_input→set_input_k_idxs→ggml_backend_buffer_is_host. Peak memory was ~72 GB of 128 GB, so this isn't memory pressure. The same command without the draft model runs normally.The head metadata. Read with
gguf_kv.pyfrom both unsloth heads (Q4_K_M and Q8_0):block_count49nextn_predict_layers1attention.compress_ratioshas 49 entries: ratio 4 on every fourth trunk layer, and 0 for entry 48, the MTP block.The main model's array has 48 entries.
Why it aborts. This is from reading the source at
b56f34ab; I haven't stepped through it in a debugger.graph_mtpbuilds the k-pool input whenever the model has indexer/QSA layers.il = n_layer()= 48, where the ratio is 0.k_idxsis only consumed by the QSA selection path, which runs only when the layer's ratio is > 0. So in the MTP graph nothing reads it, and it is never allocated.llm_graph_input_kpool::set_inputstill callsset_input_k_idxson the unallocated tensor.build_inp_kpoolkeepspool_cells/pool_idxs/pool_mask/tail_idxsallocated even when no op reads them, but notk_idxs.So there are two possible fixes: skip the k-pool input for a block with ratio 0, as in the patch above, or keep
k_idxsallocated like its siblings.One open question. These head files predate #29761, which merged MTP together with its own
conversion/qwen4exp.py. Does a head converted with the merged converter carry a non-zero ratio for the MTP block, or a different shape? That would tell us whether the crash comes from these files or from the graph code. It might also bear on the memory blow-up @fat-tire saw with the skip patch.ggerganov commentedon Oct 2, 2026
See if you can reproduce the problem with https://huggingface.co/ggml-org/Qwen3.8-Flash-Next-GGUF/tree/main. It works on my end so most likely your GGUFs are not compatible.
oscarmherrera commentedon Oct 2, 2026
tjandrasg commentedon Oct 2, 2026
After using
mtp-Qwen3.8-Flash-Next-Q4_0.ggufthe problem is gone (and the MTP is performed better than unsloth). The main model remain the sameQwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguffrom unsloth. I'm using CUDA backend.Seems that the problem is MTPs on https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF/tree/main/MTP (The shared family is more failing not just assertion failure, even the cf89052 cannot fix it)
oscarmherrera commentedon Oct 2, 2026
freqmod commentedon Oct 2, 2026
I tested it with h https://huggingface.co/ggml-org/Qwen3.8-Flash-Next-GGUF/tree/main mtp q8_0 and that works for me without any assert.
Volunteer-1 commentedon Oct 2, 2026
Same here,
using ggml-org's mtp draft file and merging #29825 solves the issue.
Experimenting with start parameters revealed following fastest achievable tg1000 for dual RTX 3090:
MTP is still significantly slower than no MTP with dual GPUs.
Weird fact 2:
tg speed drops from ca 30 t/s at start to 16.5 t/s at 500 tokens, then recovers to 17.5 t/s at 1000 tokens.
no MTP: 19.3 t/s
llama-server.exe (mainModel) -np 1 --no-kv-unified --cpu-strict 1 -C 55550000 -t 8 -Cb 55550000 -tb 8 -fa on -ctk q8_0 -ctv q8_0 -ncmoe 21 -ngl auto -sm layer -ts 33,17 -mg 0 --temp 1.0 --top-k 20 --top-p 0.95 --min-p 0.0 --presence-penalty 0.0 --repeat_penalty 1.0 -lm dio -b 16 -lv 4 -lzm off -ot "per_layer_token_embd.weight=CPU"
MTP: 17.5 t/s when putting the entire drafter into CUDA1
llama-server.exe (main and draft model) -np 1 --spec-type draft-mtp --spec-draft-n-max 2 -devd CUDA1 --no-kv-unified --cpu-strict 1 -C 55550000 -t 8 -Cb 55550000 -tb 8 -fa on -ctk q8_0 -ctv q8_0 -ncmoe 25 -ctkd q8_0 -ctvd q8_0 -ncmoed 0 -ngl auto -sm layer -ts 36,14 -mg 0 --temp 1.0 --top-k 20 --top-p 0.95 --min-p 0.0 --presence-penalty 0.0 --repeat_penalty 1.0 -lm dio -b 16 -lv 4 -lzm off -ot "per_layer_token_embd.weight=CPU""
oscarmherrera commentedon Oct 3, 2026
Follow-up from the Vulkan / Strix Halo report above. With ggml-org's files the assert is gone here too, so this is the unsloth MTP heads, as others found.
Setup: Strix Halo (Radeon 8060S, 128 GB unified, RADV), upstream
b56f34ab,llama-serverwith-c 262144 -np 1 -ngl 999 -ctk q8_0 -ctv q8_0 -b 4096 -ub 1024 --load-mode mmap. ModelQwen3.8-Flash-Next-IQ4_NL(ggml-org). Draftmtp-Qwen3.8-Flash-Next-Q4_0.gguf(ggml-org),--spec-type draft-mtp --spec-draft-n-max 3 --cache-type-k-draft q8_0 --cache-type-v-draft q8_0. One cold request per depth, temperature 0, 512 output tokens,cache_prompt: false; rates from the server'stimings.Draft acceptance was 0.57 at both depths, with mean accepted length 2.7.
So on unified memory MTP is a clear decode win (+33–39 %), unlike the dual-3090 result above. But prefill drops 9–12 % with the draft loaded, so at a 35K prompt it only breaks even past roughly 900 output tokens.
One thing I didn't expect: at temperature 0 the MTP output is not identical to the non-MTP output. It diverges after about 245 characters, at both depths. Both answers were correct on the recall check built into the prompt. Is a small divergence expected from batched verification, or should greedy speculative decoding be bit-exact here?
amv commentedon Oct 5, 2026
Reporting from a 2x CUDA GPU system running b11415, with ISTA IQ3_S and UD Q4_K_XL (non-shared) MTP:
Without patch, MTP results in:
With suggested one line code patch there is no crash, and MTP seems to be working. Can not vouch for wether this is the "correct" fix, but at least it seems to be a fix for the crash.
I personally did not get usable performance out of this big MTP head on my system when you factor in also the drop in prefill speeds, but this might end up being better with a smaller MTP head, like the one Q2 one Strata uses.
edit: I was not able to use the Strata mtp head with this patch, as the Strata mtp head is using the type unsupported in llama.cpp, so I didn't pursue it further.
ss-cong commentedon Oct 7, 2026
Independent reproduction on CUDA (2x NVIDIA GB10 / DGX Spark), v0.6.0
d812350— plus the tensor-level detailAdding evidence for the same assert from a different backend than the reports above (HIP / ROCm / Vulkan), and with the shared MTP head from unsloth, since that seems to be the trigger:
Qwen3.8-Flash-NextUD-IQ4_XSmtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf(2,786,568,256 B, shared variant)llama-cli -m <main> --spec-type draft-mtp -md <shared mtp>-> abortPrompt: 105.1 t/s | Generation: 25.9 t/sAbort:
Instrumenting
llm_graph_input_kpool::set_inputshowed the four k-pool inputs never receive a buffer, while the tensors that are explicitlyggml_build_forward_expand-ed do share one host buffer:So the assert is a symptom: this graph constructs an
llm_graph_input_kpoolwhose inputs no node in that graph reads — which is what the suggested fix below says (the MTP block is dense attention, so it only needs the k-pool inputs when its compress ratio marks it as a QSA layer). Insrc/models/qwen4exp.cppthe unpatched condition is at line 572:Two extra data points that may help:
hparams.dsv4_compress_ratiosalready exists there (src/llama-hparams.h:308), so no backport plumbing is needed for the suggested change.ggml_build_forward_expandfor those four inputs so they get a buffer does not fix it: the model then segfaults at load time (exit 139). Rolled back.Also: on this path the k-pool size can come out as zero, which yields a zero-size tensor and hence no buffer —
graph::build_inp_kpool/ theset_inputside tookThat clamp alone lets the graph build further, but does not by itself make MTP run.
Environment: 2x GB10 (unified 128 GB each), CUDA, llama.cpp tag
v0.6.0, commitd81235049384534c167caea52b85a694f6103d14.freqmod commentedon Oct 8, 2026
I am happy with moving on to other mtp quantifications, so for me we can close this.
I will keep it open for now in case others have other needs, but feel free to close it if you think it is just noise.
kietq8684-design commentedon Oct 10, 2026
Same assert here, on different hardware — adding a data point.
Hardware: dual AMD gfx906 (Radeon VII 16GB + Instinct MI50 16GB), ROCm 6.2.0, Ubuntu 24.04, layer-split across two cards (no P2P on this box)
Build: master 4ebdf2c
Main model: Qwen3.8-Flash-Next-IQ3_XXS GGUF; draft: unsloth's mtp-Qwen3.8-Flash-Next-Q4_K_M (2.60 GiB); --spec-type draft-mtp
Crash: GGML_ASSERT(buffer) in ggml_backend_buffer_get_type (ggml-backend.cpp:205), reached from the server's warmup dummy decode (common_context_can_seq_rm) → llama_kv_cache::set_input_k_idxs → the k_idxs input tensor has buffer == nullptr. Same stack as reported, frame by frame (set_input_k_idxs → ggml_backend_buffer_is_host → ggml_backend_buffer_get_type).
Not deterministically reproducible: hit it on single-card + Q4_K_M + ncmoe 40; ran fine on dual-card + ggml-org's mtp-Qwen3.8-Flash-Next-Q4_0 + ncmoe 36. Honest caveat: those two runs differ in three variables (device count, draft quant, ncmoe), so I never bisected the trigger — but the assert itself only ever appeared with the unsloth draft; ggml-org's Q4_0 never hit it (its later failures were OOM-type and runtime-decode, different signatures). Notably the original report here also used an unsloth draft (mtp-Q8_0), so both crash reports so far point at unsloth's draft heads.
Notably this is a third independent hardware/backend combination (dual gfx906 + HIP layer-split; existing reports are AMD R9700 + HIP and 2x3090 + CUDA) — consistent with a backend-agnostic cause in the MTP graph input allocation, not the MTP weights. The draft works fine when it doesn't assert (acceptance 0.53–0.67).
Also worth noting: the suggested fix in this thread (only build inp_kpool when dsv4_compress_ratios[il] > 0 in the MTP graph) has been independently validated on both HIP and CUDA but never turned into a PR — upstream still carries the bug. Please don't close this as noise; if nothing else, consider turning that patch into a PR.
I didn't dig further because on my box MTP nets negative on this model family, so I'm just reporting, not asking for a fix.
GPU monitor: PCIe link health column
7262jkytyc-glitch commentedon Oct 23, 2026
Reproduced with an embedded MTP head and no separate draft model, so GGUFs that carry the MTP block internally are affected too. Hardware: Intel Arc Pro B70, SYCL, Windows x86_64. Build: 0.7.0-dev, build 11838, commit 4231b23. Model: Qwen3.8-Flash-Next-Uncensored-IQ4_XS-MTP (MTP block is blk.48.nextn.*). Crash: exit 3221226505 at ggml-backend.cpp:345: GGML_ASSERT(buffer) failed.
llama-server.exe -m Qwen3.8-Flash-Next-Uncensored-IQ4_XS-MTP-00001-of-00003.gguf --spec-type draft-mtp
qwen4exp.attention.compress_ratios: len=49
ratio 4 at: 3,7,11,...,47
ratio 0 at: 48 <-- MTP block
At commit 4231b23 (also current master), src/models/qwen4exp.cpp:590 still has no hparams.dsv4_compress_ratios[il] > 0 guard:
This matches the metadata above: ratio 48 == 0, so the MTP graph builds an llm_graph_input_kpool that no node reads, and set_input_k_idxs then touches the unallocated k_idxs. I have not rebuilt with it, but the failure point and the ratio data line up exactly.
Cadmere commentedon Nov 5, 2026
Still reproduces on v0.9.0 (b12121,
e56f006ed), Vulkan on Strix Halo (gfx1151)Re-tested after v0.9.0, since it included #30141, #31443 and #31570. The assert is unchanged.
Setup
llama-b12121-bin-ubuntu-vulkan-x64Qwen3.8-Flash-Next-UD-Q4_K_XL(4 split files)-ngl 999 -fa on -ub 1024 -c 524288 -np 2 -ctk q8_0 -ctv q8_0 --jinja(no--kv-unified)Results
--spec-type ngram-mod--spec-type draft-mtp -md mtp-standalone-Q8_0.gguf -ngld 999(4,137,429,152 B)ggml-backend.cpp:345: GGML_ASSERT(buffer) failed--spec-type draft-mtp -md mtp-shared-Q8_0.gguf -ngld 999(2,786,568,256 B)check_tensor_dims: tensor 'token_embd.weight' not found(#29148, now closed as stale but not fixed)--spec-type draft-mtp(no-md)common_speculative_init_result: failed to create MTP contextBacktrace for the standalone case (same path as earlier reports: warmup decode in
common_context_can_seq_rm):The same three failures happened on b12018 earlier, so nothing changed between b12018 and b12121 for this model. I'm happy to test a patch branch on this hardware.