Rust control plane + Python MLX worker for local Apple Silicon inference.
A serious local MLX inference service for Apple Silicon. This is not a proxy around
mlx_lm.server. Rust owns serving. Python owns model execution.
Full documentation is in the docs/ directory:
| Document | Description |
|---|---|
| Getting Started | Zero to first inference in 10 steps |
| Architecture | Design rationale and system design |
| HTTP API Reference | All endpoints, schemas, error codes |
| Configuration Reference | All TOML fields and defaults |
| IPC Protocol | UDS handshake and frame format |
# Build
cargo build --workspace
cd python && uv sync && cd ..
# Run
cargo run --bin gateway
# In another terminal
curl http://127.0.0.1:8000/ready
curl -X POST http://127.0.0.1:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"mlx-community/Qwen2.5-7B-Instruct-4bit","messages":[{"role":"user","content":"Hello"}],"max_tokens":32}'GET /livechecks whether HTTP process is alive.GET /readychecks whether current model can serve requests.GET /startupreports startup phase.GET /healthremains backwards-compatible with liveness-style checks.GET /modelslists configured model state.GET /models/{model}/statusreturns detailed model lifecycle state.GET /models/{model}/readyreturns model-specific readiness.GET /metricsexposes Prometheus metrics.
Default config enables Prometheus metrics:
[telemetry]
enable_prometheus = true
metrics_path = "/metrics"Request logs are structured JSON lines written by the Rust gateway and include:
request_idmodelprompt_tokensmax_tokensstreamqueue_time_msttft_mslatency_mscompletion_tokensfinish_reasoncancellederror
Benchmark docs live in docs/how-to/run-benchmarks.md.
- Phase 6 text-only benchmark:
scripts/benchmark.sh - Phase 9 VLM benchmark:
scripts/benchmark-vlm.sh
Default reports land in benchmarks/results/.
For the full argument list, smoke commands, and full-suite commands, read:
Quick start:
bash scripts/benchmark.sh