Repository navigation
Lightning MTP concurrency sweep on M5 Ultra (Qwen3.8-27B oQ8e), on vs off, 1–8 streams #4953
ReclaimedNode
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Lightning MTP on Apple Silicon: concurrency sweep (1/2/4/8 streams), MTP on vs off, plus built-in benchmark
Environment
windowsxp811203/Qwen3.8-27B-Abliterated-MLX-oQ8e-mtp(8-bit oQ, includes MTP weights; Qwen3.8-27B is a hybrid Gated DeltaNet / full-attention model)max_concurrent_requests= 8mtp_enabled: true,mtp_adaptive_max_depth: 3, nomtp_num_draft_tokensset (default).vlm_mtp_enabled: falseenable_thinking: true. All other model options (A8, TurboQuant KV, ANE prefill, DFlash, SpecPrefill) offSpeculative backend selected ... Lightning MTP (model_type=qwen3_5, active)Method
Results (combined tok/s, median of 2 runs)
Per-stream tok/s, on / off: 55.6 / 31.6, 39.9 / 28.0, 26.8 / 24.6, 17.2 / 17.7.
Notes:
--max-num-seqs 2) on the same hardware gave about 37 combined tok/s at 8 streams. That run was capped at 2 concurrent sequences, so it isn't a like-for-like comparison.omlx built-in benchmark, MTP on
Context: Code (Python), single request:
Batch (pp 1024 / tg 128): 1x 63.9, 2x 99.4 (1.56x), 4x 123.9 (1.94x), 8x 181.9 tok/s (2.85x). Average TTFT at 8x: 5.07 s.
Context: Novel (English), single request:
Batch (pp 1024 / tg 128): 1x 43.6, 2x 75.1 (1.72x), 4x 101.9 (2.34x), 8x 144.6 tok/s (3.32x). Average TTFT at 8x: 4.71 s.
MTP log observations (
~/.omlx/logs/server.log)Code, single requests (pp 1024 → 32768): tok/cycle rises 2.51, 2.56, 3.46, 4.74, 7.53, tracking tg tok/s. Starting at pp 8192 a
copy=counter appears and grows (copy=0/7,copy=56/65,copy=98/98at 32K). At 32K, 98 of 128 tokens came through the copy path and only 12 drafts went through the MTP head (accept 11/12). So the speed-up with context on this prompt looks driven mostly by prompt-copy drafting.Novel, 8 streams: several requests ended with
finish=batch-parkedat tok/cycle 1.4–1.9 and accept 24–58%. Others endedbatch-standard-calibrationorlate-join-handoff. It looks like MTP is parked in favor of plain batching at high concurrency on low-predictability text, which would explain why on/off converge at 4–8 streams.Code, concurrent phase: accept 65–85%, tok/cycle 2.3–3.0 across 8 streams (about 26 cycles per request).
Questions for the maintainers
copy=path a prompt-lookup or n-gram drafter that runs alongside MTP? If so, it would be useful to report copy and MTP-head contributions separately in the benchmark output, so the Code results aren't read as pure MTP gains.batch-parked/batch-standard-calibrationthe intended policy for choosing between MTP and plain batching under load, and is there a way to force MTP on at 4–8 streams for comparison?mtp_adaptive_max_depthis 3 in my settings, but the logs showd4counters. Is d4 reachable when max depth is 3, or is that a separate default?Caveats
All reactions