Recipes and examples

Will a local AI model fit in your Mac's memory?

Add up weights, context and runtime, compare with what the GPU can use and what is free, and check a model in Hedroom before you download it.

  • Free and Pro
  • Ships in a later release
  • Updated

Running a language model on your own Mac depends mostly on whether it fits in memory. This recipe shows the arithmetic you can do by hand in a minute, then how Hedroom’s Local AI headroom check does it for you and answers Fits, Tight, Make room or Won’t fit, with the line that decided it, before you download several gigabytes.

Hedroom does not download, load or run a model, and it does not talk to a model app. It estimates memory only, and it makes no promise about speed. Local AI headroom is planned for a later release, so this page describes what is built and what has not yet been checked on real Macs.

What you need

  • Free: the check, and reading the GPU limit.
  • Pro: raising the GPU memory limit, which also needs the small helper approved in System Settings once. Resetting it is never locked. On a Mac with 24 GB or less, Hedroom offers no higher limit at all.
  • A model family and size, and the bits per parameter and context length you plan to use.
  • No permission for the check itself.

Steps

The arithmetic, by hand

  1. Weights. Parameters times bits per parameter, divided by 8. An 8-billion-parameter model at 4 bits is about 4 GB. A 70-billion-parameter one at 4 bits is about 35 GB. At 16 bits, double and quadruple those.
  2. Context. While it reads and writes, the model keeps a cache that grows with the length of the conversation. A short context adds little. A very long one can add several gigabytes.
  3. Runtime. The app that runs the model needs some memory of its own.
  4. Add them up. Then compare the total with two numbers, not one. First, what the GPU can use: on Apple Silicon the GPU shares memory with everything else, but macOS caps how much it can hold. Apple does not publish the rule. Hedroom’s reading is about two-thirds of memory up to 36 GB, and three-quarters above. Second, what is free right now, because your browser, editor and chat apps hold memory too.

The same check in Hedroom

  1. Open it. In Tools, open Local AI headroom (“Will it fit?”).
  2. Pick a model. Under 1 · Pick a model, choose the bits per weight: 4-bit, 8-bit or 16-bit. Then pick a model from the list. Each row shows its approximate weights and a chip. Hedroom names families and sizes and recommends none. Sizes are approximate.
  3. Pick the context. Under 2 · How much text at once, choose Short · 4K, Medium · 8K, Long · 32K or Very long · 128K. A note shows how much more memory that length needs on top of the model.
  4. Read the verdict. The Verdict tile says Fits., Tight., Fits, after making room. or Won’t fit., with a sentence that names the line that decided it, and a breakdown “Weights about … · context about … · runtime about …. The estimate can be off by about 15%.” A line shows “GPU can use …” and “free right now …”.
  5. If it says “Fits, after making room.” The chip says Make room. Under 3 · Make room first, Hedroom lists apps that could give memory back, with Relaunch or Quit and how much each frees. Hedroom never closes anything on its own. Each button asks first, goes through the usual safety checks and writes a receipt. It does not clear caches, because that would not make room for anything.
  6. If it says Won’t fit. Pick a smaller size, fewer bits or a shorter context. Closing apps will not change a model that is over the GPU’s limit.
  7. Raising the limit (Pro, Macs with more than 24 GB). The GPU memory limit tile can raise the limit until you restart, after a warning that says how little is left for macOS. It never offers a limit that leaves macOS under 8 GB. Reset now puts it back, and Hedroom puts it back when it quits, unless you changed it yourself.

What you should see

Example, not real data: you want an 8-billion-parameter model at 4 bits on a 16 GB Mac. By hand, the weights are about 4 GB, plus a context allowance and the runtime. The GPU can use about two-thirds of 16 GB, which is roughly 10.7 GB. It should fit, if your other apps leave the room. The same model at 16 bits needs about 16 GB for weights alone, which is over the GPU’s share, so the answer is Won’t fit, and closing apps will not change it. Hedroom’s check shows the same reasoning with its own numbers.

If Ollama, LM Studio, Jan or GPT4All is running, Hedroom shows it under Found on this Mac and says that “Free right now already counts what they use.”

If it does not work

  • The estimate and my result differ. The estimate can be off by about 15%. The layer and head numbers are typical for a model family, not read from your file.
  • A model that fits still runs slowly. Hedroom does not estimate tokens per second.
  • No higher limit is offered. On Macs with 24 GB or less, the most it would allow is no more than macOS already gives the GPU. The tile says “This Mac needs its memory for macOS, so Hedroom doesn’t offer a higher GPU limit here.”
  • The helper is missing or not approved. The tile says “The helper isn’t approved yet”. See Approve the helper.
  • The default limit is an assumption. It has not yet been checked on every memory size.

Find out what is slowing your Mac, and whether the fix worked.

Monitoring is free, with no card and no account. Pro has a 7-day free trial and a 30-day refund, and you can cancel the trial before it ends. If it cannot show you a measurable difference, do not keep it.