jjang-ai/vmlx

vMLX - JANGTQ Uber Compressed MLX Models - L2 Disk Cache (survives restart) + L1 Paged (super fast ttft) + Hybrid SSM Scheduler + Cont Batching + etc!

What it solves

vMLX 是一个专为 Apple Silicon(M1/M2/M3/M4)设计的自托管推理服务器。它允许用户在本地运行大型语言模型(LLMs)、视觉语言模型(VLMs)以及图像生成模型,无需第三方 API 密钥,并提供兼容 OpenAI、Anthropic 和 Ollama 的 HTTP API。

How it works

该项目利用 MLX 框架在 Mac 硬件上优化性能。它实现了复杂的 5 层缓存架构(包括内存感知前缀缓存和磁盘缓存),并支持连续批处理、推测解码和分页 KV 缓存等高级技术,以提升速度和内存效率。对于单机无法容纳的超大模型,它支持通过多台 Mac 的流水线并行进行分布式推理。

Who it’s for

它面向使用 Apple Silicon 的开发者和 AI 爱好者,适合想要在本地自行托管模型、通过标准 API 集成到应用程序,或在多台 Mac 集群上运行大模型的人。

Highlights

  • Broad Model Support: Runs text LLMs, vision models, multimodal omni models, MoE, hybrid SSMs, and image generation/editing models (Flux).
  • Cros-API Compatibility: Supports OpenAI, Anthropic, and Ollama wire formats.
  • Distributed Compute: Ability to split transformer layers across multiple Macs via Thunderbolt, Ethernet, or WiFi.
  • Advanced Quantization: Supports standard MLX quantization and JANG adaptive mixed-precision for higher quality at lower bit-widths.
  • Integrated Desktop App: Includes MLX Studio for model management, chat UI, and developer tools like GGUF-to-MLX conversion.
  • Multimodal Capabilities: Integrated support for text-to-speech (Kokoro) and speech-to-text (Whisper).