Is `--no-mtp` intended to also disable prefix caching? `cached_tokens` 2304 → 0 and TTFT 128 ms → 11 s on an identical prefix
Running a multi-engine comparison on Qwen3.6-27B, I used --no-mtp as the control arm: same checkpoint, same server, MTP off, so that any delta could be attributed to speculative decoding alone. The control turned out to measure something else, and I would like to know whether that is by design before I write it up.
With --no-mtp, prefix caching appears to be off entirely.
Setup
- M5 Max 128 GB, macOS 26.5.2, High Power Mode, AC power
- MTPLX 2.5.4 (Homebrew)
Youssofal/Qwen3.6-27B-MTPLX-Optimized-Speed--profile turbo --reasoning off --ssd-session-cache off- One engine resident at a time, 3 min cooldown between cells, thermal sampled throughout (nominal for every run reported here)
The two arms differ by exactly one flag. Everything else, including the checkpoint, is held constant:
# arm A
mtplx quickstart --model Youssofal/Qwen3.6-27B-MTPLX-Optimized-Speed --yes \
--profile turbo --reasoning off --ssd-session-cache off --no-stats-footer \
--default-temperature 0 --default-top-p 1 --default-top-k 0 \
--mtp --depth 3 --host 127.0.0.1 --port 8012
# arm B
mtplx quickstart --model Youssofal/Qwen3.6-27B-MTPLX-Optimized-Speed --yes \
--profile turbo --reasoning off --ssd-session-cache off --no-stats-footer \
--default-temperature 0 --default-top-p 1 --default-top-k 0 \
--no-mtp --host 127.0.0.1 --port 8013
What I measured
A multi-turn agentic workload where turn 2 shares a long verbatim prefix with turn 1.
--mtp --depth 3 |
--no-mtp |
|
|---|---|---|
cached_tokens on turn 2 |
2304 | 0 |
| TTFT on turn 2 | 128 ms | 11.0 s |
reuse_fraction over the run |
0.841 | 0.0 |
| decode | 56.2 tok/s | 28.5 tok/s |
The decode delta is expected and not what this issue is about. The TTFT delta is a factor of 84 on a prefix the server has just processed.
Repeated at temperature 0.6 / top_p 0.95 / top_k 20, same picture:
--mtp --depth 3 |
--no-mtp |
|
|---|---|---|
cached_tokens on turn 2 |
2304 | 0 |
| TTFT on turn 2 | 202 ms | 11.3 s |
reuse_fraction |
0.841 | 0.0 |
| decode | 52.6 tok/s | 28.2 tok/s |
Three independent signals
These do not share an instrument, which is why I am fairly confident the effect is real rather than a measurement artifact:
prompt_tokens_details.cached_tokensas reported by the server itself- wall-clock TTFT measured client-side
reuse_fractioncomputed by my harness from per-turn prompt token accounting
All three agree, in both temperature settings.
What I ruled out
A reporting artifact. My first hypothesis was that --no-mtp simply stops populating the usage fields. It does not: prompt_tokens_details.cached_tokens is present in both arms, and reads 0 rather than being absent. The server reports a genuine miss.
Thermal. Sampled continuously via OSThermalPressureLevel, nominal end to end for every run above. The effect also survives running the arms in reverse order.
Checkpoint confusion. An earlier version of this test compared two different checkpoints and I threw it out. The numbers above hold the checkpoint constant, with --mtp as the only variable, and identity is verified per run against /health.model_path rather than the model name (V1 and V2 expose the same name).
Minimal repro without my tooling
Send the same long prefix twice against each arm and read the usage block:
cache_probe.py, run once against each port:
import json, sys, time, urllib.request
port = sys.argv[1]
prefix = "The quick brown fox jumps over the lazy dog. " * 200
payload = {
"model": "mtplx-qwen36-27b-optimized-speed",
"messages": [{"role": "user", "content": prefix + "Reply with one word."}],
"max_tokens": 8,
"temperature": 0,
}
for turn in (1, 2):
started = time.monotonic()
req = urllib.request.Request(
f"http://127.0.0.1:{port}/v1/chat/completions",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
usage = json.load(urllib.request.urlopen(req, timeout=300))["usage"]
elapsed = time.monotonic() - started
cached = usage.get("prompt_tokens_details", {}).get("cached_tokens")
print(f"turn {turn}: {elapsed:6.2f} s prompt={usage['prompt_tokens']} cached={cached}")
python3 cache_probe.py 8012 # --mtp : turn 2 reports a non-zero cached count
python3 cache_probe.py 8013 # --no-mtp : turn 2 reports cached=0
(The prefix has to exceed the cache block size to be eligible; 200 repetitions is comfortably past it.)
The question
Is this coupling intentional, i.e. does the prefix cache depend on MTP-specific machinery (draft context, target cache layout) such that it cannot be maintained in plain autoregressive mode? Or is it an unintended side effect of the --no-mtp path?
I ask because it changes what --no-mtp means for anyone benchmarking. It is the natural control arm for isolating speculative decoding, and if it silently also turns off prefix caching, then every published "MTP vs no-MTP" delta measured this way overstates the MTP contribution by folding in the cache. That is a trap I fell into, and I would rather document it correctly than repeat it.
The current help text reads:
--no-mtp Use target-only AR generation while keeping the same loaded runtime
where live switching is supported.
"keeping the same loaded runtime" is what led me to treat it as a clean control arm. If the cache coupling is intentional, one extra clause there would save the next person the same detour. If it is not, I am happy to run whatever additional configuration would help narrow it down, including any --profile you would prefer I test.
Related but distinct, as far as I can tell: #121 (prompt cache not extending across tool-call turns) and #138 (re-prefilling in 2.0.0), both closed, neither involving --no-mtp.
Measured with asiai, an open-source benchmarking tool for local inference on Apple Silicon, which I build. Investigation and drafting were AI-assisted; every number above comes from a run I executed and can reproduce.
Confirmed, and the honest answer to your question is: unintended side effect, not design. Your control arm was measuring what you feared.
Verified on a current internal build: identical repeated prompt, --no-mtp, turn 2 reports cached_tokens=0; the same server with MTP on restores the prefix. The mechanism is structural: the session-bank restore/commit machinery lives in the MTP generator's prompt-state path (restore_or_prefill_prompt_state), and the --no-mtp route dispatches to the plain AR generator, which has no session-bank integration at all; it always full-prefills. Nothing in the bank actually depends on MTP state for the covered span, so this is a gap, not a dependency.
Two consequences we'll act on:
- The AR generation path will get routed through the same prompt-state restore machinery so
--no-mtpkeeps prefix caching (it's the natural control arm, and it should behave like one). - Until that lands, the
--no-mtphelp text will state the coupling plainly so nobody else walks into it.
Your benchmarking caveat is correct and worth publishing as you wrote it: any "MTP vs no-MTP" delta measured through --no-mtp on current builds folds the prefix cache into the MTP side. For isolating speculative decoding alone today, the least-bad arm is MTP on both sides with speculation depth forced down. Imperfect, and we'd rather fix the control arm than defend the workaround.
Not fixed in 2.6.0; the confirmation above stands (unintended side effect, not design). The prefix-cache path is being detached from the MTP lane so --no-mtp keeps caching; it needs its own exactness pass before it ships. For your writeup: on 2.5.4, --no-mtp measures AR decode plus a cold prefill every turn, not AR decode alone.
Fixed in 2.8.0 as promised above. generate_ar now routes through the same restore_or_prefill path the MTP lane uses with a trunk-only history policy and reports real cache stats (cached_tokens, cache_source, cache_miss_reason, true prompt_tps). Your control arm measures AR decode alone from this release on.