Key facts
- Apple Silicon Macs (M1 and later) are among the easiest machines for running local LLMs. Unified memory lets the GPU use most of your RAM, so a 32 GB Mac can load models that won’t fit on a 24 GB graphics card.
- Three good ways to do it: Ollama (simplest, now with an MLX engine for
-mlxmodels), LM Studio (a graphical app that runs both MLX and GGUF models), and mlx-lm (Apple’s open-source Python package, with the most control). - Quick sizing guide, using Ollama’s download sizes: Gemma 4 12B MLX is 7.7 GB, Qwen3.8 27B MLX is 18 GB, and Gemma 4 31B MLX is 19 GB. Leave several GB free for macOS and your apps on top of that.
- Requirements: Ollama needs macOS 14 Sonoma+. LM Studio needs macOS 14+ on M1–M4, with 16 GB+ recommended (no Intel Macs). mlx-lm needs Python 3.11+, and macOS 15+ to “wire” memory for large models.
- The speed claims are Ollama’s own: MLX roughly doubled decode speed over its old engine (58 → 112 tokens/s on Qwen3.5-35B-A3B, in Ollama’s March 2026 test), and a June 2026 update added up to 20% more.
Requirements Not benchmarked on a Mac by us. Requirements from the docs: Ollama needs macOS 14+; LM Studio needs Apple Silicon (M1-M4) and macOS 14+; mlx-lm needs Python 3.11+ (macOS 15+ for wired memory).
If you have an Apple Silicon Mac, you already own one of the most practical local-AI machines around. This guide covers the three best ways to run open LLMs on a Mac in 2026: Ollama, LM Studio and Apple’s MLX framework. It also explains how much memory you need for which model, and the settings that make a big difference.
A note on testing: our test machine is a Linux server, not a Mac, so we haven’t benchmarked these tools ourselves. Commands, requirements and sizes come from each project’s current documentation and model pages (linked at the end), and every speed figure is the vendor’s own.
Why are Macs good for local LLMs?
On a normal PC, the model has to fit in the graphics card’s VRAM, which is usually 8–16 GB on consumer cards and 24–32 GB on the expensive ones. Anything that doesn’t fit spills to much slower system RAM. Our VRAM guide explains why this matters so much.
Apple Silicon uses unified memory, where the CPU and GPU share one pool of fast RAM. A MacBook Pro with 48 GB, or a Mac Studio with more, can keep a 27B–35B model entirely in “GPU” memory without a special graphics card. The tradeoff is that Macs usually have less raw compute than a high-end NVIDIA GPU, so prompt processing (reading a long input) tends to be slower even when generation speed is good.
Apple’s MLX framework is built for this design. Ollama’s March 2026 announcement says its MLX engine was built “to take advantage of its unified memory architecture.”

How much RAM do you need?
Sizes below are Ollama’s download sizes for its MLX tags (checked today). The model takes roughly that much memory, plus extra for context. Longer chats use more, as explained in context windows explained.
| Model (Ollama MLX tag) | Download size | Comfortable on |
|---|---|---|
gemma4:12b-mlx |
7.7 GB | 16 GB Mac |
gemma4:e4b-mlx |
9.5 GB | 16 GB Mac |
qwen3.8:27b-mlx |
18 GB | 32 GB Mac |
qwen3.6:27b-mlx |
19 GB | 32 GB Mac |
gemma4:31b-mlx |
19 GB | 32 GB Mac (36 GB+ for long context) |
qwen3.5:35b-a3b-coding-nvfp4 |
(see model page) | Ollama says “more than 32GB of unified memory” |
The “comfortable on” column is our rule of thumb rather than an official requirement. It assumes you keep a browser and an editor open, so plan for the model plus 6–8 GB of headroom. On an 8 GB Mac, stick to small models (3B–4B, for example gemma4:e2b) and short contexts. LM Studio says the same: on 8 GB Macs “stick to smaller models and modest context sizes.”
Option 1: Ollama (easiest)
Requirements: macOS 14 Sonoma or newer. Apple M-series Macs get CPU and GPU support. Intel Macs run on the CPU only.
- Download Ollama from ollama.com/download, open the
.dmg, and drag Ollama into Applications. - Start it. It offers to link the
ollamacommand into/usr/local/bin. - Run a model from Terminal:
ollama run gemma4:12b-mlx # MLX engine, 7.7 GB
ollama run qwen3.8:27b-mlx # MLX engine, 18 GB
MLX tags vs regular tags: Ollama added an MLX engine for Apple Silicon in Ollama 0.19 (March 30, 2026, as a preview). Tags ending in -mlx (and the NVFP4 coding builds) use it. Regular tags such as gemma4:12b use the GGUF/llama.cpp-based engine, which also uses the Mac GPU through Metal. Per Ollama’s posts:
- In the March preview, decode speed went from 58 to 112 tokens/s and prefill from 1,154 to 1,810 tokens/s (Qwen3.5-35B-A3B, NVFP4 vs the old Q4_K_M build). Ollama says the M5-family chips get extra help from their GPU Neural Accelerators.
- The June 11, 2026 update made the MLX engine “up to 20% faster” and added NVFP4 support. On Gemma 4 12B, NVFP4 “roughly halves the quality loss” of 4-bit quantization compared with q4_K_M.
- On June 29, 2026 (Ollama 0.31), Gemma 4 on MLX got multi-token prediction, which Ollama says generates “nearly 90% faster on average” in a coding-agent benchmark. If you pulled Gemma 4 earlier, re-pull it with
ollama pull gemma4:12b-mlx. See our explainer on multi-token prediction.
Files live in ~/.ollama (models and configuration), and logs are in ~/.ollama/logs/server.log. Our full Ollama install guide covers Windows and Linux too, and these Ollama settings help with speed.
Option 2: LM Studio (best graphical app)
Requirements, from LM Studio’s system requirements page: Apple Silicon (M1/M2/M3/M4), macOS 14.0 or newer, and 16 GB+ RAM recommended. “Intel-based Macs are currently not supported.”
LM Studio describes itself as “powered by the LM Studio runtime, with MLX and llama.cpp under the hood.” On a Mac, you’ll see both MLX and GGUF versions of most models in its search. As a rule, pick MLX builds on Apple Silicon, and GGUF when no MLX build exists or you need a specific quantization.
What it adds over a terminal: an in-app model browser and downloader, a chat UI, and a local OpenAI-compatible server for other apps. Our LM Studio setup guide walks through it step by step, and llama.cpp vs Ollama vs LM Studio compares the three.
Option 3: mlx-lm (Apple’s MLX in Python)
mlx-lm is Apple’s open-source package for “generating text and fine-tuning large language models on Apple silicon with MLX.” The current release is 0.32.2 (October 2026, Python 3.11+).
python3 -m venv ~/mlx && source ~/mlx/bin/activate
pip install mlx-lm
# one-shot generation (default model: mlx-community/Llama-3.2-3B-Instruct-4bit)
mlx_lm.generate --prompt "Explain unified memory in two sentences"
# interactive chat with a specific model
mlx_lm.chat --model mlx-community/Mistral-7B-Instruct-v0.3-4bit
# OpenAI-style local server
mlx_lm.server --model mlx-community/Mistral-7B-Instruct-v0.3-4bit
Thousands of ready-converted models are in the mlx-community organization on Hugging Face. To convert and 4-bit quantize a Hugging Face model yourself:
mlx_lm.convert --model mistralai/Mistral-7B-Instruct-v0.3 -q
mlx-lm also supports LoRA and full fine-tuning, including on quantized models. That makes a Mac a reasonable small-scale training machine. Our fine-tuning guide covers the concepts.
From Python:
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Mistral-7B-Instruct-v0.3-4bit")
messages = [{"role": "user", "content": "Write a haiku about RAM"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, verbose=True))
Speed up big models: the wired-memory limit
The mlx-lm README explains that models that are “large relative to the total RAM available” can be slow. mlx-lm tries to speed them up by wiring (pinning) the model’s memory, which “requires macOS 15 or higher.” If you still see a warning about the wired limit, you can raise it:
sudo sysctl iogpu.wired_limit_mb=N
According to the README, N should be “larger than the size of the model in megabytes but smaller than the memory size of the machine.” The setting resets when you reboot. Leave real headroom for macOS, because setting it too close to your total RAM can make the system unstable.
Ollama vs LM Studio vs mlx-lm on a Mac
| Ollama | LM Studio | mlx-lm | |
|---|---|---|---|
| Interface | CLI + simple app, API | Full GUI, API | CLI + Python |
| MLX support | Yes (-mlx / NVFP4 tags) |
Yes | Native |
| GGUF support | Yes | Yes | No (MLX format) |
| Intel Macs | CPU only | Not supported | No (Apple silicon) |
| Minimum macOS | 14 | 14 | 15 recommended for large models |
| Best for | Coding agents, apps, “just works” | Browsing models, chatting, beginners | Developers, fine-tuning, research |
| Cost | Free, open source | Free app | Free, open source |
All three can serve an OpenAI-compatible API, so the same coding tools and apps work with any of them. See local LLM OpenAI-compatible API.
Which model should I run on my Mac?
- 8 GB:
gemma4:e2b(4.6 GB) for quick questions and summaries. - 16 GB:
gemma4:12b-mlx(7.7 GB). It’s a strong all-rounder with a 256K context window per Ollama’s listing, though you won’t fit anywhere near that much context in 16 GB. - 32–36 GB:
qwen3.8:27b-mlx(18 GB) orgemma4:31b-mlx(19 GB) for serious coding and reasoning. For coding picks, see our best local LLM for coding guide. - 48 GB+: 27B–35B models with long contexts, or mixture-of-experts models such as the 35B-A3B coding builds (why MoE runs fast).
Troubleshooting
- Very slow, with swap filling up? The model plus context is bigger than your free memory. Use a smaller model or quantization, shorten the context, or close other apps.
- Ollama model seems slower than expected? Check you’re on a recent Ollama, and try the
-mlxtag of the same model. - Model won’t load in LM Studio? Pick a smaller model or a lower-bit (4-bit) build, and lower the context length in its load settings.
- Wired-memory warnings in mlx-lm? Upgrade to macOS 15+ and see the sysctl section above.
- Intel Mac? Ollama runs on the CPU only, LM Studio isn’t supported, and small models are your realistic limit.
FAQ
Can a MacBook Air run an LLM?
Yes. An M-series MacBook Air with 16 GB runs 4B–12B models (for example Gemma 4 12B at 7.7 GB) well enough for chat and writing. Fanless models may slow down during long sessions.
Is MLX faster than llama.cpp on a Mac?
Ollama’s own tests show its MLX engine is much faster than its previous engine on the models it tested, and Apple designed MLX for its hardware. Results vary by model, so the simplest check is to run both versions of the same model and compare tokens per second.
Do I need a GPU for local AI on a Mac?
No. Every Apple Silicon Mac has a built-in GPU that Ollama, LM Studio and MLX use automatically through Metal and MLX.
How much RAM do I need to run a 27B model on a Mac?
Plan on 32 GB or more. The MLX builds of Qwen3.8 27B and Gemma 4 31B are 18–19 GB to download, plus memory for context and macOS itself.
Can I fine-tune models on a Mac?
Yes. mlx-lm supports LoRA and full fine-tuning on Apple Silicon, and Unsloth’s docs say Unsloth Studio supports training on Macs too.
Watch: Apple’s introduction to MLX
The takeaway
For most Mac owners, install Ollama and run an -mlx model. It takes two minutes and is now properly fast on Apple Silicon. Use LM Studio if you’d rather browse and chat in a polished app, and mlx-lm if you want Python control or plan to fine-tune. Match the model to your memory: about 8 GB of model on a 16 GB Mac, and 18–19 GB models on a 32 GB+ Mac.
Sources: Ollama macOS docs, Ollama: “Ollama is now powered by MLX on Apple Silicon in preview” (Mar 30, 2026), Ollama: “highest performance on Apple Silicon yet with MLX” (Jun 11, 2026), Ollama: “Faster Gemma 4 on MLX with multi-token prediction” (Jun 29, 2026), Ollama library pages for gemma4, qwen3.8 and qwen3.6, LM Studio system requirements, LM Studio, mlx-lm README, mlx-lm on PyPI. Not benchmarked on a Mac by us. Facts checked November 29, 2026.
Cover image: LM Studio (official image)
