Skip to content
Guide

Why did my local model get slow on my Mac?

Most likely the model plus its context cache grew past the GPU memory (VRAM) limit, so the runner moved some of its layers to the CPU, which is much slower, and gave no error.

Last updated

What pushes a model past the limit?

Three things share the space under the GPU memory limit:

  • The model itself. A bigger model, or a higher quant of the same one, takes more memory.
  • Its context cache. It grows with every token of context, and two models of the same size can need ten times different amounts. Ollama's default context is 4,096 tokens, and parallel requests multiply it: Ollama's docs say a 2K context with 4 parallel requests becomes 8K.
  • Whatever else is loaded. A second model, or a big app, uses the same memory.

When the total goes over, the runner doesn't stop. It keeps the layers that fit on the GPU and runs the rest on the CPU. You still get answers, only slower.

How do I check?

In Ollama, run ollama ps while the model is loaded. The PROCESSOR column says where it runs:

PROCESSOR showsWhat it means
100% GPUAll of it is on the GPU. This is the fast case.
48%/52% CPU/GPUSplit: about half of it runs on the CPU. This is the slow case.
100% CPUNone of it is on the GPU.

It only reports a model that is already loaded, so run it again after each change.

How do I make it fast again?

  1. Use a smaller quant. A 4-bit version of a model needs roughly half the memory of the 8-bit one.
  2. Shorten the context. Inside ollama run, /set parameter num_ctx with a smaller number sets it. Fewer parallel requests (OLLAMA_NUM_PARALLEL) help too.
  3. Unload the other model. ollama stop and its name frees it at once. Quitting a big app helps as well.

Then run ollama ps again. You want 100% GPU.

Can I see it coming?

The fit check adds up a model and its context against a GPU limit before you load anything. IOSpec does the same on your Mac for every loaded model, and says "Part runs on the CPU, so it is slower" when Ollama reports a split. To see how much slower, its free speed test times a model and flags a run that spilled onto the CPU or swapped. The monitor is free. AI models are free for 14 days. Download it.