waybarrios/vllm-mlx
MLX-native inference on Apple Silicon with batched serving for OpenAI and Anthropic clients
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
vllm-mlx is a Python inference server for Apple Silicon, not a CUDA deployment of upstream vLLM. One process exposes OpenAI-compatible routes and Anthropic Messages. The serving stack uses mlx-lm for text generation, mlx-vlm for vision-language inference, mlx-audio for speech, and mlx-embeddings for embeddings. MLX runs on Metal and uses the Mac's unified memory.
The basic serve command uses the default engine; pass --continuous-batching to opt into continuous batching for concurrent workloads. Paged KV storage manages attention-cache allocation, while trie-based prefix caching lets requests reuse KV state for shared prompt prefixes. The SSD tier extends prefix-cache capacity rather than adding memory for model weights. Since v0.5.0, SimpleEngine can also cache growing conversation prefixes with configurable entry and memory limits.
Key Capabilities & Differentiators
The API surface covers streaming chat, Responses, embeddings, and reranking, plus streaming and tool use via Anthropic Messages. MCP tool calling is supported through model-specific parsing, and lm-format-enforcer handles JSON Schema output. Compatible models cover image and video inputs, audio input via audio_url, native TTS, and Whisper STT. The built-in reranker supports standard BERT and XLM-RoBERTa sequence-classification weights with supported activations; it rejects unsupported activations rather than silently substituting one.
On a 128 GB M4 Max, greedy single-stream decode measured 417.9 tok/s at 0.7 GB for Qwen3-0.6B-8bit, 205.6 tok/s at 1.8 GB for Llama-3.2-3B-Instruct-4bit, and 127.7 tok/s at about 18 GB for Qwen3-30B-A3B-4bit. Those are decode results for specific model and hardware configurations, not measures of first-token latency or concurrent serving capacity. Use bench-serve to measure your own concurrency, prompt mix, and cache behavior before sizing a shared endpoint.
Trade-offs & Limitations
Compared with running mlx-lm directly, the extra serving layer pays off when multiple clients need a stable HTTP interface or repeatedly send shared prefixes. Compared with a simpler local setup such as Ollama, vllm-mlx is most compelling when you specifically need both API styles and explicit control over batching and cache policy. Compatibility is not provider parity: all seven tested coding clients completed a streamed tool interaction and an exact file edit with Qwen3.8-27B-4bit, but that result applies to the tested versions and settings, not every model, tool, or API feature.
Against the hosted OpenAI API, local serving gives you control over where inference runs, but you own capacity planning and upgrades. Weights, KV state, and other macOS processes compete for unified memory. Continuous batching can improve aggregate throughput without necessarily improving individual request latency. SSD tiering can retain reusable prefixes, but adds disk I/O and a data-retention consideration. Measure cold and warm requests with realistic prompt lengths and concurrency before choosing a cache policy.
Hardware & Deployment Guide
Use an Apple Silicon Mac with macOS and Python 3.10 or later. Install a pinned release in an isolated environment; the quickstart uses 0.4.1 as a reference pin, while 0.6.0 is the newer listed release. Run vllm-mlx serve with a compatible MLX model on 127.0.0.1:8000 and verify a basic response before enabling batching or SSD caching. Inspect model fit before downloading weights. Ready-to-run MLX artifacts need no conversion, and locally acquired weights allow inference without a hosted model API. Audio uses the optional audio extra; non-English TTS requires espeak-ng.
The package is classified as Alpha, so regression-test upgrades with your client, model, and route combinations. v0.4.1 improved stream handling and added native mlx-lm chunked prefill support. v0.5.0 added reusable SimpleEngine conversation prefixes, and v0.6.0 added media-aware SpecPrefill for supported vision-language models on batched media routes, alongside broader assistant-drafter loading and fixes for tool calls and cleanup.
Apple Silicon workstations serving local coding tools or internal apps that use both API styles and can benefit from batching or prefix reuse.
You need CUDA or non-Mac hosts, guaranteed parity with a hosted provider, or more serving capacity than your Macs can sustain.
Quick Start & Installation
curl http://localhost:8000/v1/rerank -H 'Content-Type: application/json' -d '{ "model": "default", "query": "apple silicon inference", "documents": ["MLX is Apples framework", "Metal kernels on M-series", "CUDA on NVIDIA"] }'
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| vllm-mlx ★ | 1.7k | +4 | Python | Apache-2.0 | MLX-native inference on Apple Silicon with batched serving for OpenAI and Anthro |
| OmniRoute | 92.1k | +1.5k | TypeScript | MIT | Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback |
| ollama | 189k | +703 | Go | MIT | Go-based LLM serving layer for local model management and inference |
| nano-vllm | 16.7k | +95 | Python | MIT | A compact vLLM-style Python engine for offline GPU batch inference |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/waybarrios/vllm-mlx.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about vllm-mlx
Can OpenAI SDK clients and Claude Code use the same local server?
What should I run first on a Mac with 16 GB of unified memory?
Can a company self-host it commercially?
When does it make more sense than Ollama, direct mlx-lm, or the hosted OpenAI API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy