Low VRAM<=8GB best result (40t/s WITHOUT MTP)

#17
by hellork - opened

Qwen 3.6 is already using every last bit of resources with 8GB cards.
If you have sufficient VRAM, please ignore. This is not for you.

The first time I tried this, no matter the settings, I was getting 2 tokens/sec. I must have done a bad build.
Now that --spec-type draft-mtp is part of the official llama.cpp, it appears to be working, sort of.

To get performance with full context is going to be a balancing act.
UD quants are the way to go. And 2- or 3-bit isn't really that bad.
I one-shot prompted two complete games, with sound and all, no errors, with 2-bit quants.

Currently, llama-server doesn't seem to honor different spec-type & spec-draft-n-max settings on a per-model basis in router mode.
So I ran the server with and without those options for these tests.

Hardware

0.00.244.412 I - CUDA0 : NVIDIA GeForce RTX 3070 Laptop GPU (7819 MiB, 29009 MiB free)
0.00.244.417 I - CPU : AMD Ryzen 9 5900HX with Radeon Graphics (31981 MiB, 31981 MiB free)

Default settings

[*]
jinja = true
kv-unified = true
temp = 0.0
top-p = 0.95
top-k = 20
min-p = 0.0
ctk = q4_0
ctv = q4_0

Results comparison

2-bit WITHOUT MTP

[Qwen3.6-35B-A3B-UD-Q2_K_XL]
reasoning-budget = 32000
c = 262144
ncmoe = 25

[51523] 0.40.479.772 I slot print_timing: id 0 | task 0 | prompt eval time = 5310.02 ms / 2189 tokens ( 2.43 ms per token, 412.24 tokens per second)
[51523] 0.40.479.778 I slot print_timing: id 0 | task 0 | eval time = 27769.75 ms / 1229 tokens ( 22.60 ms per token, 44.26 tokens per second)

(I got 24 tokens per second eval time before. It was because I had another llama.cpp process running in the background somehow.)

2-bit WITH MTP

Best result. (I had to bump up ncmoe to 30 to accommodate the extra MTP overhead. 7.7GB VRAM used)
[51530] 1.34.227.671 I slot print_timing: id 0 | task 0 | prompt eval time = 6498.15 ms / 2513 tokens ( 2.59 ms per token, 386.73 tokens per second)
[51530] 1.34.227.677 I slot print_timing: id 0 | task 0 | eval time = 77643.29 ms / 2566 tokens ( 30.26 ms per token, 33.05 tokens per second)

4-bit WITHOUT MTP

[Qwen3.6-35B-A3B-UD-Q4_K_XL]
reasoning-budget = 32000
c = 262144
ncmoe = 33

[63577] 1.51.410.621 I slot print_timing: id 0 | task 0 | prompt eval time = 18975.05 ms / 4383 tokens ( 4.33 ms per token, 230.99 tokens per second)
[63577] 1.51.410.627 I slot print_timing: id 0 | task 0 | eval time = 81967.32 ms / 3016 tokens ( 27.18 ms per token, 36.80 tokens per second)

3-bit WITH MTP

[Qwen3.6-35B-A3B-UD-IQ3_K_XL]
reasoning-budget = 32000
ctx-size = 262144
alias = qwen3.6q3
ncmoe = 35

Best result. (Again, the MTP overhead is not worth the cost. Here, the 3-bit model is out-performed by plain, vanilla 4-bit)
[64055] 1.52.818.880 I slot print_timing: id 0 | task 0 | prompt eval time = 5184.85 ms / 1013 tokens ( 5.12 ms per token, 195.38 tokens per second)
[64055] 1.52.818.887 I slot print_timing: id 0 | task 0 | eval time = 101676.40 ms / 3022 tokens ( 33.65 ms per token, 29.72 tokens per second)

llama-server --host 0.0.0.0 --port 8087 --models-dir mtp/ --models-preset mtp/.models.ini -np 1 --spec-type draft-mtp --spec-draft-n-max 6
--no-warmup --models-max 1 --sleep-idle-seconds 420 --jinja -t 6 --no-mmproj-offload

Conclusions

  • No speedup noticed with MTP on 8GB RTX 3070 mobile with full context window.
  • The extra gigabyte used by MTP means we need more -cpumoe to compensate.
  • This could be worked around by using a smaller context window. We get that.**
  • Earlier results with slow prompt eval were from having another llama.cpp process running in the background.
  • It's fairly-new. More optimization for low mem might be OTW.

Cheers!

Do not use -ngl 99. It [lllama.cpp] will auto-optimize without it. If you keep getting low t/s, try bumping up ncmoe instead.

I've got rtx3070 and 400-700 prompt/25-32 gen tps using q5km mtp.
128k ctx

I've got rtx3070 and 400-700 prompt/25-32 gen tps using q5km mtp.
128k ctx

please share your settings good sir

please share your settings good sir

--host 0.0.0.0 -fa 1 -c 131072 --min-p 0.0 --fit 1 -b 2024 -ub 512 --no-mmap -ctk q8_0 -ctv q8_0 --jinja -m Qwen3.6-35B-A3B-UD-MTP-Q5_K_M.gguf --temp 0.7 --top-p 0.95 --top-k 20 --presence-penalty 0.0 --repeat-penalty 1.0 --chat-template-kwargs "{"preserve_thinking":true}" --no-mmproj -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --chat-template-file qwen3.6_chat_template.txt --reasoning-budget 4096 --metrics --ctx-checkpoints 65 --checkpoint-every-n-tokens 4096

The template from here - https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates

please share your settings good sir

--host 0.0.0.0 -fa 1 -c 131072 --min-p 0.0 --fit 1 -b 2024 -ub 512 --no-mmap -ctk q8_0 -ctv q8_0 --jinja -m Qwen3.6-35B-A3B-UD-MTP-Q5_K_M.gguf --temp 0.7 --top-p 0.95 --top-k 20 --presence-penalty 0.0 --repeat-penalty 1.0 --chat-template-kwargs "{"preserve_thinking":true}" --no-mmproj -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --chat-template-file qwen3.6_chat_template.txt --reasoning-budget 4096 --metrics --ctx-checkpoints 65 --checkpoint-every-n-tokens 4096

The template from here - https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates

thanks, I just managed stable 35 t/s on two 3060 ti + 32gb ram with these specs, I'll play with your, as they seem better, and see what changes. I'll paste mine below

.\llama-server.exe ^
--models-preset "D:\Local_AI\custom_models\models.ini" ^
--models-dir "D:\Local_AI\custom_models" ^
--models-max 1 ^
--port 8080 ^
--host 127.0.0.2 ^
--fit on ^
--fit-target 128 ^
--mmap ^
--flash-attn on ^
--parallel 1 ^
--spec-type draft-mtp ^
--spec-draft-n-max 2 ^
--spec-draft-p-min 0.6 ^
--split-mode layer ^
--main-gpu 0 ^
--batch-size 512 ^
--ubatch-size 128

models.ini

[Qwen3.6-27B-MTP-UD-IQ3_XXS]
model=D:\Local_AI\custom_models\Qwen3.6-27B-MTP-UD-IQ3_XXS.gguf
jinja=true
ctx-size=81920
temperature=0.6
top-p=0.95
top-k=20
min-p=0.0
presence-penalty=0.0
repeat-penalty=1.0
cache-type-k=q4_0
cache-type-v=q4_0

Also, I read somewhere that draft token prediction is only good for stuff like coding, which has strict rules and surprisingly, many predictable tokens.
Creative writing, on the other hand, is free-flowing and very unpredictable. Supposedly won't benefit much from MTP, and could even be worse.

hellork changed discussion title from Don't Bother with VRAM<=8GB (+how to get 40t/s without it) to Low VRAM<=8GB challenge (+how to get 40t/s without MTP)

--spec-draft-n-max 1 seems to be fastest in many cases.

--spec-draft-n-max 1 seems to be fastest in many cases.

It depends on a quant.

Screenshot_2026-05-19-13-25-42-067-edit_com.reddit.frontpage

hellork changed discussion title from Low VRAM<=8GB challenge (+how to get 40t/s without MTP) to Low VRAM<=8GB best result (40t/s WITHOUT MTP)

Sign up or log in to comment