Free fit check

On an Apple Silicon Mac, memory is shared: enter 0 for GPU memory and your total memory as RAM, and keep a generous amount free. The free check covers three popular models; the full version covers all eight.

How the math works

weights = parameters × bits per weight ÷ 8

KV cache = 2 × layers × KV heads × head size × bytes per value × tokens

total = weights + KV cache + your runtime allowance

These are estimates from published numbers. Real use varies with the runtime, drivers, batch size and how the file was made. They don't predict speed.

Why I made this

I'm Iggy, a software builder. Every time I tried a new local model I did this arithmetic on a napkin, and I usually forgot the KV cache until it ran out of memory at a long prompt. So I wrote the napkin down and put the sources next to it.