MacforAI

Which Mac runs your local LLM: memory, speed and Apple price

← All articles

How Fast Will a Local LLM Run on Your Mac? Speed Test

Published · Updated · 8 min read

Watch the video on YouTube

How fast a local LLM runs on a Mac comes down to three numbers: tokens per second while it writes, prompt reading speed (prefill), and the wait before the first token appears. The free speed simulator in our Mac LLM calculator estimates all three for any Mac, model, quantization, context size and runtime, then replays a fake chat at those speeds so you can feel the difference.

Key takeaways

  • Writing speed is bandwidth-bound; reading speed is compute-bound. A Mac can be good at one and weak at the other.
  • In our example, a MacBook Air 13″ M5 (24 GB) writes about 39 tokens/s with gpt-oss-20b, while a Mac Studio M5 Max (64 GB) writes about 150.
  • The wait before the first token is the number people forget: a 32K-token prompt costs the Air about 71 seconds with that model, and the Studio about 16.
  • Every figure is an estimate. Treat writing speed as a ceiling and expect real results to land below it.
  • Check that the model fits first. If it does not, speed is zero, because the Mac would swap or refuse to load it.

What the speed simulator shows

The simulator opens from the results of the calculator and uses whatever setup you have selected: Mac, model, quantization, context and runtime. It then plays a short chat turn using the estimated numbers. You pick a prompt size (1K, 4K, 16K or 32K tokens), and the simulator first shows a "reading your prompt" pause, then streams the answer token by token.

The three figures under the chat are the whole story:

  • Wait, in seconds, equals the prompt size divided by the prefill speed.
  • Generation, in tokens per second, is the writing speed.
  • Tokens, a live counter of the answer so far.

Prompt sizes larger than the context you selected are greyed out, because a 32K prompt cannot fit into an 8K context. The sample answer is not real model output; it is a canned paragraph streamed at the right pace, which is exactly what you need to judge whether a speed feels usable.

What each input means

Every input changes either the bytes the chip must read per token, or the compute it must do per prompt token. The table summarizes how the engine treats them.

InputWhat it changesEffect in the estimate
ModelActive parameters and KV cache layoutDense models read all weights per token; mixture-of-experts read only active experts
QuantizationBits per weight (Q3 3.9, MXFP4 4.25, Q4 4.85, Q6 6.6, Q8 8.5)Fewer bits means fewer bytes per token, so faster writing
ContextSize of the KV cacheLonger context means more to read per token, so writing slows down
RuntimeSoftware efficiencyMLX is modeled at about 1.15x writing and 1.1x reading versus llama.cpp
KV cache bitsPrecision of the cache8-bit or 4-bit cache shrinks the per-token read
Speculative decoding or MTPExtra tokens per passAbout 1.25x or 1.35x on writing; they do not stack

Writing speed follows the rule from our guide to memory bandwidth and tokens per second: effective bandwidth divided by the bytes read per token. The engine uses a share of the chip's rated bandwidth (68% for chips up to 200 GB/s, 60% up to 650 GB/s, 52% above), scaled down for fanless designs. Reading speed is estimated from GPU cores: about 0.36 TFLOPS per core, with 2 floating-point operations per active parameter for each prompt token.

Worked example: MacBook Air vs Mac Studio M5 Max

Take two configurations from the calculator data (US price before tax, as of 2026-11-04):

  • MacBook Air 13″ M5, 24 GB, 10-core GPU, 153 GB/s: $1,499.
  • Mac Studio M5 Max, 64 GB, 40-core GPU, 614 GB/s: $3,499.

Both run the model with llama.cpp-style settings, a 32K context and a 16-bit KV cache. Here is what the engine estimates.

Model (quantization)MacWritingReadingWait for 8K / 16K / 32K prompt
Llama 3.1 8B (Q4)Air 24 GB11.8 tok/s207 tok/s40 s / 79 s / 158 s
Llama 3.1 8B (Q4)Studio 64 GB45.4 tok/s900 tok/s9 s / 18 s / 36 s
gpt-oss-20b (MXFP4)Air 24 GB38.9 tok/s460 tok/s18 s / 36 s / 71 s
gpt-oss-20b (MXFP4)Studio 64 GB149.8 tok/s2,000 tok/s4 s / 8 s / 16 s

Three things stand out. First, the Studio is about 3.9 times faster at writing and 4.3 times faster at reading, which tracks its 4x bandwidth and 4x GPU cores. Second, the mixture-of-experts model gpt-oss-20b is over three times faster than the dense 8B model on the same Mac, even though its file is bigger (12.8 GB versus about 4.9 GB), because only 3.6 billion parameters are active per token. Third, long prompts hurt the Air badly: with a dense 8B model, pasting a 32K-token document means more than two and a half minutes of waiting.

Context also matters for writing. With a short 8K context the same Llama 8B on the Air would write about 17.7 tokens/s instead of 11.8, because the KV cache is much smaller.

Now the other side. A 70B model such as Llama 3.3 70B at Q4 needs roughly 44 GB with an 8K context. The Studio fits it and is estimated at about 8.7 tokens/s writing and about 102 tokens/s reading, so an 8K prompt waits around 80 seconds. At a 32K context the total grows to about 52 GB, which exceeds the roughly 48 GB the GPU can use by default on 64 GB, so the simulator reports it does not fit. The Air cannot run it at all. If capacity is your question, read how much RAM you need for a local LLM.

How honest are these numbers?

The simulator is a model, not a benchmark. Three caveats keep it honest.

Writing speed is a ceiling. The formula is bandwidth-based, and real runs lose time to software overhead, thermal throttling and other apps. Use the estimate to rank setups and spot unusable ones, not to promise a number to the decimal.

Reading speed is a rougher guess. It assumes a flat 0.36 TFLOPS per GPU core and applies a penalty only at very large contexts (about 12% from 64K and 25% from 128K). Real prefill varies with the runtime, the model architecture and the chip generation, so treat it as a range.

Runtime and extras are multipliers, not measurements. Switching to MLX raises the estimates by about 15% on writing in our model. Speculative decoding and multi-token prediction help only when the model supports them, and the engine does not stack them. If you run an MLX build of the Air example above, expect roughly 45 tokens/s instead of 39 on gpt-oss-20b, and a 32K wait near 65 seconds instead of 71.

How to use the simulator to decide

  1. Pick the model class you actually want to run, then check that it fits in memory with your context. If it does not, move to a smaller quantization or context, or to more RAM.
  2. Read the writing speed. Around 15-20 tokens/s feels fluent in chat; below 5 feels slow.
  3. Set the prompt size you really use (a document, a code base, an agent history) and read the wait. If the wait is longer than you will tolerate, you need more GPU cores, a newer chip or a smaller or sparser model.
  4. Compare two Macs side by side, and open the calculator to see price per token of speed.
  5. Leave headroom. A setup that fits at 95% of usable memory is fragile; the next browser tab can break it.

For the buying decision itself, our Mac buying guide for local LLMs and the comparison of Pro, Max and Ultra chips go deeper on which tier pays off.

FAQ

How fast will a local LLM run on my Mac?

It depends on memory bandwidth, model size, quantization and context. As a rough ceiling, divide the chip's effective bandwidth by the gigabytes read per token. The speed simulator in the calculator does this for you and also estimates prompt reading speed.

Why is the first token so slow with a long prompt?

Before the first word appears, the Mac must process the whole prompt, which is called prefill and is limited by GPU compute. A 32K-token prompt on a MacBook Air 13″ M5 takes about 71 seconds with gpt-oss-20b in our estimate. A Mac Studio M5 Max with 40 GPU cores cuts that to about 16 seconds.

Are the simulator numbers real benchmarks?

No. They are estimates from a formula based on bandwidth, GPU cores and model size, and real results usually land at or below the writing-speed estimate. Use them to compare setups and to see which are clearly too slow, not as a guarantee.

Does a bigger model always run slower?

For dense models, yes, roughly in proportion to the bytes read per token. Mixture-of-experts models are the exception because they read only the active experts, so gpt-oss-20b can be faster than a dense 8B model if the whole file fits in memory.

Does MLX or llama.cpp make a difference?

In our model MLX is about 15% faster at writing and 10% faster at reading than llama.cpp. That is an estimate, and the real gap depends on the model and version, so use it as a nudge rather than a rule.