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).