The short answer
Run ollama ps. The SIZE column is the memory each loaded model holds right now: its weights, roughly the download size, plus the context cache and working buffers. CONTEXT shows the context length it was loaded with. In current Ollama (0.15.5 and later), the default context depends on how much GPU memory Ollama finds (4K, 32K or 256K tokens, never more than the model supports), so the same model can hold much more memory on a Mac with more RAM. PROCESSOR should read 100% GPU; a CPU/GPU split means part of it didn't fit. UNTIL says when Ollama unloads it, 5 minutes after the last request by default. To give the memory back now, run ollama stop with the model's name.
On this page
Check what's loaded with ollama ps
Ollama loads a model the first time you send it a request and keeps it in memory for a while afterwards, so the next request starts instantly. ollama ps lists what's loaded now:
ollama psNAME ID SIZE PROCESSOR CONTEXT UNTIL
qwen2.5-coder:14b 9ec8897f747e 10 GB 100% GPU 8192 4 minutes from now| Column | Meaning |
|---|---|
| SIZE | Memory the loaded model holds: weights, context cache and working buffers. |
| PROCESSOR | Where the model was loaded. Ollama's FAQ: 100% GPU means entirely on the GPU, 100% CPU entirely in system memory, and a split such as 48%/52% CPU/GPU means partly on both. A split runs much slower. |
| CONTEXT | The context length, in tokens, it was loaded with (Ollama 0.10.0 and later). A longer context needs more memory. |
| RUNNER | The runner the model was loaded with, such as llamacpp, ggml or mlx (Ollama 0.40.0 and later). |
| UNTIL | When Ollama will unload it if nothing else asks for it. |
SIZE
- Meaning
- Memory the loaded model holds: weights, context cache and working buffers.
PROCESSOR
- Meaning
- Where the model was loaded. Ollama's FAQ:
100% GPUmeans entirely on the GPU,100% CPUentirely in system memory, and a split such as48%/52% CPU/GPUmeans partly on both. A split runs much slower.
CONTEXT
- Meaning
- The context length, in tokens, it was loaded with (Ollama 0.10.0 and later). A longer context needs more memory.
RUNNER
- Meaning
- The runner the model was loaded with, such as
llamacpp,ggmlormlx(Ollama 0.40.0 and later).
UNTIL
- Meaning
- When Ollama will unload it if nothing else asks for it.
The same figures come from Ollama's local API, which is what other tools read:
curl -s http://localhost:11434/api/psWhy it holds more than the download size
A model in memory is three things added together:
- The weights. About the download size. Quantisation decides it: Q4_K_M stores roughly 0.6 GB per billion parameters, Q8_0 about 1.1 GB, and full 16-bit weights 2 GB.
- The context cache. Memory for every token of context the model can see, reserved for the context length it was loaded with. Llama 3.1 8B has 32 layers and 8 key-value heads of 128 values, so at 16-bit precision its cache takes 128 KiB per token: 1 GiB at 8K tokens, 4 GiB at 32K and 16 GiB at 128K. Other models differ with their shape.
- Working buffers for the computation itself.
| Model tag | Parameters | Download |
|---|---|---|
llama3.1:8b | 8B | 4.9 GB |
qwen2.5-coder:14b | 14.8B | 9.0 GB |
qwen2.5:32b | 32.8B | 20 GB |
llama3.3:70b | 70.6B | 43 GB |
llama3.1:8b- Parameters
- 8B
- Download
- 4.9 GB
qwen2.5-coder:14b- Parameters
- 14.8B
- Download
- 9.0 GB
qwen2.5:32b- Parameters
- 32.8B
- Download
- 20 GB
llama3.3:70b- Parameters
- 70.6B
- Download
- 43 GB
The context length Ollama picks for your Mac
Ollama's context-length documentation says that, unless you set one, the default context length depends on the GPU memory available; the server code has done this since 0.15.5. On a Mac, that's the memory Metal reports for the GPU, a share of unified memory rather than all of it (below). Ollama's FAQ still gives 4,096 tokens as the default, which is now only the lowest tier.
| GPU memory available | Default context |
|---|---|
| Under 24 GiB | 4K tokens |
| 24–48 GiB | 32K tokens |
| 48 GiB or more | 256K tokens |
Under 24 GiB
- Default context
- 4K tokens
24–48 GiB
- Default context
- 32K tokens
48 GiB or more
- Default context
- 256K tokens
So a Mac with plenty of memory loads models with a much longer context by default, and ollama ps shows a larger SIZE for the same model. The default is never more than the context the model was trained for, and when Ollama chose it automatically and it doesn't fit, Ollama steps it down to 32K, then 4K. A context set in the model's Modelfile, or by you, takes priority. To choose it yourself, set OLLAMA_CONTEXT_LENGTH in the environment the server runs in, num_ctx in a request's options, or /set parameter num_ctx in an interactive session.
grep "vram-based default context" ~/.ollama/logs/server.log | tail -1- Flash attention reduces memory use as the context grows. Ollama's FAQ says it's used automatically when the backend and devices support it. In 0.40.1, for models run through llama.cpp on Apple silicon, Ollama leaves the choice on automatic and llama.cpp uses it where the model supports it; other runners may behave differently.
OLLAMA_FLASH_ATTENTION=1forces it on and0turns it off. - A quantised cache saves more: Ollama's FAQ says
OLLAMA_KV_CACHE_TYPE=q8_0uses about half the memory of the defaultf16with a very small loss in precision, andq4_0about a quarter, with a loss that may be more noticeable at long contexts. It only works with flash attention enabled, and it applies to every model the server loads. - Parallel requests multiply the cache. Ollama's FAQ says required memory scales with
OLLAMA_NUM_PARALLELtimes the context length.
The GPU's share of memory
An Apple silicon Mac has one pool of unified memory shared by the CPU and GPU. macOS lets the GPU use a large share of it, but not all: Metal reports a recommended working-set size for each Mac, which Apple describes as roughly how much memory the GPU can allocate without affecting its performance. In one of Apple's Metal talks, an M1 Pro or M1 Max with 32 GB can give the GPU 21 GB, and one with 64 GB can give it 48 GB. A model that fits under the limit runs fully on the GPU. One that doesn't is split, and Ollama runs the rest on the CPU, much more slowly.
So on a 16 GB Mac, a 14B model at Q4_K_M is near the limit before any other app has asked for memory. The will this model fit guide shows how to work it out for your Mac.
How to give the memory back
ollama stop qwen2.5-coder:14bTo change how long models stay loaded, set the keep-alive. Per request, keep_alive accepts a duration such as "10m", a number of seconds, 0 to unload straight after answering, or a negative number to keep the model loaded. For every model, set OLLAMA_KEEP_ALIVE in the environment Ollama's server runs in; a request's keep_alive overrides it.
curl http://localhost:11434/api/generate -d '{"model": "qwen2.5-coder:14b", "keep_alive": 0}'To use less memory while it's loaded, pick a smaller quantisation (Q4 instead of Q8), a shorter context, or a quantised context cache as above.
When a model makes the whole Mac slow
- Memory pressure turns yellow or red when a model loads on top of a browser, Docker and an IDE. macOS compresses memory and swaps, and everything slows down. Unload the model, or quit something large first.
- The PROCESSOR column shows a CPU/GPU split. The model is bigger than the GPU's share of memory. A smaller model, quantisation or context fixes it; a faster CPU doesn't.
- Several models are loaded at once. By default Ollama can keep up to 3 models loaded (
OLLAMA_MAX_LOADED_MODELS), and each holds its own memory.ollama pslists them all. - The default context is larger than you need. On a Mac with a lot of memory, the 256K default tier can hold many gigabytes for a model trained for long contexts. Set
OLLAMA_CONTEXT_LENGTHto what your work uses.
The faster way: AI models in iKnowMyMac
iKnowMyMac's AI models section, under Projects, asks Ollama, LM Studio, llama.cpp's server and MLX servers on 127.0.0.1 which models are loaded, and shows the memory each one holds against the GPU memory limit macOS sets for your Mac, with when Ollama will unload it. Nothing leaves your Mac, and prompts are never read.

Sources
- 1.Ollama FAQ at v0.40.1: GPU loading, keep-alive, flash attention, K/V cache, concurrency (GitHub)
- 2.Ollama context length documentation at v0.40.1 (GitHub)
- 3.Ollama v0.40.1 source: ollama ps columns (cmd/cmd.go)
- 4.Ollama v0.40.1 source: default context by GPU memory (server/routes.go)
- 5.Ollama v0.40.1 release (GitHub)
- 6.recommendedMaxWorkingSetSize (Apple Developer, Metal)
- 7.Metal compute on MacBook Pro (Apple Developer tech talk)
- 8.Llama 3.1 model parameters (Meta, llama-models on GitHub)
- 9.View memory usage in Activity Monitor (Apple)