Loading...
Loading...
Use when the user asks about MLX serving, mlx_lm.server, oMLX, Apple Silicon LLM serving, or running a local LLM on a Mac, and when troubleshooting a model that fails to load, OOM during load or inference, a server that hangs or crashes at batch>1, tool calls returned as plaintext content, a throughput regression, or the choice between mlx-lm and oMLX. Also covers oMLX feature-flag tuning (turboquant_kv, dflash, MTP, specprefill, thinking_budget, max-concurrent-requests, force_sampling), the OptiQ proxy for models exceeding RAM, Llama-4 ChunkedKVCache batch handling, Llama-3 tool-call JSON format, and bench-driven validation of serving configs. Apple Silicon M-series only, not cloud LLM hosting, non-MLX backends such as llama.cpp, Ollama and vLLM, or model training.
npx skill4agent add aeyeops/aeo-skill-marketplace mlx-servingmlx-lm# Hardware: confirm Apple Silicon and unified-memory size
system_profiler SPHardwareDataType | grep -E "Model|Chip|Memory"
# Activate the venv where mlx-lm is installed before the next two probes,
# otherwise they hit system Python and may report nothing useful.
python -c "import mlx.core as mx; print(mx.__version__, mx.default_device())"
python -c "import mlx_lm; print(mlx_lm.__version__)"
# oMLX (DMG install): inspect available subcommands and run health checks
omlx --help
omlx diagnose menubar # checks Tahoe ControlCenter visibility (oMLX-specific)
# Confirm a process is actually listening
lsof -nP -iTCP -sTCP:LISTEN | grep -E "omlx|mlx_lm"| Concern | mlx-lm | oMLX |
|---|---|---|
| Install | | DMG (macOS app bundle) |
| Process model | One model per | Built-in registry; multi-model |
| Config surface | Minimal CLI flags | Rich per-model JSON ( |
| Feature flags | | turboquant_kv, dflash, MTP, specprefill, thinking budget |
| Tool calling | Format depends on chat template | Per-model parser (configurable) |
| Models > RAM | Not supported (OOM on load) | OptiQ proxy build (sensitivity-driven quant) |
| GUI | None | Native macOS app + menu bar |
| Default port | 8080 | 8000 |
| Best for | Library-first scripts, embedding in Python | Long-running daemon, multiple models, GUI ops |
Skill bias: the depth here leans oMLX — feature flags, cache controls, upstream bug patterns. mlx-lm coverage is lighter and focuses on the shared substrate.
| Symptom | Likely cause | First move |
|---|---|---|
| OOM during model load | Model + KV scratch > available RAM | Smaller quant; OptiQ proxy (oMLX); free other apps |
| OOM during long-context inference | KV cache growth | Enable |
| Crash / hang at batch > 1 | Architecture cache shape mismatch | Pin |
| Tool calls return as plaintext content | Parser doesn't recognize the model's tool-call JSON shape | See upstream-bug-patterns; check |
| Throughput regression after config change | Feature flag interaction | Bisect via bench, one flag at a time |
| Server hangs on startup | Large checkpoint loading from cold disk | Wait; tail |
| Wrong / garbled outputs | Quantization too aggressive, or wrong chat template | Reduce |
| First request slow, rest fast | Cold prefix cache | Enable |
| Output cut off mid-sentence | | Raise |
references/symptoms.md--max-concurrent-requests--max-concurrent-requests 8dflashturboquant_kvreferences/bench-methodology.mdturboquant_kv_bits=4.0references/upstream-bug-patterns.mdreferences/symptoms.mdreferences/omlx-feature-flags.mdreferences/bench-methodology.mdreferences/upstream-bug-patterns.md