# Repository Briefing: Neywa-Labs/mlx-vlm
> Source: https://repoforai.com/repo/Neywa-Labs/mlx-vlm (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Neywa-Labs/mlx-vlm
- **Official Docs / Website**: https://neywa-labs.github.io/mlx-vlm/
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (97/100 · Maintenance 35/35 · Adoption 22/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.8.3 (2026-12-04) — https://github.com/Neywa-Labs/mlx-vlm/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Local AI, GPU, API, CLI
- **Momentum**: 5,967 ★ total (+2 24h / +28 7d) · 939 forks
- **Topics**: `apple-silicon`, `florence2`, `idefics`, `llava`, `llm`, `local-ai`, `mlx`, `molmo`, `paligemma`, `pixtral`, `vision-framework`, `vision-language-model`
- **When to Use**: Best for: Teams running OCR, image or audio understanding, or typed decision workflows locally on Apple Silicon, with control over checkpoints and quantization. Skip if: You need a provider-managed service, guaranteed drop-in OpenAI API compatibility, or a deployment that avoids validating model, accelerator, and memory requirements.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Runtime: Python 3.10+ on MLX, with Apple Silicon as the primary deployment target and a documented CUDA 12 path for Linux and WSL2.
- Model loading: `load(model_path)` returns both model and processor; the server can preload a Hugging Face checkpoint or local weights.
- Typed decisions: `decide` and `/v1/decisions` expose named questions with outputs such as choice and boolean, with media inputs on supported models.
- Quantization: `mlx_vlm.convert` exposes bit width and group size, with RTN, AWQ, and mixed quantization recipes.
- Speculation: DFlash, EAGLE3, and MTP are selectable drafter families; DSpark can be auto-detected and currently requires greedy sampling.
- Serving: Separate `--image-model`, `--tts-model`, and `--stt-model` flags let the server preload task-specific models alongside its main model.
```

## Quick Start / Clone
```bash
pip install -U mlx-vlm
```
