0:00 The model needed 16GB. My Mac crashed at 31.
My MacBook has 32 gigabytes of memory. The AI model needed 16. 5 prompts later, memory hit 31 of 32, and the laptop shut itself down. The model didn't get bigger. Something else did. Stick around, because by the end you'll be able to work out your own Mac's real limit in 10 seconds, plus the 5 fixes that stopped my crashes. This is Upgrade with V.
0:24 It's not the model
When a Mac struggles with local AI, everyone blames the model size, or the chip. But the model file never changes size. What grows is everything you send it. Every time you press enter, the model rereads the whole conversation. The system prompt, your chat history, every file your coding agent opened, every error log. That's the context. And in a coding agent, it explodes. One file can be 5,000 tokens.
One error log, 10,000 more. 5 prompts in, you're past 40,000 tokens. Quick one before your memory fills up: subscribe. It uses zero RAM. I checked.
0:57 Where the context lives (KV cache)
That context sits in memory, in the KV cache. For a typical 32B model, that's about a quarter of a megabyte per token. At 8,000 tokens, 2 gigabytes. At 32,000, 8 gigabytes. At 128,000, 32 gigabytes. That's the whole Mac, just for the conversation. So how much can your Mac actually hold? Let's do the maths. It's easier than you think.
1:18 Your Mac's memory budget
So here's the budget, using my Mac. Start with 32 gigabytes. macOS and my apps take about nine, before I even open a model. A 27B model at 4-bit, about 16. That leaves around 7 gigabytes for the conversation. 5 prompts of a coding agent fill that. Do this sum for your own Mac. Total memory, minus about nine for the system, minus the model. What's left is your conversation budget.
If it's under 5 or 6 gigabytes, expect trouble. When it runs out, the Mac starts swapping to the SSD, and everything slows to a crawl. In my case, it simply shut down. On other setups it doesn't crash. It forgets. The oldest messages get cut, and the model loses the start of your task. If you've ever watched that memory graph turn red, hit like. Your Mac would want you to.
2:04 5 fixes, ranked
Here are the 5 fixes, from biggest impact to smallest. 1. Set the context length on purpose. Don't leave it at the maximum. For a 27B on 32 gigs, about 32,000 tokens is a safe start. 2. Store the KV cache in 8-bit instead of 16. That halves the conversation's memory, with almost no quality loss. 3. One task per chat. Your agent doesn't need yesterday's error logs. Start fresh.
4. Use a server with an SSD cache, like oMLX. Old context goes to the SSD instead of RAM, so a restart reloads in seconds instead of rebuilding everything. 5. Switch to a mixture of experts model. Qwen 3.6 35B-A3B, only uses about 3 billion parameters per word, so it's faster, and leaves you more room.
2:48 Before and after: 17 → 40 tok/s
My before and after, on the same Mac. Before: the dense 27B. About 17 tokens a second at best, and the laptop shutting down on long agent sessions. After: the 35B mixture of experts. About 40 tokens a second, a capped context, fresh sessions. No crash since. Got a friend running AI on an 8 gig MacBook Air? Send them this. Quickly.
3:08 Watch the context
Your model isn't the only thing in memory. Every token you send stays there too. Watch the context, not just the model size. All my own numbers, no sponsors. If that helped, subscribe, so YouTube actually shows you the next one. And tell me in the comments: how much memory does your Mac have, and what are you running on it? And if you haven't seen it yet, episode one is right here: is 16 gigabytes of VRAM enough?


