Four names, four different things
These get used almost interchangeably, but they're different kinds of tool:
- llama.cpp is the inference engine under much of this ecosystem: a C++ implementation that runs GGUF models on NVIDIA, AMD, Intel and plain CPUs as well as Apple silicon.
- MLX is Apple's own array framework and inference library, built for Apple silicon's unified memory, with its own MLX-format models.
- Ollama is a friendly CLI and local API server around an inference backend: historically llama.cpp, though that recently changed on Apple silicon (below).
- LM Studio is a desktop app that runs GGUF and MLX models side by side, and the easiest place to start if you don't yet know which format or engine you want.
A recent change to know about
Since Ollama 0.19 (March 2026), Ollama uses Apple's MLX instead of its Metal-backed llama.cpp path on Macs with 32 GB or more of unified memory, which is much faster on that hardware. 8 GB and 16 GB Macs keep the older path. So on a 32 GB+ Mac, "MLX or Ollama" is less of a choice than it was: for many models, Ollama is MLX underneath. Check your Ollama version and memory before assuming older comparisons describe your setup.
Model formats: GGUF or MLX
GGUF is llama.cpp's model format. It's broad, well supported and has the longest tail of conversions (older models, fine-tunes, merges), because its ecosystem is the largest. MLX-format models are built for Apple's framework, and on the same chip an MLX build is often noticeably faster than the equivalent GGUF. GGUF wins on breadth and portability; MLX wins on Apple silicon speed where a conversion exists. Quantization, the 4-bit and 8-bit trade-offs that decide how much memory a model needs, is its own topic: LLM quantization explained for Mac users.
Where models come from
MLX models are published on Hugging Face, mostly under mlx-community. Ollama pulls from its own library. Both move quickly, and a new release's MLX and GGUF conversions can arrive days or weeks apart, so treat any model tag you read (including here) as a snapshot and check the source before pulling.
How much memory you need
Section 3 of the complete AI agent guide has a table from 16 GB to 128 GB+ Macs with MLX and Ollama tags for each. The short version: keep about 20 to 25% of unified memory for macOS and the display, and budget the rest for the model's weights and its KV cache. How much RAM local LLMs need shows the arithmetic, so you can size a model that isn't in the table.
Using a model with nothing else involved
You don't need a VM or an agent for any of this. LM Studio opens a chat window as soon as a model finishes downloading. ollama run <model> drops you into a prompt in Terminal. Both also expose an OpenAI-compatible local API (http://127.0.0.1:11434/v1 for Ollama, or whatever port you set for MLX or LM Studio's server) that any script, editor plugin or app speaking the OpenAI format can use.
When you'll want isolation
The model itself is inert. The risk comes from the code an agent writes and runs using it, which is a different problem from running a model. If you're building an AI coding agent rather than a chat window, see the complete AI agent guide for the VM-isolated setup, the AI Bridge architecture for how the model stays on the Mac's GPU while the agent runs isolated, and the MLX and OpenCode guide for a complete walkthrough.
Related reading: running AI agents safely in an isolated VM, the AI Bridge architecture, and what isolation costs, measured with MLX and Ollama. Or download Velo Workspaces and try it yourself.