Tech

Why Your Laptop Runs AI So Slowly

AI-generated, human-reviewed.

Mikah Sargent had two Terminal windows open and one question for both Macs. “In three sentences, explain why bread dough needs time to rise.”

The 16 GB M2 MacBook Air from Episode 1 wrote about 13 tokens a second (12.79). The 48 GB M5 Max Mac Studio wrote about 82 (81.81). Both ran Qwen3.5 9B with thinking turned off.

A Hands-On AI listener named Carl wanted to know how much computer he'd need to run models locally. He has a 16 GB M3 MacBook Air, knows it has no fan, and would like to stick with an Air. He's looking at a 32 GB M5 Air and wondering what it'll run and whether he should go bigger. He also wanted to know what happened to the scheduling question from Episode 1. The Air was still thinking about it 30 minutes later.

Step One: Turn On the Speedometer

If you use Ollama, open Terminal and add “dash dash verbose” to the command you use to run your model. Ollama

ollama run qwen3.5:9b --verbose

After each answer, look for two lines.

  • Prompt eval rate tells you how fast the model read your prompt.
  • Eval rate tells you how fast it generated text, including any thinking it wrote out.

Both rates are in tokens per second. A token is a chunk of text, often part of a word.

Why Episode 1 Crawled

“I'm about to use a torque wrench for the first time. What do I need to know?” In Episode 1, the Air spent 89.6 seconds thinking before it answered. The trickier scheduling question was still generating reasoning when Mikah stopped watching, about 30 minutes in. A reasoning model can write out its work before it gives you an answer, and those extra tokens take time.

This time, Mikah turned thinking off and asked the wrench question on both Macs. To try it yourself, type /set nothink inside an Ollama chat or add --think=false when you launch it. Some models can only go as low as their lowest thinking setting. Ollama's thinking controls, Ollama's interactive commands

 

Read the prompt

Wrote the answer

M2 MacBook Air, 16 GB

116.15 tokens/s

12.67 tokens/s

M5 Max Mac Studio, 48 GB

835.45 tokens/s

82.48 tokens/s

The Studio finished in 15.51 seconds. The Air was still writing.

Thinking can help with a problem like that schedule, where there are plenty of ways to get tripped up. If you're asking something simpler on a laptop, try turning it off and see whether the answer still does what you need. Ollama and the model download have both changed since Episode 1, so the replay can't tell us how much either change affected speed.

Memory Decides What Fits

Your Mac's processor and graphics hardware share one pool of unified memory. On a PC with a separate graphics card, start with the card's video memory if you want the GPU to do all the work. Some software can split the job with system memory.

Leave room for the model, the conversation, and the space the software needs to do its work. That's the working set. A longer conversation takes more memory, and performance can fall off sharply if the working set doesn't fit.

The Mac also gives apps a recommendation for how much GPU work it can hold efficiently. On Mikah's 48 GB Studio, that's roughly 37.5 GB. The figure varies by Mac. Apple's explanation of the GPU working set

  • 16 GB. Mikah's Air ran the 9B model.
  • 24 GB. For the 27-billion-parameter version, the build you download and the length of your conversation both matter. Ollama's smaller 27B builds run 16 to 20 gigs. Ollama's Qwen3.5 builds
  • 32 GB. Testers have run selected 27B builds and a 35-billion-parameter model on a 32 GB M5 Air. Published M5 Air tests, MLX and GGUF tests

If you're picking your first download, look for a model file about half the size of your Mac's memory. That was the rule of thumb in Episode 1, and it leaves room for the conversation and the other apps you have open.

Bandwidth Decides Speed

Memory bandwidth is how many gigabytes per second the chip can read from memory. To write each token in these tests, the model reads most of its weights. Divide peak bandwidth by the bytes read per token and you get a speed limit. Use the download size as a stand-in for those bytes and you get a rough estimate. Inference math

Here's how the estimate compares with the wrench run. M2 Air specs, Mac Studio specs, 7.2 GB Qwen3.5 build

 

Bandwidth

÷ 7.2 GB download

Measured

M2 MacBook Air

100 GB/s

about 14 tokens/s

12.67 tokens/s

M5 Max Mac Studio

614 GB/s

about 85 tokens/s

82.48 tokens/s

Both Macs came in a little below the estimate. Cache traffic, software overhead, and other apps can pull the result down. It can also come out higher. This download includes a vision encoder, for example, and the model can leave it alone when it's writing text. Run --verbose to see where your machine lands.

That helps explain the bread dough result. The Studio has about six times the Air's rated memory bandwidth, and it wrote about six times as fast.

Two Speeds

If you've pasted a long document into a chatbot and waited for the first word, you've seen one half of the job. Prefill is when the model reads the parts of your prompt it hasn't already processed. It can work through those tokens in chunks, and long prompts often depend heavily on how much math the chip can do at once.

Decode is what happens once the model starts writing. It generates one token after another, and that pace often depends heavily on memory bandwidth.

Leo Laporte has pointed out on TWiT that a Mac can write quickly and still leave you waiting while it reads a long prompt. Prefill is one reason he likes his DGX Sparks. Nvidia's DGX Spark has 128 GB of memory, 273 GB/s of bandwidth, and hardware built for AI math. That's less than half the Studio's bandwidth. In LMSYS's single-stream tests, the Spark processed prompts quickly and generated text much more slowly with dense models. Nvidia's specs, LMSYS's tests

Four Things to Try on Your Mac

  1. Look for MLX support. MLX is Apple's machine-learning framework for Apple silicon. Ollama uses it automatically for supported models on a Mac. In LM Studio, choose an MLX build. Ollama's MLX release notes, LM Studio's documentation
  2. Keep the start of your prompt the same. If you reuse the exact wording, Ollama can reuse that work while it's still cached. By default, Ollama keeps the model loaded for five minutes after a request. Ollama's prompt caching notes, Ollama's keep-alive settings
  3. Try a mixture-of-experts model. Qwen3.5 35B-A3B has 35 billion parameters. About 3 billion are active for each token. Using fewer weights at a time can make it faster than a similarly sized dense model. You still need room for all the experts. Qwen's model card
  4. Give the model less new text to read. Shorter instructions and fewer pasted pages mean less prefill. In Episode 8, AnythingLLM retrieved four excerpts from the manual, not the whole thing.

Newer chips can help with the wait, too. Apple added Neural Accelerators to the M5's GPU. When Apple tested long prompts on an M5 MacBook Pro and an M4 MacBook Pro, it measured up to about a fourfold speedup in getting to the first token. After that, the M5 generated tokens 19% to 27% faster. Apple's tests

If you usually paste in long documents, time how long it takes to see the first token. If you tend to ask short questions and get long answers, pay attention to how fast the answer comes out.

The No-Fan Test

What happens if the Air has to keep going? Mikah let the M2 Air cool, plugged it in, and ran a script that asked for long answers back to back for 10 minutes. It logged how fast the model wrote each answer.

  • The first answer came in at 13.3 tokens a second.
  • It hit 15.7 about two minutes in.
  • Around the three-minute mark, it dropped to 8.1, about half the peak.
  • Around halfway through, it was back up to 10.9.
  • It logged 12.6 for each of the last four answers, about the last minute and a half.

The final pace was about 5% below the first answer and about 20% below the peak. The Air slowed down during sustained work, then settled into a steadier pace. That's what happened with one model in one run. The speed readout can't tell us what caused the dip. Pauses give the Air time to shed heat, and active cooling can help during sustained work.

Carl's Upgrade

Mikah didn't have an M5 Air to test. For Carl's question, he used Apple's specs, the same file-size estimate, and other people's published tests.

  • Carl's M3 Air is rated at 100 GB/s, like Mikah's M2 Air, so both start with the same estimate. Carl's actual speed can differ. The M3 Air tops out at 24 GB of memory. M3 Air specs
  • The M5 Air goes up to 32 GB and has 153 GB/s of bandwidth, a 53% increase. With the same 7.2 GB download, the estimate goes from about 14 tokens a second to about 21. M5 Air specs
  • The M5's Neural Accelerators can help with long prompts when the software supports them. Apple's roughly fourfold result came from an M5 MacBook Pro. How much Carl would gain going from an M3 Air to an M5 Air is still an open question. Apple's test systems

For Carl, the bigger change is doubling his memory from 16 GB to 32 GB. That gives him room for larger builds and longer conversations. Testers have run the dense 27B model and the 35B mixture-of-experts model on a 32 GB M5 Air. How much room is left depends on the build, the conversation, and the other apps that are open. Published M5 Air tests, MLX and GGUF tests

Bigger dense models write slower, though. Divide 153 GB/s by the 17 GB download for the dense 27B build and you get about nine tokens a second. Ollama's 17 GB build

As for going bigger, 32 GB is as much memory as you can get in an Air. Beyond that, Carl would be looking at a MacBook Pro, which he wants to avoid, or a desktop.

Mikah's advice is to start with the 16 GB M3 Carl already owns. Run a 9B model with thinking off and ask it the questions he'd actually use it for. Are the answers good enough? How long before they start? Is the writing pace comfortable? If he wants a larger model with him when he's offline, that's a reason to get the 32 GB Air. If he'll mostly use the heavier model at home, a desktop can hold it.

Carl also asked about running a model on a dedicated Mac and connecting from his laptop. That'll get its own episode.

Takeaways

  • Add --verbose in Ollama to see the prompt and generation rates.
  • Leave memory for the model, the conversation, and your other apps. A download about half the size of your memory is a good place to start.
  • Divide rated bandwidth by the download size for a rough estimate of generation speed.
  • Turning off thinking can cut the amount of text the model has to generate.
  • In the 10-minute test, the fanless Air slowed under sustained work and finished about 20% below its peak.

Before you shop for a new Mac, try Mikah's homework on the one you have. Run your favorite model with --verbose and read your own tokens per second. Then try the same request with --think=false. Read the answer and see whether you'd keep that setting.

Got a question like Carl's? Send it to handsonai@twit.tv. Mikah also offered to publish the glossary of AI terms he put together before launching the show if five people email to ask for it.

Find Hands-On AI and subscribe.

All Tech posts