vLLM Metal v0.34.0
v0.34.0 tracks the vLLM v0.34.0 core. The release contains 67 merged pull requests from 25 contributors since vLLM Metal v0.33.0.
Highlights
- vLLM 0.34.0 core: the plugin moves to vLLM 0.34.0, LFM3 and LFM3-VL checkpoints no longer need
--trust-remote-code, and Metal keeps its 16-token default block size when--block-sizeis unset instead of taking vLLM 0.34's new default of 64 (#1368). - Model Runner V2 only: vLLM 0.34.0 removes Model Runner V1, so Metal runs only under Model Runner V2; n-gram speculation and the torch sampler keep the same drafts and sampling results as in v0.33.0 through vllm-metal's own copies of vLLM 0.33.0's n-gram matcher and V1 sampler (#1250, #1192, #1327).
- Python 3.13 wheels: releases now attach a Python 3.13 (
cp313) wheel next to the 3.12 one, and the installer uses it whenVLLM_METAL_PYTHON=3.13is set; Homebrew stays on 3.12 (#1380). - Native MLX sampling in more steps: with speculative decoding configured, sampled requests now sample in MLX instead of torch, taking four sampled n-gram clients on an M2 Ultra from 31.22 to 38.06 output tok/s, and seeded requests now run in the one-step-ahead decode pipeline instead of forcing synchronous decode, cutting mean TPOT by 23-27% on an M5 Max (#1387, #1252).
- Qwen3 MoE and Gemma 3 in GGUF: Qwen3 MoE GGUF files (
qwen3moe) serve with their experts kept quantized, and llama.cpp's Gemma 3 exports, such asggml-org/gemma-3-4b-it-GGUF, serve text, both from a local.ggufor a remoterepo_id:quantreference;docs/gguf.mdshows the--tokenizerthat Gemma 3 needs (#1369, #1359). - D3 decision checkpoints: d3 checkpoints such as
vllm-sr/d3-nanoandvllm-sr/d3-flashanswer choice, yes/no, and score questions about text or JSON states through vLLM's/v1/systemonewith--runner poolingon the MLX backend;docs/structured_decisions.mdhas the setup (#1295). - Sampling on the PyTorch MPS backend: with
VLLM_METAL_BACKEND=mpsand no speculative decoding, requests can usetemperature,top_k,top_p,min_p, andseed, for text and vLLM-Omni stages, andprompt_logprobsis accepted for scoring, such as lm-eval loglikelihood tasks, instead of getting a 400 (#1234, #1264). - vLLM-Omni on MPS: with
VLLM_METAL_BACKEND=mpsand theomniextra,vllm-omni serveruns diffusion stages such as SDXL text-to-image, and MiniCPM-o 4.5 holds duplex audio and video conversations over/v1/realtime;docs/omni.mdhas the setup, and both were checked under vLLM 0.33.0 but not rerun with this release (#1307, #1235).
Installation
Requirements:
- Apple Silicon with macOS 15 or newer.
- Native arm64 Python 3.12 or 3.13. The installer uses 3.12 unless
VLLM_METAL_PYTHON=3.13is set, and Homebrew uses 3.12.
Stable channel:
curl -fsSL https://raw.githubusercontent.com/vllm-project/vllm-metal/main/install.sh | bash -s -- --stableStable channel on Python 3.13, in its own environment, since the installer refuses an existing environment that uses another Python version:
curl -fsSL https://raw.githubusercontent.com/vllm-project/vllm-metal/main/install.sh | \
VLLM_METAL_PYTHON=3.13 VLLM_METAL_VENV="$HOME/.venv-vllm-metal313" bash -s -- --stableHomebrew:
brew tap vllm-project/vllm-metal https://github.com/vllm-project/vllm-metal
brew install vllm-project/vllm-metal/vllm-metalThe installer downloads prebuilt vllm-metal and vLLM wheels. It does not invoke a C++ or Metal compiler.
Release Artifacts
The release attaches native Python 3.12 and 3.13 wheels for macOS 15 arm64:
vllm_metal-0.34.0-cp312-cp312-macosx_15_0_arm64.whl
vllm_metal-0.34.0-cp313-cp313-macosx_15_0_arm64.whl
The compatible upstream core is the prebuilt vLLM v0.34.0 macOS arm64 wheel, attached to vLLM's v0.34.0 tag; its cp38-abi3 tag serves both Python versions.
Engine, Cache, and Performance
- AWQ checkpoints whose config says bfloat16 but whose scales are float16, such as
hugging-quants/gemma-2-9b-it-AWQ-INT4, now run in float16 instead of running every layer after the first projection in float32, raising single-request output from 30.1 to 56.5 tok/s on an M5 Max; outputs are not identical to v0.33.0's (#1333). - GQA decode always splits the cached context into 256-token partitions and drops its 10-core M3 exceptions, which speeds up long-context decode that leaves the GPU lightly loaded, such as a 32K-token Qwen3.5-35B-A3B-4bit request at 18.4 instead of 20.0 ms per token on an M2 Max, while shapes that already fill the GPU run about 1% slower (#1362).
- Models with 24 query heads, 8 KV heads, and head size 128, such as Llama 3.2 3B, now decode on the GQA kernel once a batch carries enough context, cutting median TPOT by 15.9% at 8 requests of 1,024-token prompts on an M1 Pro (#1291).
- The MLX paged attention path passes q, k, and v to the kernel as views instead of copies, cutting decode time per output token by 0.4-1.4% on an M1 Pro (#1292).
- With
VLLM_METAL_BACKEND=mps, Qwen3.5 Gated DeltaNet layers run on the shared Metal GDN kernel instead of Torch operations, raising Qwen3.5-0.8B BF16 serving throughput by 33-59% on an M5 Max (#1261). - On the PyTorch MPS backend,
PYTORCH_MPS_LOW_WATERMARK_RATIOnow defaults to--gpu-memory-utilization, so prefills of about 8k tokens no longer run out of Metal memory withQwen/Qwen3.5-0.8Bon an 8 GB MacBook Air M2; an exported watermark is left alone (#1323). --enable-sleep-modenow starts withdraft_model, DFlash, and DSpark speculative decoding, and generation after wake gives the same tokens; to allow this, draft-model speculation now keeps its KV cache in the target's shared storage, which costs about 2.5% single-stream throughput on an M5 Pro (#1237, #1331).- Sleep frees the KV cache of standalone MLA models such as MiniCPM3 and GLM-4.7-Flash, where the first
/sleepused to raiseNotImplementedError(#1245). - With draft-model speculation,
--num-gpu-blocks-overridesets the block count as given, where a value above the planned Metal cache capacity used to fail at startup (#1237). - KV offloading now works with standalone MLA models such as MiniCPM3 and GLM-4.7-Flash, and hybrid models such as Qwen3.5 are now refused at startup before their weights load (#1236).
- Hybrid models with a recurrent or convolution state tensor larger than 2^31 elements (4 GiB at bf16) now read the correct state for slots past that point, where they used to degrade output without an error (#1227).
- TurboQuant prefill reads its page and offset indices through their strides, fixing wrong attention values when every token of a prefill sits in one KV page, and
docs/turboquant.mdadds M1 Pro calibration (#1253). - Qwen3-ASR transcriptions with a forced
languagestop decoding at the requested token limit instead of running until EOS and trimming the result afterwards (#1376).
Models and Serving Features
- Gemma 3 checkpoints that load through mlx-vlm (
Gemma3ForConditionalGeneration), such asmlx-community/gemma-3-4b-it-4bit, now apply their 1,024-token sliding windows, where output went wrong once a sequence passed the window (#1377). - Gemma 4 E2B/E4B return correct
prompt_logprobs, such as forechoscoring, where every prompt position used to come out more than 1 nat off, and serve LoRA requests with--enable-lorainstead of stopping the engine with aLoRA routing row count mismatcherror; steps that need every prompt row or route an adapter skip YOCO fast prefill and prefill more slowly (#1262, #1394). - LFM3-Audio MLX checkpoints such as
LiquidAI/LFM3-Audio-2B-MLX-4bittake nonempty audio clips of up to 30 seconds and answer in text, through the offline API and audio chat requests; precomputed audio embeddings are refused, and speech output and the transcription and translation endpoints are not supported (#1248). - PaddleOCR-VL image requests whose text also contains literal
<|IMAGE_START|><|IMAGE_PLACEHOLDER|>tokens no longer stop the engine (#1290). - GGUF files of tied-embedding models that also carry an
output.weight, such as Qwen2.5 and Qwen3 Q4_K_M files, compute logits from that table as llama.cpp does, so wikitext-2 perplexity of Qwen2.5-1.5B-Instruct Q4_K_M goes from 9.82 to 9.56, against 9.55 in llama.cpp, for about 190 MB more memory (#1308). - Remote GGUF references such as
unsloth/Qwen3.8-27B-GGUF:Q4_0skip draft files whose names start withmtp-ordflash-instead of failing on multiple matches (#1279). - LoRA adapters that set
rank_patternoralpha_pattern, rsLoRA adapters included, scale each layer by its own rank and alpha instead of the adapter-wide scale, and a refused in-place reload (load_inplace) of a cached, inactive adapter keeps the original weights, where later requests used to run on the rejected replacement (#1313, #1316).
Compatibility and Operational Changes
- vllm-metal and vLLM core are both versioned 0.34.0 for this release, and the installer and the Homebrew updater download vLLM's wheel from its
v0.34.0tag (#1368). - transformers is capped below 5.23.0 and huggingface_hub now requires 2.0.0 or newer, following vLLM 0.34.0; MLX stays pinned to 0.32.4 (#1368).
VLLM_USE_V2_MODEL_RUNNERset to anything other than1now fails at startup, since vLLM 0.34.0 has no Model Runner V1; unset it (#1250, #1368).- Omni entry points such as
vllm serve --omnino longer fail at import withModuleNotFoundError: No module named 'vllm.entrypoints.launchers.cli_args', as they did with the v0.33.0omnipin; the extra now pins the vLLM-Omni commit aligned with vLLM 0.34.0 (#1301, #1368). - The
omniextra also installsstep-audio2==1.0.0, anddocs/omni.mdreplacesdocs/qwen3-tts-mps.md(#1235, #1307). - Native MLX sampling now draws through the Metal kernel it shares with the MPS backend and skips the candidate sort when no request in the batch uses top-k, top-p, or min-p; the new draw changes the random stream, so a seeded request can return different tokens than in v0.33.0 (#1234).
--enable-prompt-embedsfails at startup on both backends withMetal does not support enable_prompt_embeds., where MLX used to ignore the embeddings and answer with unrelated text and the MPS backend stopped the engine on the firstprompt_embedsrequest (#1395).- On the MLX backend, a
logprobs=-1request, which vLLM accepts when--max-logprobsis-1or at least the vocabulary size, gets a 400 instead of stopping the engine; the MPS backend still returns full-vocabulary logprobs (#1382). - On the MLX backend, a speculative method registered by a plugin fails at startup and a nonzero
prompt_logprob_startis refused, and Transformers-format Qwen3-ASR checkpoints such asQwen/Qwen3-ASR-0.6B-hffail at load; use the original layout, such asQwen/Qwen3-ASR-0.6B(#1368). - KV offloading warns at startup when the host pool holds fewer chunks than one
--max-model-lenrequest and names the smallest--kv-offloading-sizethat clears it, and the paging error for an explicit--kv-cache-memory-bytesnow also suggests lowering--kv-offloading-size(#1310, #1309).
Known Boundaries
- The PyTorch MPS backend is experimental: it serves unquantized FP16/BF16 causal text decoders on one device, with LFM2 ShortConv and Qwen3.5 Gated DeltaNet (float32 state) as the only state layers and head sizes of 64, 96, 128, 256, or 512; MoE, MLA, pooling, diffusion language models, other hybrid models, and multimodal prefix LMs such as Gemma 4 vision fail at startup, as do LoRA, KV offloading, TurboQuant, parallelism, and sleep mode. LFM2-VL is the verified multimodal model (#858, #1241, #1243).
- With speculative decoding configured, MPS requests must be greedy, and a request that leaves
temperatureunset gets a 400; presence and frequency penalties,repetition_penaltyoutside vLLM-Omni stages,allowed_token_ids,bad_words,logit_bias,min_tokens,logprob_token_ids, and structured outputs are refused on MPS with or without speculation. EAGLE3 is the only speculative method there, without parallel drafting, adaptive verification, or hybrid targets (#858, #1096, #1179). - vLLM-Omni on MPS does not support quantized models or distributed serving; the bundled MiniCPM-o 4.5 profile allows two active sessions, and playback can have gaps, especially with two sessions, and SDXL is the verified text-to-image model, checked for function only, not for image parity, speed, or concurrent serving (#1307, #1235).
- vLLM refuses
--enable-lorafor models whose vLLM class lacks LoRA support, so Flint, Ling, and PaddleOCR-VL fail at startup with LoRA; StableLM, which vLLM 0.34 maps to its Transformers backend, passes that check but is unverified with LoRA on Metal (vllm#61884, #1249, #1368). - Native sampling gives different random draws than torch for the same seed, and seeded output is reproducible only for the same batch composition; sub-batches with penalties, sample logprobs,
allowed_token_ids,bad_words,logit_bias, or a pendingmin_tokensfall back to torch, as do steps with structured output. Under speculative decoding only greedy requests are drafted (#1196, #1233, #1096, #1387). - On a server the KV cache pool is held in memory at its full size, at startup or after the first request, even when requests use little of it, and the process RSS can show less; plan
--gpu-memory-utilizationor--kv-cache-memory-bytesfor the whole pool (#1366). - MoE expert streaming is MLX-only and fails at startup with pipeline parallelism, LoRA, or speculative decoding, and at load for GGUF, AWQ, multimodal checkpoints, and Mixtral-style or fused expert layouts (#1104).
- Sleep mode supports level 1 on the MLX backend only: a level-2 request gets a 500 and, like any refused sleep, leaves the engine paused until
/wake_up; the MPS backend and speculative methods other thanngram,draft_model,dflash, anddspark, such as Gemma 4 MTP, fail at startup with--enable-sleep-mode, and freeing the KV cache is refused for speech-to-text models. With KV offloading, the host pool comes back empty at wake even with vLLM 0.34's newreset_connector=False; prompts already on the disk tier still restore (#1102, #1166, #1237, #1331, #1381). - N-gram drafting on hybrid GDN targets needs float32 recurrent state, the lazy GDN kernels, and an attention head size of at most 256, runs on the text-only path, and can be slower than plain decoding on diverse long contexts; other speculative methods on hybrid targets, and n-gram on Mamba-2, KDA, or ShortConv hybrids, fail at startup (#1072).
- DFlash and DSpark are experimental: LoRA, TurboQuant, and adaptive verification are refused, serving losslessness is not established, and they can be slower than target-only decoding; Speculators checkpoints must be Qwen3 drafts with the full target vocabulary and their own embeddings and output head (#928, #1092, #1199).
- Hybrid GDN prefix caching remains experimental: cache-on versus cache-off parity still diverges on a subset of divergent-suffix prompts, unchanged since v0.31.0.
- Nemotron-H and Granite 4.0 hybrid keep one private recurrent-state slot per request, so prefix caching is off for them (#1158).
- KV offloading supports only uniform full-attention models (GQA, MHA, MQA, or MLA) on the MLX backend; sliding-window and hybrid models, draft-model, DFlash, or DSpark drafting, pooling, speech-to-text, pipeline and data parallelism, and
canonical_layoutare refused at startup. Prompts longer than the host pool may not be stored, and with a disk tier a request restoring one can stall (see vllm#62931); on a Mac already paging, an automatic pool shrinks to fit, while an explicit--kv-offloading-sizecan still fail startup (#998, #1063, #1236, #1256, #1310). - LoRA adapters with weights for
embed_tokens, or forlm_headon a model with tied embeddings, now fail to load with an error instead of loading and answering without those weights, while an untiedlm_headstill takes its LoRA; adapters that use vLLM'smodules_to_savefor classifier or score heads are not supported on Metal yet, and--enable-tower-connector-loraadapts only the Qwen3-VL and Qwen3.5 vision encoders (#1400, #1022, #1107). - vLLM's per-replica reseed for data parallelism (vllm#59788) does not reach Metal yet (#1158).
- DiffusionGemma is experimental, text-only, and MLX-only; speculative decoding, pipeline parallelism, LoRA, and TurboQuant fail at startup, and
top_k,top_p,logit_bias,min_tokens, prompt logprobs,logprobs=-1, and adiffusion_canvas_lengthsmaller than the served canvas are refused (#994, #1096, #1158). - vLLM's built-in
/v1/systemonereads DiffusionGemma with a 16-token canvas, so on Metal it answers only when the servedcanvas_lengthis 16 and returns a 400 for larger canvases; with the 32-token canvas indocs/structured_decisions.md, use the upstream example server as shown there (#1077). - D3 on Metal is MLX-only and text-only: images and video,
prefix_bidircheckpoints such asd3-turboandd3-ultra, and Edge are not supported, chat completions are not served, and/v1/decisionsreturns 501, as in upstream vLLM; prefix caching and chunked prefill are turned off, so each question processes the full prompt, and Lite, Mini, and base D3 are not verified end to end (#1295). - Video input covers Qwen3-VL, Qwen3.5/3.6, and Gemma 4 E2B/E4B; Gemma 4 26B/31B, PaddleOCR-VL, LFM2-VL, and LFM3-VL are image-only, FP8 and GGUF Qwen3.5 checkpoints stay text-only, and
--video-pruning-ratefails at startup (#1113, #1180, #1193). - On the MLX backend, vision-language models without a Metal multimodal adapter, such as SmolVLM, Gemma 3, and Qwen2-VL, serve text only through mlx-vlm: image, video, and audio input gets a 400, where the first image used to stop the engine, and
--enable-mm-embedsis turned off for them with a warning, except under KV offloading, where vLLM enables embedding inputs after that check (#1302). - Mistral Small 3.1 serves text only, and Devstral Small 2 takes the Ministral 3 path but is unverified (#1131, #1156).
- Offline LFM3-Audio requests that pass a
(samples, channels)array at a sample rate other than 16 kHz, assoundfilereturns for a stereo file, are resampled along the channel axis, so a 48 kHz clip reaches the model three times as long: clips longer than about 10 seconds are refused with the 30-second error, and shorter ones run on corrupted audio. Transpose the array (audio.T) first (vllm#65659, #1248). - The Gemma 4 sidecar handles images, plus audio and video on E2B/E4B, and stays off under speculative decoding, when
Gemma4Processorcannot be built, or for a repo id that is not fully cached; runhf download <repo>first (#820, #1175, #1180). - On M5,
VLLM_METAL_MM_PREFIX_PATH=recomputecan prefill Gemma 4 images faster, because the default kernel path takes image-block steps off NAX (#863). - GGUF does not support LoRA, IQ1, IQ2, IQ3_XXS, or T-quants, MoE models other than Qwen3 MoE, SSM or hybrid models other than text-only Qwen3.5, vision input (Qwen3.5 and Gemma 3 GGUF files serve text only), MTP speculation, or sharded files, and IQ4_NL/IQ4_XS weights need about twice their file size in memory (#1066, #1202, #1228).
- Gemma 3 GGUF files that also carry
output.weightfail at load withmodule 'lm_head' is absent from the model, and with a remoterepo_id:quantreference to a 4B or larger Gemma 3 file, token ids past the file's 262,144-token vocabulary inlogit_bias,allowed_token_ids, orstop_token_idsare not refused with a 400 as they are for a local.gguf(#1359). prompt_logprobssteps project logits for every prompt row, which startup profiling does not reserve; a lower--gpu-memory-utilizationleaves room (#897).
Contributors
@Bevisy, @Chr0mium24, @CzealChen, @GoDiao, @Knight-XMUM, @LxYuan0420, @MeKaustubh07, @NageNalock, @POWEHI2023, @RobbieJ, @StevenWang-CY, @Thump604, @UzairNaeem3, @WindChimeRan, @abhijithneilabraham, @jeffrey-maxwell, @justrightnow, @kongxinjun, @mhdimo, @mitsa-ng, @ricky-chaoju, @suntp, @surucuonur, @syang-genai, @varad-more
Full changelog: v0.33.0...v0.34.0