I benchmarked Qwen4-35B-A3B across vLLM, exllamav3 (TabbyAPI), and llama.cpp on 2x RTX 3090 (300W each, PCIe 4.0 x8/x8, no NVLink).
All three setups use the same daily-driver constraints: vision on, 8-bit KV cache, 4 concurrent slots, MTP enabled, n-gram table in RAM, everything else in VRAM. Context is tested by replaying a real 100-turn coding agent session from 2k up to ~250k tokens (3 replies up to 1024 tok at each depth, temp 1.0, top_p 0.95, top_k 20; decode is the median of 3).
| Engine | Quant | Mode | Ctx | <=48k (pp / tg) | Full depth (pp / tg) | Est. session | VRAM / RAM | Load |
vLLM (main f279912) | Official FP8 | TP=2 | 262k | 6903 / 202.8 | 6621 / 192.7 | 18 min | 46.0 / 42.0 GiB | 105s |
exllamav3 1.7.0 + TabbyAPI 5a9afb1 | EXL3 5.13 bpw (h6, ng8) | Layer split | 1M | 7333 / 150.0 | 6975 / 138.5 | 25 min | 40.1 / 27.0 GiB | 47s |
llama.cpp v1.1.1 (b12977) | Unsloth UD-Q8_K_XL | Layer split (52,48) | 262k | 3411 / 121.7 | 2910 / 80.5 | 42 min | 45.2 / 28.2 GiB | 33s |
"Est. session" integrates the measured curve over the 100 real turns (~206k output tokens total, excluding tool waits). Because it's a real session, MTP acceptance varies from turn to turn (code/JSON vs prose), which is why the curves dip around 48k and 160k on all three engines.
vLLM
- Fastest by a wide margin and basically flat across depth. Without MTP (
23ead69) it ran 116 -> 111 t/s from 2k to 249k (avg 113 t/s, 31 min session). Probabilistic 3-token MTP pushes it to ~193 t/s with no prefill penalty.
- Routed FP8 experts run via Marlin W8A16 on 3090. SM86 doesn't support NVFP4 KV or the FP8 QSA indexer, so I used
--kv-cache-dtype fp8 with indexer_kv_dtype: bf16, plus VLLM_GDN_DECODE_KERNEL=triton (avoids a CUDA kernel mismatch with MTP on precompiled wheels) and VLLM_RELOAD_MODE=layerwise (saves ~0.95 GiB/GPU on recent main so CUDA graphs fit with explicit KV bytes).
- Downsides: 4096x4096 images OOM the encoder once MTP + 262k KV are loaded, so I capped images to 2048x2048 (
max_pixels: 4194304). TP=2 also keeps a copy of the ~19 GiB FP8 n-gram table per worker (~42 GiB total RAM used), and cold boot takes ~105s.
exllamav3 / TabbyAPI
- Fits the native 1M context in 40.1 GiB VRAM (~15.4 GiB for 1M K8V8 KV + indexer + draft). I tested an actual 1,045,984-token prompt with a 1024x1024 image at the end and it still decoded at 102 t/s with 1.8 and 4.9 GiB free.
- Weirdly, layer split beat tensor parallel (NCCL) here. TP at 262k did 3233-3946 pp / 130-135 tg (26-27 min), while layer split did ~4600 pp / ~142 tg, and adding
autosplit_reserve: [2048] (to stop GPU 0 from filling up and shift layers onto GPU 1) jumped prefill to ~7000 t/s. On 1.7.0, TP also ignores ngram_ram: true and sparse_draft_head: 16384.
- MTP lengths 2/3/6 and confidence 0.7/0.81 all performed within noise, so I left it at dynamic 3 / 0.81 with
sparse_draft_head: 16384.
llama.cpp
- Unlike vLLM and exllamav3, decode drops noticeably with depth: 137 t/s at 2k down to 58 t/s at 249k.
- You need
--lazy-mode off alongside --load-mode dio (otherwise the 20.3 GiB per_layer_token_embd table still gets read from disk), and for the built-in MTP head (--spec-type draft-mtp) you need --spec-draft-type-k/v q8_0 and --spec-draft-n-ubatch 128 or the draft context OOMs on load. Setting --spec-draft-p-min 0.8 cut decode in half (51 t/s).
--split-mode tensor is faster on a single request (95.9 t/s avg, 80 t/s at 249k, 37 min session, though prefill drops to ~1320 t/s at ubatch 128), but it duplicates the QSA indexer KV and some weights per card and OOMs in cudaGraphInstantiate under 4 parallel slots. Offloading 1 expert layer to RAM fixes the OOM but drops single-stream decode to 75.6 t/s, so I stayed on layer split.
Rig: 2x MSI RTX 3090 (300W PL), ROG X870E Hero (ReBAR on, x8/x8), Ryzen 5 7500F, 96 GB DDR5-5200, Ubuntu 24.04 (kernel 7.0.0-42), NVIDIA 595.99.02-open with the BAR1 P2P patch and gpu-unlock. Speed and memory only here, no quant quality comparison.
Configs
vLLM:
VLLM_GDN_DECODE_KERNEL=triton \
VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 \
VLLM_RELOAD_MODE=layerwise \
vllm serve /path/to/Qwen4-35B-A3B-FP8 \
--trust-remote-code \
--tensor-parallel-size 2 \
--max-model-len 262144 \
--max-num-seqs 4 \
--max-num-batched-tokens 1024 \
--no-async-scheduling \
--kv-cache-dtype fp8 \
--kv-cache-memory-bytes 2050000000 \
--attention-config '{"indexer_kv_dtype":"bf16"}' \
--enable-prefix-caching \
--mm-processor-kwargs '{"max_pixels":4194304}' \
--reasoning-parser qwen4 \
--enable-auto-tool-choice \
--tool-call-parser qwen4 \
--speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true,"draft_sample_method":"probabilistic"}'
exllamav3 / TabbyAPI (tabby_config.yml):
model:
max_seq_len: 1048576
cache_size: 1048576
cache_mode: "8,8"
chunk_size: 2048
max_batch_size: 4
autosplit_reserve: [2048]
ngram_ram: true
vision: true
vision_offload: true
warmup: true
reasoning: true
tool_format: auto
draft_model:
draft_mode: mtp
draft_num_tokens: 3
dynamic_draft: true
draft_confidence: 0.81
sparse_draft_head: 16384
draft_cache_mode: Q8
hybrid_draft_tokens: 0
llama.cpp:
GGML_CUDA_P2P=1 llama-server \
--model /path/to/Qwen4-35B-A3B-UD-Q8_K_XL-00001-of-00002.gguf \
--mmproj /path/to/mmproj-BF16.gguf \
--no-mmproj-offload \
--ctx-size 262144 \
--cache-type-k q8_0 --cache-type-v q8_0 \
--flash-attn on --fit off --n-gpu-layers 99 \
--override-tensor per_layer_token_embd=CPU \
--load-mode dio --lazy-mode off \
--split-mode layer --tensor-split 52,48 \
--ubatch-size 512 --cache-ram 0 \
--parallel 4 --kv-unified --threads 6 --jinja \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 \
--repeat-penalty 1.0 --presence-penalty 0.0 \
--spec-type draft-mtp --spec-draft-n-max 2 \
--spec-draft-type-k q8_0 --spec-draft-type-v q8_0 \
--spec-draft-n-ubatch 128