How to run an LLM on a Mac with Apple silicon
How-toBy Lucas Matías García TorresUpdated Data checked 4 min read
Reviewed by Lucas Matías García Torres on . How we work.

Short answer
To run an LLM on a Mac on October 23, 2026 you need an Apple silicon Mac (M1 or later) with macOS 14 Sonoma or newer; LM Studio recommends 16 GB of memory. Ollama, LM Studio and Apple's MLX all use the GPU, and unified memory decides the model size: qwen3:8b downloads at 5.2 GB, gpt-oss:20b at 14 GB and gpt-oss:120b at 65 GB. Ollama sets a 4k context below 24 GiB of memory, and mlx-lm documents raising the GPU wired memory limit for large models.
Prices and limits change often: check the vendor's page before you pay. How we make money.
You can run an LLM on a Mac with Apple silicon using three free tools: Ollama, LM Studio or Apple's own MLX framework. On October 23, 2026 all three use the Mac's GPU, and the one number that decides which models you can run is unified memory, because the CPU and GPU share it. This guide covers the requirements, how much memory each model size needs, how to set up each tool and the memory limits that slow big models down, based on the official documentation read on October 23, 2026.
What you need
- An Apple silicon Mac (M1 or later). Ollama supports Apple M-series chips with CPU and GPU, and runs on Intel Macs on the CPU only. LM Studio does not support Intel Macs at all.
- macOS 14 Sonoma or newer. Both Ollama and LM Studio require it.
- 16 GB of memory or more. LM Studio recommends 16 GB and says 8 GB Macs can still work with smaller models and modest context sizes.
- Free disk space. Ollama warns that models can take tens to hundreds of gigabytes.
Memory decides the model
On a PC the limit is the graphics card's VRAM. On a Mac the GPU uses the same unified memory as everything else, so a 16 GB Mac has 16 GB for macOS, your apps and the model together. The download size of a model is a good first estimate of the memory its weights need, and the conversation adds more on top, because the context is kept in memory too.
Table: download sizes in Ollama's library (checked October 23, 2026) and the Mac memory we suggest
| Model (Ollama tag) | Download size | Mac memory we suggest |
|---|---|---|
| qwen3:4b | 2.5 GB | 8 GB |
| qwen3:8b | 5.2 GB | 16 GB |
| qwen3:14b | 9.3 GB | 16 GB, with little else open, or 24 GB |
| gpt-oss:20b | 14 GB | 24 GB or more |
| qwen3:30b | 19 GB | 32 GB or more |
| gpt-oss:120b | 65 GB | 96 GB or more |
The last column is our own rule of thumb: the model plus room for macOS, your apps and the context. Smaller quantized versions use less memory at some cost in quality; our explainer on quantization covers the trade-off, and our guide on how much VRAM an LLM needs has the full calculation.
Option 1: Ollama
Ollama is the simplest choice if you are happy with a terminal. Its documentation recommends mounting ollama.dmg and dragging the app into Applications; on first start it offers to create a link so the ollama command works in Terminal. Ollama uses the Mac's GPU through Apple's Metal API. Then run a model:
ollama run qwen3:8b
Check that the model fits with ollama ps: the PROCESSOR column should read 100% GPU. If part of it says CPU, the model or its context does not fit and answers will be much slower. Models and settings live in ~/.ollama. Our list of Ollama commands covers the rest.
Context is the setting most people miss. Ollama picks a default from the available memory: 4k tokens below 24 GiB, 32k between 24 and 48 GiB and 256k from 48 GiB. It recommends at least 64,000 tokens for agents, web search and coding tools, which you set with the slider in the app's settings or with OLLAMA_CONTEXT_LENGTH=64000 ollama serve. More context needs more memory, so on a 16 GB Mac raise it carefully.
Option 2: LM Studio
LM Studio is the choice if you prefer a window to a terminal. It runs GGUF models through llama.cpp on every platform, and on Apple silicon Macs it also runs models in Apple's MLX format. You manage the engines, which LM Studio calls runtimes, with Command-Shift-R, and its lms command can download MLX versions with the --mlx flag. When a model is offered in both formats, try the MLX one first on a Mac. Our comparison of Ollama and LM Studio explains the other differences.
Option 3: MLX LM for developers
MLX is an array framework for machine learning on Apple silicon from Apple's machine learning research team, built around unified memory: arrays live in shared memory, so the CPU and GPU work on the same data without transferring it. Its mlx-lm package runs and fine-tunes language models from Python:
pip install mlx-lm
mlx_lm.chat
Without options it loads mlx-community/Llama-3.2-3B-Instruct-4bit, and the --model flag takes any of the thousands of MLX models in the mlx-community organization on Hugging Face. It is the route to choose if you want to script generation or fine-tune a model with LoRA on your Mac.
When a large model is slow
macOS limits how much memory the GPU can keep wired, that is, locked in place. The mlx-lm documentation explains that models large relative to the Mac's memory can be slow, that on macOS 15 or later it tries to wire the model's memory to speed it up, and that if it warns about the model size you can raise the limit with:
sudo sysctl iogpu.wired_limit_mb=N
N should be larger than the model in megabytes and smaller than the Mac's memory. Our advice is to leave several gigabytes for macOS and your apps, because the model and the system share the same memory.
Which one to choose
- First model, terminal is fine: Ollama. One command, and its local API is what many other apps connect to.
- Prefer a graphical app or want MLX without code: LM Studio.
- Writing Python or fine-tuning: MLX LM.
Whatever you choose, the steps for running an LLM locally apply, and if you are still choosing hardware, our comparison of NPUs and GPUs explains what each chip does.
What we checked
- Ollama on macOS: requires macOS Sonoma (v14) or newer; Apple M series with CPU and GPU support, x86 CPU only; install by mounting ollama.dmg and dragging the app to Applications, which offers to link the CLI in /usr/local/bin; models can need tens to hundreds of GB; models and configuration in ~/.ollama. (Ollama, )
- Ollama supports GPU acceleration on Apple devices via the Metal API. (Ollama, )
- Ollama context length defaults: under 24 GiB of VRAM 4k, 24 to 48 GiB 32k, 48 GiB or more 256k; at least 64,000 tokens recommended for web search, agents and coding tools; set with the app slider or OLLAMA_CONTEXT_LENGTH; ollama ps shows the PROCESSOR split and context. (Ollama, )
- LM Studio on macOS: Apple silicon (M1/M2/M3/M4), macOS 14.0 or newer, 16 GB of RAM or more recommended, 8 GB Macs should use smaller models and modest context sizes; Intel Macs not supported. (LM Studio, )
- LM Studio runs llama.cpp (GGUF) models on all platforms and also Apple's MLX on Apple silicon Macs; runtimes are managed with Command-Shift-R; lms get accepts --mlx. (LM Studio, )
- MLX is an array framework for machine learning on Apple silicon from Apple machine learning research; arrays live in shared (unified) memory and operations run on CPU or GPU without transferring data. (Apple (ml-explore on GitHub), )
- mlx-lm: pip install mlx-lm; mlx_lm.generate and mlx_lm.chat; default model mlx-community/Llama-3.2-3B-Instruct-4bit; thousands of models in the mlx-community Hugging Face organization; LoRA and full fine-tuning; large models are wired in memory on macOS 15 or higher; raise the limit with sudo sysctl iogpu.wired_limit_mb=N, with N larger than the model in MB and smaller than the machine's memory. (Apple (ml-explore on GitHub), )
- Ollama library download sizes: qwen3:4b 2.5 GB, qwen3:8b 5.2 GB, qwen3:14b 9.3 GB, qwen3:30b 19 GB, gpt-oss:20b 14 GB, gpt-oss:120b 65 GB. (Ollama, )
What may change
- Model sizes, default context lengths and tool requirements change with new versions. This page is reviewed quarterly.
- The suggested memory per model and the advice to try MLX first and leave memory for macOS are our own rules of thumb, not vendor figures.
Frequently asked questions
Can I run an LLM on a Mac?
Yes. On an Apple silicon Mac (M1 or later) with macOS 14 Sonoma or newer, Ollama, LM Studio and MLX LM run models on the GPU for free. Ollama also runs on Intel Macs, but only on the CPU, and LM Studio does not support Intel Macs.
How much memory does a Mac need for a local LLM?
LM Studio recommends 16 GB and says 8 GB Macs should stick to small models. As a guide, qwen3:8b downloads at 5.2 GB and fits a 16 GB Mac, gpt-oss:20b (14 GB) suits 24 GB or more and gpt-oss:120b (65 GB) needs a Mac with much more memory.
Is MLX faster than Ollama on a Mac?
It depends on the model and version, so test both with the same model on your Mac. LM Studio can run the same model as GGUF through llama.cpp or in Apple's MLX format, which makes the comparison easy on your own hardware.
Why is my model slow on a Mac?
Usually because it does not fit. In Ollama, run ollama ps: if PROCESSOR is not 100% GPU, part of the model is on the CPU. Use a smaller or more quantized model, lower the context, close other apps or, with mlx-lm on macOS 15 or later, raise the GPU wired memory limit.
What context length does Ollama use on a Mac?
It depends on memory: 4k tokens below 24 GiB, 32k between 24 and 48 GiB and 256k from 48 GiB. Ollama recommends at least 64,000 tokens for agents, web search and coding tools, set in the app's settings or with OLLAMA_CONTEXT_LENGTH.
Sources
- Ollama on macOS: system requirements, install location, files and uninstall, Ollama. Accessed October 23, 2026.
- Ollama: hardware support (NVIDIA, AMD, Apple Metal and Vulkan), Ollama. Accessed October 23, 2026.
- Ollama: context length defaults by memory and how to change them, Ollama. Accessed October 23, 2026.
- LM Studio: system requirements for macOS, Windows and Linux, LM Studio. Accessed October 23, 2026.
- LM Studio documentation: running llama.cpp (GGUF) or MLX models and managing runtimes, LM Studio. Accessed October 23, 2026.
- MLX: array framework for machine learning on Apple silicon (README, unified memory model), Apple (ml-explore on GitHub). Accessed October 23, 2026.
- MLX LM: running and fine-tuning language models on Apple silicon (README, large models and wired memory), Apple (ml-explore on GitHub). Accessed October 23, 2026.
- Ollama library: qwen3 and gpt-oss tags with download sizes, Ollama. Accessed October 23, 2026.
Spotted an error or an outdated price? Tell us and we will fix it.
Change history
- : First published. Checked on October 23, 2026 against Ollama's macOS, hardware and context length documentation and model library, LM Studio's documentation and system requirements, and the MLX and mlx-lm READMEs.
Next review: .
Part of our Local Models & Hardware guide.
Keep reading
- How to run an LLM locally on Windows, Mac or Linux
Install Ollama, pick a model that fits your memory, chat with it, check it runs on the GPU and connect other apps, with the official commands for each OS.
- How much VRAM do you need to run an LLM locally?
Work out how much GPU memory a local LLM needs from its size, quantization and context length. Our formula is checked against 13 real model files.
- Ollama vs LM Studio: which one should you use?
Ollama or LM Studio for running LLMs locally? Compare license terms, platforms, interface, local APIs and server use, from each project's own docs.
- Ollama commands: the cheat sheet
Every Ollama command in one cheat sheet: run, pull, ls, ps, stop, rm, create, serve and launch, plus environment variables, model folders and the local API.
- What is quantization in LLMs, and what do Q4_K_M and Q8_0 mean?
What quantization is in LLMs, what Q4_K_M, Q8_0 and MXFP4 mean, how much memory each saves and how much quality it costs, with measured data and how to choose.
- NPU vs GPU: which chip runs local models in 2026
NPU vs GPU for local models: what a Copilot+ PC's NPU runs today, which apps use it, the limits vendors document and why Ollama and LM Studio use the GPU.
Other topics

Assistants & Chatbots
16 guides

LLM APIs & Costs
11 guides

Agents & Automation
8 guides

Language Models Explained
14 guides