If you are running local LLMs on a Mac in 2026, your two main options are llama.cpp and Apple’s MLX. They share an engine philosophy (GGUF / MLX formats, quantized inference, CPU+GPU unified memory) but differ in how they tap Apple Silicon’s hardware.
Overview
| llama.cpp | MLX | |
|---|---|---|
| Maintained by | Georgi Gerganov (community) | Apple |
| Model format | GGUF | MLX (own) |
| Unified memory | ✓ | ✓ (designed for it) |
| Metal backend | ✓ | ✓ (native) |
| Neural Engine | partial | ✓ |
| Quantization | Q2_K – Q8_0 + i-quants | 4-bit, 8-bit, fp16 |
| Tools that use it | Ollama, Mullama, LM Studio, llama-cpp-python, llama-cpp-c, llamafile | mlx-lm, mlx-vlm, Ollama, LM Studio |
| License | MIT | MIT |
Performance
Tokens per second on a single M4 Max 64GB, batch size 1, 2048-token context:
| Model | llama.cpp (Q4_K_M) | MLX (4-bit) |
|---|---|---|
| Llama 3.2 3B | 85 | 88 |
| Qwen 2.5 7B | 48 | 52 |
| Llama 3.1 8B | 42 | 45 |
| Mistral Nemo 12B | 28 | 32 |
| Qwen 2.5 14B | 24 | 30 |
| Llama 3.1 70B (offload) | 6 | 9 |
| Llama 3.1 70B (full) | OOM on 64GB | 7 |
On M3 Pro 36GB:
| Model | llama.cpp | MLX |
|---|---|---|
| Llama 3.1 8B | 32 | 36 |
| Mistral Nemo 12B | 22 | 26 |
| Qwen 2.5 14B | 18 | 22 |
| Llama 3.1 70B (Q4) | OOM | OOM |
The MLX advantage widens with model size because MLX’s unified-memory model is more efficient for large tensor movement.
Memory usage
Both llama.cpp and MLX use Apple Silicon’s unified memory. For the same Q4-quantized model:
| Model | llama.cpp | MLX |
|---|---|---|
| Llama 3.1 8B (Q4) | 5.2 GB | 4.8 GB |
| Mistral Nemo 12B (Q4) | 7.8 GB | 7.3 GB |
| Qwen 2.5 14B (Q4) | 9.1 GB | 8.5 GB |
| Llama 3.1 70B (Q4) | 42 GB | 38 GB |
MLX is 5-10% more memory-efficient, which translates to running larger models on the same hardware.
Model compatibility
| llama.cpp | MLX | |
|---|---|---|
| Llama family | ✓ | ✓ |
| Qwen family | ✓ | ✓ |
| Mistral family | ✓ | ✓ |
| Phi family | ✓ | ✓ |
| DeepSeek R1 | ✓ | ✓ |
| Gemma family | ✓ | ✓ |
| LLaVA / vision | ✓ | ✓ (mlx-vlm) |
| Audio / Whisper | ✓ | partial |
| Embedding models | ✓ | ✓ |
| Quantized GGUF | ✓ | needs conversion |
| Quantized MLX | needs conversion | ✓ |
The two formats are not interchangeable. You need to convert between GGUF and MLX, which mlx-lm does automatically.
Setup examples
llama.cpp (via Mullama or Ollama)
# Mullama
mullama run llama3.2:3b
# Ollama
ollama run llama3.2:3b
MLX (via mlx-lm)
pip install mlx-lm
# Convert and run a Hugging Face model
mlx_lm.convert --hf-path meta-llama/Llama-3.2-3B-Instruct -q
# Generate
mlx_lm.generate --model mlx-community/Llama-3.2-3B-Instruct-4bit \
--prompt "Explain MLX in one paragraph"
MLX (via Ollama — simplest)
# Ollama picks the right backend automatically
ollama run llama3.2:3b
When to use each
Choose llama.cpp when…
- You need the widest model format support (GGUF is the lingua franca).
- You want compatibility with Mullama, Ollama, LM Studio, llama-cpp-python (the entire ecosystem).
- You are running non-Apple hardware too (llama.cpp also runs on x86 + CUDA + AMD).
- You want the most community-tested code path.
Choose MLX when…
- You are Mac-only and want the maximum performance Apple Silicon can deliver.
- You run large models (14B+) on Apple Silicon where MLX’s unified-memory efficiency matters most.
- You want to use Apple’s Neural Engine for some operations.
- You are willing to convert models (mlx-lm makes this one command).
Decision matrix
| Your situation | Use |
|---|---|
| Mac-only, want max performance | MLX |
| Mixed Apple + NVIDIA + AMD hardware | llama.cpp |
| Use Ollama or Mullama | llama.cpp (Ollama uses MLX internally on Mac) |
| Need 70B+ on 64GB Mac | MLX |
| Use SillyTavern, Open WebUI, anything LLM | llama.cpp (GGUF) |
| Vision models (LLaVA, Qwen2-VL) | both (mlx-vlm is excellent) |
| Research / custom architecture | llama.cpp |
| Want simplest setup | Ollama (picks MLX when better) |
See also
- llama.cpp tool page — full feature list
- MLX tool page — full feature list
- Mullama tool page — Rust runtime on top of llama.cpp
- Ollama tool page — picks the right backend for you
- Local LLM on macOS Apple Silicon guide — full setup walkthrough