Unified memory workbench

Mac LLM RAM Calculator

Pick a model, quantization and context to see how much unified memory your Mac needs for a local LLM, including KV cache and headroom for macOS.

Step 1

What do you want to run locally?

Pick a task. The calculator sets a fitting model and text length.

Step 2 · Model and text length

Fine-tuning Quantization, runtime, KV cache, sessions, reserve. The defaults suit most people.
Quantization How strongly the weights are compressed. Q4_K_M is the usual trade-off: about a quarter of the original size with little quality loss. Q8_0 is nearly lossless but needs almost twice the memory.
Runtime The program that runs the model. Each runtime uses some memory of its own. MLX is Apple's own framework and is often the fastest on a Mac.
KV cache precision The KV cache is the short-term memory for the text so far. F16 is the default. Q8_0 roughly halves it, but has to be switched on in the runtime.

Matching Macs

Only show this chip generation Only filters the Mac suggestions. The calculated memory need stays the same.

Memory breakdown

18.3 GB
Model weights The actual model data. All of it stays in memory, even for MoE models where only part of it computes each token.
7.3 GB
KV cache Grows with context length and the number of sessions. In hybrid models such as Gemma 4 or Qwen 3.6 it grows much more slowly.
1.0 GB
Runtime & work buffers Work buffers of the runtime for intermediate results, roughly 0.5 to 2.4 GB depending on the program.
0.6 GB
macOS & apps Your chosen reserve for macOS and apps.
12.0 GB
Free headroom Room up to the recommended memory size. It keeps usage below 85 %.
3.7 GB
Calculated need
20.3 GB

Memory fit, not a speed promise: bandwidth and prompt length also determine performance.

How the calculation works

Unified memory estimate: Model weights + KV cache + runtime/work buffers + optional extra parts (vision, n-gram table) + your app reserve. “Does not fit” only appears when this physical demand exceeds available memory. Recommendations target no more than 85% memory utilization.

Current KV reference profile: 48L · 8 KV-Heads · 128d

Estimate, not a benchmark: memory fit is not a speed promise. Prompt length, runtime version, model format, and image count change real demand. Quantized KV cache usually has to be enabled explicitly.

Methodology & primary sources: llama.cpp GGUF, llama.cpp KV-Cache, Gemma 4, Qwen 3.6, Qwen 3.8, Qwen 3.5, Muse Glimmer, gpt-oss, Qwen 2.5, Llama 3.1. Interaction model checked against APXML.

Short answer

How much RAM does a local LLM need on a Mac?

A local LLM on a Mac needs its quantized weights plus KV cache, runtime buffers and room for macOS. As a rule of thumb at 4-bit (Q4) and 8K context: 16GB of unified memory runs 7B–8B models, 24–32GB covers 12B–32B, 64GB is the first practical tier for 70B, and 96–128GB adds room for higher precision and long context.

Unified memory by model size at Q4_K_M and about 8K context
Model sizeQ4 weightsMinimumComfortable
3B–4B ≈ 2–3 GB 8 GB 16 GB
7B–8B ≈ 5 GB 16 GB 24 GB
12B–14B ≈ 8–9 GB 16 GB 24–32 GB
27B–32B ≈ 17–20 GB 32 GB 48 GB
70B ≈ 43 GB 64 GB 96–128 GB
100B–120B ≈ 60–70 GB 96 GB 128 GB
405B ≈ 249 GB 512 GB 512 GB

Weights follow llama.cpp’s Q4_K_M examples (8B ≈ 4.9GB, 70B ≈ 43.1GB, 405B ≈ 249.1GB); minimum and comfortable include KV cache, runtime and macOS. Open the RAM guide · Last reviewed:

Model table

RAM needed for popular local models in 2026

Computed with the same model as the calculator above: Q4_K_M, Ollama, F16 KV cache, one session. "Tight" means 8K context with 5GB for macOS and a few apps. "Comfortable" means 32K context with an 8GB reserve and at most 85% memory use. Ollama's download files are often 1–4GB larger than the pure Q4 weights because embeddings and vision towers stay at higher precision; the comfortable column leaves room for that. gpt-oss ships in MXFP4; for the 120B the Q4 estimate sits a few GB above Ollama's 65GB file, so it errs on the safe side.

ModelReleasedQ4 weightsKV cache 8KKV cache 32KTight fitComfortableArchitecture
Qwen 3.5 9B 5.1GB 0.3GB 1.0GB 16GB 24GB Gated DeltaNet + attention, vision
Granite 4.2 8B 5.1GB 1.3GB 5.0GB 16GB 24GB full attention, text only
Gemma 4 12B 6.8GB 0.4GB 0.6GB 16GB 24GB hybrid attention, vision
gpt-oss 20B (MoE) 11.9GB 0.2GB 0.8GB 24GB 32GB MoE, 3.6B active, text only
Gemma 4 26B A4B (MoE) 14.8GB 0.3GB 0.5GB 24GB 32GB MoE, 4B active, all 26B resident
Qwen 3.8 27B 15.4GB 0.6GB 2.1GB 24GB 36GB Gated DeltaNet + attention, vision
Muse Glimmer 30B 16.0GB 0.2GB 0.5GB 24GB 32GB sliding window + global, vision
Qwen3 Coder 30B A3B (MoE) 17.4GB 0.8GB 3.0GB 24GB 36GB MoE, 3.3B active, coding, text only
Granite 4.2 30B 16.5GB 2.0GB 8.0GB 32GB 48GB full attention, text only
Gemma 4 31B 17.5GB 1.1GB 2.0GB 32GB 48GB hybrid attention, vision
Qwen 3.6 35B A3B (MoE) 19.9GB 0.2GB 0.7GB 32GB 48GB MoE, 3B active, Gated DeltaNet
Llama 3.1 70B 39.9GB 2.5GB 10.0GB 64GB 96GB full attention
gpt-oss 120B (MoE) 66.6GB 0.3GB 1.1GB 96GB 96GB MoE, 5.1B active, text only
Qwen 3.8 Flash Next 125B A6B (MoE) 42.2GB 0.3GB 0.9GB 128GB 128GB MoE, 6B active, 51B n-gram table, vision
GLM-5.3-Flash 320B A18B (MoE) 182.3GB 0.2GB 0.7GB 192GB 256GB MoE, 18B active, linear + sparse attention, vision

The math

Worked example: Qwen 3.8 27B with 32K context

Model weights (Q4_K_M)
15.4GB
KV cache and DeltaNet state
+ 2.1GB
Runtime and work buffers
+ 0.8GB
Vision & extra parts
+ 1.1GB
Reserve for macOS and apps
+ 8.0GB
Calculated need
= 27.4GB

It fits from 32GB. It stays under 85% memory use only from 36GB; on a 24GB Mac it needs less context and a leaner reserve.

KV-Cache

Why architecture matters as much as size

Full-attention models store keys and values for every token in every layer. Gemma 4 and Muse Glimmer mostly use sliding-window layers and Qwen 3.6 and 3.8 mostly use Gated DeltaNet layers with a fixed-size state, so their cache grows far more slowly with context:

ModelKV cache at 32KKV cache at 128K
Llama 3.1 70B 10.0GB 40.0GB
Mistral Small 24B 5.0GB not supported
Gemma 4 31B 2.0GB 5.8GB
Muse Glimmer 30B 0.5GB 1.7GB
Qwen 3.8 27B 2.1GB 8.1GB

In practice

How to fit a bigger model

  1. Drop one quantization step

    Q4_K_M instead of Q6_K or Q8_0 cuts the weights by roughly a quarter to a half. Below Q4, quality losses become noticeable for most models.

  2. Ask for less context

    Only load the context you use. With full-attention models such as Llama 3.1 70B, going from 128K to 32K saves tens of gigabytes of KV cache.

  3. Quantize the KV cache

    Q8_0 KV cache roughly halves cache memory with little quality loss. In Ollama it needs flash attention and OLLAMA_KV_CACHE_TYPE; llama.cpp and LM Studio have their own switches.

  4. Pick a hybrid or MoE model

    Gemma 4, Qwen 3.6/3.8 and Muse Glimmer keep most layers on a small fixed or windowed cache. MoE models are fast for their size, but all experts still have to sit in memory.

  5. Close memory-heavy apps

    Browsers with many tabs, Docker and Xcode can easily hold 6–10GB. Watch memory pressure in Activity Monitor: yellow or red means the model is pushing macOS into swap.

Generation atlas

Every Apple silicon generation from M1 through M6

The finder covers every Apple silicon chip family in the catalog, from M1 through M6, and separates current from used options.

M1 M1 · Pro · Max · Ultra Used & refurbished
M2 M2 · Pro · Max · Ultra Used & refurbished
M3 M3 · Pro · Max · Ultra Up to 512GB in Mac Studio
M4 M4 · Pro · Max No M4 Ultra was released
M5 M5 · Pro · Max · Ultra MacBooks, Mac mini and Mac Studio, up to 512GB
M6 M6 New in Mac mini, up to 32GB

Workflow finder

Choose by task

The best Mac depends on more than the model: code, long documents, speech, and image workflows stress memory differently.

FAQ

RAM calculator FAQ

How much RAM do I need to run a local LLM on a Mac?

At 4-bit quantization and moderate context, plan 16GB of unified memory for 7B–8B models, 24–32GB for 12B–32B, 64GB for 70B and 96–128GB for 70B at higher precision or 100B+ models. Longer context and parallel sessions add KV cache on top.

Is 16GB of unified memory enough for Ollama or LM Studio?

Yes for 7B–8B models at Q4/Q5 with short to moderate context. 12B–14B models start but leave little room for a browser and IDE, so 24GB is the more comfortable entry point.

Can a Mac run a 70B model?

Yes. A 70B Q4_K_M file is about 43GB according to llama.cpp, so 64GB is the first practical tier with short context. 96GB or 128GB leaves room for longer context, higher-bit quantization and other apps.

Does unified memory work like VRAM?

Partly. On Apple silicon the CPU and GPU share one memory pool, so the GPU can address far more memory than a typical consumer graphics card. The same pool is also used by macOS and every open app, which is why the calculator keeps a reserve.

Which new local models fit which Mac (October 2026)?

At Q4 with Ollama: 16GB runs Qwen 3.5 9B and Gemma 4 12B. 24GB runs gpt-oss 20B, and Qwen 3.8 27B (August 2026) or Meta Muse Glimmer 30B (August 2026) only at short context; 32–36GB gives those two 32K context. gpt-oss 120B needs 96GB or more. Model list checked on Hugging Face and the Ollama library on 4 October 2026.

Do MoE models like Gemma 4 26B A4B or Qwen 3.6 35B A3B need less RAM?

No. Only 3B–4B parameters are active per token, which makes them fast, but every expert has to stay in memory. Plan RAM for the full 26B or 35B weights; their small KV cache is the real saving at long context.

Can an 8GB Mac run a local LLM?

Only small models. 1B–4B text models at Q4, such as Llama 3.2 3B or Qwen3 4B, run with short context, because macOS itself needs several gigabytes. Multimodal models like Gemma 4 E4B already ship as files of about 10GB in Ollama. For regular local AI, 16GB is the practical minimum.

Does MLX use less memory than Ollama or LM Studio?

Not fundamentally. All of them load quantized weights, a KV cache and some runtime buffers into the same unified memory. Differences come from the quantization format and default context, so compare at the same bit width and context length.

How accurate is this calculator?

It is an estimate, not a benchmark. It adds model weights, KV cache, runtime buffers, optional extra parts such as vision or an n-gram table and your app reserve, and targets at most 85% memory use. Runtime version, model format and prompt length change the real figure.