waybarrios/vllm-mlx
High-performance OpenAI and Anthropic compatible LLM inference server for Apple Silicon. Native MLX, continuous batching, multimodal models, MCP tool calling, and Claude Code support.
What it solves
vllm-mlx is a high-throughput inference server designed specifically for Apple Silicon Macs. It addresses the need for a vLLM-style serving experience on macOS, providing advanced memory management and batching techniques that are typically missing in basic local LLM runners, while supporting a wide range of multimodal models (text, image, video, audio) from a single process.
How it works
The project leverages the MLX framework and Metal kernels to utilize Apple's unified memory architecture. It implements several key optimization techniques inspired by vLLM:
- Continuous Batching: Increases throughput by processing multiple requests concurrently.
- Paged KV Cache: Efficiently manages memory and allows for prefix sharing.
- Prefix Caching: Uses a trie-based system to share common prompt prefixes across requests.
- SSD-Tiered Cache: Allows spilling the prefix cache to disk to support long-context agents.
It exposes compatible APIs for both OpenAI and Anthropic, allowing it to act as a drop-in replacement for those services in many local development environments.
Who it’s for
Developers and AI researchers using Apple Silicon (M1 through M5) who need to run multimodal models locally with high performance, high concurrency, and compatibility with existing AI SDKs and coding agents (like Claude Code or GitHub Copilot CLI).
Highlights
- Dual API Support: Native support for OpenAI
/v1/*and Anthropic/v1/messagesendpoints. - Multimodal Capabilities: Single-server support for LLMs, vision models (e.g., Gemma 3, Qwen3-VL), audio (TTS and STT), and embeddings.
- Advanced Memory Management: Features paged KV cache and SSD-tiered caching for long-context tasks.
- Native Acceleration: Built on MLX for direct GPU acceleration on Apple Silicon without requiring model conversion steps.
- Observability: Includes built-in Prometheus metrics and a benchmarking tool for prompt sweeps.
Related
- Project
- Project
- Project
- Project
- Project