Name and Version
$ llama-server --version
version: 9330 (328874d)
built with AppleClang 21.0.0.21000099 for Darwin arm64
Operating systems
Mac
Which llama.cpp modules do you know to be affected?
llama-server, libllama (core library)
Command line
# Baseline (non-MTP)
llama-server -m Qwen3.5-9B-Q4_K_M.gguf -ngl 99 --port 8080
# MTP with speculative decoding
llama-server -m Qwen3.5-9B-MTP-Q4_K_M.gguf -ngl 99 --port 8080 --spec-type draft-mtp --spec-draft-n-max 6
Problem description & steps to reproduce
MTP speculative decoding (--spec-type draft-mtp) on Apple Silicon Metal produces correct output but is slower than the non-MTP baseline at every draft
ceiling configuration tested. Even with 100% draft acceptance at n_max=0, throughput drops 11%. Higher ceilings make it worse, up to 28% slower at n_max=6
with only 43% acceptance.
The draft evaluation overhead on Metal exceeds the speculative gain.
llama-server b9330, Qwen3.5-9B-MTP Q4_K_M, 2048 tokens generated, temperature=0:
| Config |
tok/s (think ON) |
tok/s (think OFF) |
Draft Accept |
| Baseline (non-MTP model) |
25.3 |
25.1 |
— |
--spec-draft-n-max 0 |
22.4 |
22.1 |
100% |
--spec-draft-n-max 2 |
21.9 |
21.3 |
76% / 73% |
--spec-draft-n-max 6 |
19.3 |
18.3 |
44% / 41% |
- Ceiling (
n-max) drives the regression. Floor (n-min) has no effect (0/6 = 2/6 = 6/6).
- Higher ceiling = worse acceptance AND more overhead.
- No configuration beats baseline.
Steps to reproduce:
- Load non-MTP Qwen3.5-9B Q4_K_M via
llama-server -m ... -ngl 99
- Generate 2048 tokens with a long-form prompt, note tok/s (~25)
- Load MTP variant with
--spec-type draft-mtp, same prompt — observe slower tok/s
- Vary
--spec-draft-n-max from 0 to 6 and observe progressive degradation
System: MacBook Pro 14-inch (2021), Apple M1 Max, 24-core GPU, 32 GB unified, macOS 26.4.1
Full data including LM Studio comparisons and additional models (Qwen3.6-35B-A3B-MTP shows 5–14x regression):
https://github.com/thewesjohnson/gists/tree/main/mtp-throughput-regression-metal
First Bad Commit
Unknown. MTP on Metal, as a new feature, may never have provided a speedup. Not a regression from a known working state.
Relevant log output
Logs
common_speculative_impl_draft_mtp: adding speculative implementation 'draft-mtp'
common_speculative_impl_draft_mtp: - n_max=3, n_min=0, p_min=0.00, n_embd=4096, backend_sampling=1
common_speculative_impl_draft_mtp: - gpu_layers=-1, cache_k=f16, cache_v=f16, ctx_tgt=yes, ctx_dft=yes, devices=[default]
srv load_model: [spec] adding 1808.02 MiB to fit_params_target for device MTL0
srv load_model: [spec] estimated memory usage of MTP context is 1808.02 MiB
srv load_model: speculative decoding context initialized
slot print_timing: prompt eval time = 518.24 ms / 26 tokens ( 19.93 ms per token, 50.17 tokens per second)
slot print_timing: eval time = 7551.42 ms / 271 tokens ( 27.87 ms per token, 35.89 tokens per second)
slot print_timing: total time = 8069.66 ms / 297 tokens
slot print_timing: graphs reused = 79
slot print_timing: draft acceptance = 0.80000 ( 192 accepted / 240 generated)
Same symptom class on SYCL: #23533, #23203. No prior Metal report.
Name and Version
$ llama-server --version
version: 9330 (328874d)
built with AppleClang 21.0.0.21000099 for Darwin arm64
Operating systems
Mac
Which llama.cpp modules do you know to be affected?
llama-server, libllama (core library)
Command line
Problem description & steps to reproduce
MTP speculative decoding (
--spec-type draft-mtp) on Apple Silicon Metal produces correct output but is slower than the non-MTP baseline at every draftceiling configuration tested. Even with 100% draft acceptance at n_max=0, throughput drops 11%. Higher ceilings make it worse, up to 28% slower at n_max=6
with only 43% acceptance.
The draft evaluation overhead on Metal exceeds the speculative gain.
llama-server b9330, Qwen3.5-9B-MTP Q4_K_M, 2048 tokens generated, temperature=0:
--spec-draft-n-max 0--spec-draft-n-max 2--spec-draft-n-max 6n-max) drives the regression. Floor (n-min) has no effect (0/6 = 2/6 = 6/6).Steps to reproduce:
llama-server -m ... -ngl 99--spec-type draft-mtp, same prompt — observe slower tok/s--spec-draft-n-maxfrom 0 to 6 and observe progressive degradationSystem: MacBook Pro 14-inch (2021), Apple M1 Max, 24-core GPU, 32 GB unified, macOS 26.4.1
Full data including LM Studio comparisons and additional models (Qwen3.6-35B-A3B-MTP shows 5–14x regression):
https://github.com/thewesjohnson/gists/tree/main/mtp-throughput-regression-metal
First Bad Commit
Unknown. MTP on Metal, as a new feature, may never have provided a speedup. Not a regression from a known working state.
Relevant log output
Logs