Neywa-Labs/mlx-vlm
MLX-powered local multimodal inference and fine-tuning on Apple Silicon
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
MLX-VLM is a Python inference and fine-tuning package with MLX as its execution backend. load(model_path) returns the model and its processor, so checkpoint selection determines both model execution and multimodal preprocessing. Architecture-specific implementations live under mlx_vlm/models/; porting a new family involves adapting its config and mapping checkpoint weight names rather than merely pointing the loader at an arbitrary Hugging Face repository.
The same package exposes in-process Python usage, the mlx_vlm.generate CLI, and HTTP serving through mlx_vlm.server. The dependency set includes Transformers and SentencePiece for model and tokenizer tooling, Pillow and OpenCV for image and video handling, miniaudio and mlx-audio for audio, and FastAPI, Starlette, and Uvicorn for serving. The server can preload a main model plus separate image generation, TTS, and STT models; one endpoint surface does not imply one model handles every modality.
Key Capabilities & Differentiators
The checkpoint determines which modalities are available. Qwen2-VL is an entry point for image-conditioned text generation, Gemma 3n is shown taking image and audio together, and OCR-oriented families include DeepSeek-OCR and PaddleOCR-VL. Output paths are also model-specific: MiniCPM-o can emit speech, while speridlabs/idol can write 3D Gaussian splats to a .ply file. Typed decision prediction is available both through the CLI and /v1/decisions for tasks such as routing a ticket to one of several departments.
mlx_vlm.convert provides Hugging Face conversion and quantization with selectable bit width and group size. In speculative decoding, a compatible drafter proposes tokens for verification by the target model; the selectable families are DFlash, EAGLE3, and MTP. DSpark is auto-detected on supported checkpoints and currently requires greedy decoding (temperature=0). Supported thinking models can also receive explicit token budgets; the server disables thinking by default unless configured otherwise.
Trade-offs & Limitations
Compared with a managed API such as OpenAI's, MLX-VLM puts checkpoint choice, quantization, and inference on hardware you control. That makes it a good candidate when inputs need to stay on premises, but serving locally does not automatically eliminate network use: Hugging Face repository IDs and remote media URLs can trigger downloads. In exchange for that control, your team owns dependency changes, model validation, capacity planning, and endpoint compatibility testing.
Apple Silicon unified memory avoids a separate host RAM and GPU VRAM sizing exercise, but the OS and inference runtime compete for the same pool. Quantization reduces weight storage, not the entire working set: media processing, context and KV cache, extra models, and concurrent requests still matter. Drafters also make performance model- and workload-dependent; benchmark against ordinary decoding before adopting them. The MIT license covers the code, not the terms of each model or adapter.
Hardware & Deployment Guide
On Apple Silicon macOS, start with Python 3.10+ and pip install -U mlx-vlm; install 'mlx-vlm[ui]' separately if you need the Gradio chat UI. Run mlx_vlm.server --model <hf_repo_or_local_path> to preload a checkpoint, or keep inference in-process through Python. The Linux and WSL2 path uses mlx[cuda12]. With the MLX 0.32.4 CUDA 12 wheel, first-use kernel compilation may need matching CUDA 12.9 runtime and CCCL headers, plus CUDA_HOME if the headers are not discovered.
Start with a small quantized model, test representative requests, and measure peak memory before raising concurrency or preloading more components. Recent releases broaden the inference paths: v0.8.2 added a Granite for Docling MTP drafter, and v0.8.3 added Amazon Ergo with native MXFP4 experts, expert-parallel sharding, and streaming tool-call parsing. Treat those additions as model-specific and retest the exact checkpoint, decoding path, and serving interface before upgrading.
load(model_path) returns both model and processor; the server can preload a Hugging Face checkpoint or local weights.decide and /v1/decisions expose named questions with outputs such as choice and boolean, with media inputs on supported models.mlx_vlm.convert exposes bit width and group size, with RTN, AWQ, and mixed quantization recipes.--image-model, --tts-model, and --stt-model flags let the server preload task-specific models alongside its main model.Teams running OCR, image or audio understanding, or typed decision workflows locally on Apple Silicon, with control over checkpoints and quantization.
You need a provider-managed service, guaranteed drop-in OpenAI API compatibility, or a deployment that avoids validating model, accelerator, and memory requirements.
Quick Start & Installation
pip install -U mlx-vlm
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mlx-vlm ★ | 6k | +28 | Python | MIT | MLX-powered local multimodal inference and fine-tuning on Apple Silicon |
| faster-whisper | 27.2k | +147 | Python | MIT | Local Whisper transcription with CTranslate2 for CPU and GPU |
| fish-speech | 34k | +84 | Python | — | Self-hosted PyTorch speech inference for directed, multi-speaker audio |
| whisper.cpp | 55.8k | +292 | C++ | MIT | Native C/C++ Whisper inference for offline speech-to-text on CPUs and accelerato |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Neywa-Labs/mlx-vlm.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mlx-vlm
Should I embed MLX-VLM in Python or call it over HTTP?
load(model_path) returns a model and its processor. For a separate inference process, use mlx_vlm.server --model with a Hugging Face repository or local checkpoint path. Verify the client contract route by route; the documented /v1/decisions endpoint, for example, accepts named typed questions.Can I run it on a 16 GB Mac?
mlx-community/Qwen2-VL-2B-Instruct-4bit is a sensible starting point, not a fit guarantee. On Apple Silicon, weights, runtime allocations, and other applications share unified memory. Test peak memory with representative media, context length, and concurrent requests. Repeat the test if you add a drafter or preload additional models.Can I self-host it for commercial use or run it offline?
When is MLX-VLM a better fit than the 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