Sunk Cost sunkcost.ai Data checked 2026-09-03

How much memory do you need to run a local LLM?

Two numbers, added together, held at the same time. The weights are a fixed download. The key-value cache grows with the context window you ask for, and on some models it ends up larger than the weights. Llama 3.3 70B Instruct at Q4_K_M is 42.5 GB of weights plus 10.7 GB of cache at 32k context: 53.3 GB in one machine.

What has to fitThe weights, plus a cache the size of your context window. Both at once, in memory the GPU can reach.
Weights at four bitsAbout 0.61 GB per billion parameters. Across the 53 four-bit models here it runs 0.54 GB to 0.81 GB.
Cache at 32k context0.2 GB to 11.8 GB, depending on the model. Architecture decides this, not parameter count.
Llama 3.3 70B Instruct at 32k53.3 GB. The cheapest machine here that holds it is the Strix Halo Framework Desktop, 128GB at $3,449.

Run the numbers on that pairing

Where the cache figure comes from

The weights are whatever the file weighs on disk. The cache is arithmetic. Every token in the context window leaves a key and a value behind in every layer, and all of it stays resident while the model is loaded.

For Llama 3.3 70B Instruct: 2 (a key and a value) × 8 key-value heads × 128 numbers per head × 2 bytes = 4,096 bytes per token, per layer. Over 80 layers that is 327,680 bytes for every token in the window. Fill 32,768 tokens of context and the cache is 10.7 GB.

Two things follow. The window you ask for is a hardware decision, not a setting: on most models the cache grows in step with it, and only the ones with sliding-window layers stop growing partway. And two models of the same size can want very different amounts, because the number of key-value heads and the width of each one are architecture choices.

How much memory for a 7B or 8B model?

13 models on this site are under 10 billion parameters. The weights come to 1.6 GB to 8.5 GB, and at 32k context the cache adds 0.5 GB to 5.4 GB on top. That puts the whole job at 2.2 GB to 12.8 GB of memory at once. The cheapest machine here that runs the hungriest of them, Llama 3.1 8B Instruct at Q8_0, is the Mac mini M6, 24GB at $1,099.

ModelParametersWeightsCache at 32kNeedsCheapest machine that runs it
LFM2.5 2.6BQ4_K_M 2.7B 1.7 GB 0.5 GB 2.2 GB Mac mini M6, 16GB $899 Run the numbers
MiniCPM5 2BQ4_K_M 2.5B 1.6 GB 1.4 GB 3 GB Mac mini M6, 16GB $899 Run the numbers
Qwen3.5 4BQ4_K_M 4.7B 2.7 GB 1.1 GB 3.8 GB Mac mini M6, 16GB $899 Run the numbers
Spark-X2.5 4BQ4_K_M 4.1B 2.6 GB 1.3 GB 3.9 GB Mac mini M6, 16GB $899 Run the numbers
Gemma 4 E4BQAT Q4_0 8B 5.2 GB 0.6 GB 5.7 GB Mac mini M6, 16GB $899 Run the numbers
Ling 3.0 tinyQ4_K_M 7.9B 4.8 GB 1.6 GB 6.4 GB Mac mini M6, 16GB $899 Run the numbers
Qwen3.5 9BQ4_K_M 9.7B 5.7 GB 1.1 GB 6.8 GB Mac mini M6, 16GB $899 Run the numbers
Ornith 1.5 9BQ4_K_M 9.7B 5.8 GB 1.1 GB 6.9 GB Mac mini M6, 16GB $899 Run the numbers
Llama 3.1 8B InstructQ4_K_Molder 8B 4.9 GB 4.3 GB 9.2 GB Mac mini M6, 16GB $899 Run the numbers
Ministral 3 8BQ4_K_M 8.9B 5.2 GB 4.6 GB 9.8 GB Mac mini M6, 16GB $899 Run the numbers
Qwen3 8BQ4_K_Molder 8.2B 5 GB 4.8 GB 9.9 GB Mac mini M6, 16GB $899 Run the numbers
Granite 4.2 8BQ4_K_M 8B 5.3 GB 5.4 GB 10.7 GB Mac mini M6, 24GB $1,099 Run the numbers
Llama 3.1 8B InstructQ8_0older 8B 8.5 GB 4.3 GB 12.8 GB Mac mini M6, 24GB $1,099 Run the numbers

How much memory for a 14B to 32B model?

25 models on this site are between 10 and 40 billion parameters. The weights come to 7.1 GB to 34.8 GB, and at 32k context the cache adds 0.2 GB to 8.6 GB on top. That puts the whole job at 8 GB to 43.4 GB of memory at once. The cheapest machine here that runs the hungriest of them, Qwen3 32B at Q8_0, is the Strix Halo Corsair AI Workstation 300, 64GB at $1,700.

ModelParametersWeightsCache at 32kNeedsCheapest machine that runs it
Gemma 4 12BQ4_K_M 12B 7.1 GB 0.9 GB 8 GB Mac mini M6, 16GB $899 Run the numbers
Gemma 3 12B itQ4_K_Molder 12.2B 7.3 GB 2.5 GB 9.8 GB Mac mini M6, 16GB $899 Run the numbers
gpt-oss-20bMXFP4 20.9B 12.1 GB 0.8 GB 12.9 GB Mac mini M6, 24GB $1,099 Run the numbers
Ministral 3 14BQ4_K_M 14B 8.2 GB 5.4 GB 13.6 GB Mac mini M6, 24GB $1,099 Run the numbers
Qwen3 14BQ4_K_Molder 14.8B 9 GB 5.4 GB 14.4 GB Mac mini M6, 24GB $1,099 Run the numbers
Gemma 4 26B-A4BQ4_K_M 25.2B 16.9 GB 0.9 GB 17.8 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Muse Glimmer 30BQ4_K_M 29.8B 17.3 GB 0.5 GB 17.8 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Qwen3.8 27BQ4_K_M 27.8B 16.5 GB 2.1 GB 18.6 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Qwen3.6 27BQ4_K_M 27.8B 16.8 GB 2.1 GB 19 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Gemma 3 27B itQ4_K_Molder 27.4B 16.6 GB 3.1 GB 19.7 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Mistral Small 3.2 24B InstructQ4_K_Molder 24B 14.3 GB 5.4 GB 19.7 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Devstral Small 2 24BQ4_K_M 24B 14.3 GB 5.4 GB 19.7 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
GLM-4.7-FlashQ4_K_M 31.2B 18.3 GB 1.8 GB 20.1 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Laguna XS 2.1Q4_K_M 33.4B 20.3 GB 1.4 GB 21.7 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Qwen3 30B-A3B Instruct 2507Q4_K_Molder 30.5B 18.6 GB 3.2 GB 21.8 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Qwen3-Coder 30B-A3BQ4_K_M 30.5B 18.6 GB 3.2 GB 21.8 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
KAT-Coder V2.5 Dev 35B-A3BQ4_K_M 34.7B 21.4 GB 0.7 GB 22.1 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Ornith 1.5 35B-A3BQ4_K_M 36B 21.7 GB 0.7 GB 22.4 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Qwen3.6 35B-A3BQ4_K_M 36B 22.1 GB 0.7 GB 22.8 GB Strix Halo Framework Desktop, 32GB $1,269 Run the numbers
Nemotron 3.5 Lightning 30B-A3BQ4_K_M 31.6B 25.5 GB 0.2 GB 25.7 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only Run the numbers
Gemma 4 31B itQ4_K_M 31.3B 19.6 GB 6.2 GB 25.8 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only Run the numbers
Granite 4.2 30BQ4_K_M 29.3B 17.7 GB 8.6 GB 26.3 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only Run the numbers
Qwen3 32BQ4_K_Molder 32.8B 19.8 GB 8.6 GB 28.3 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only Run the numbers
DeepSeek-R1-Distill-Qwen-32BQ4_K_Molder 32.8B 19.9 GB 8.6 GB 28.4 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only Run the numbers
Qwen3 32BQ8_0older 32.8B 34.8 GB 8.6 GB 43.4 GB Strix Halo Corsair AI Workstation 300, 64GB $1,700 Run the numbers

How much memory for a 70B model?

3 models on this site are between 40 and 100 billion parameters. The weights come to 42.5 GB to 48.4 GB, and at 32k context the cache adds 0.8 GB to 10.7 GB on top. That puts the whole job at 49.2 GB to 53.3 GB of memory at once. The cheapest machine here that runs the hungriest of them, Llama 3.3 70B Instruct, is the Strix Halo Framework Desktop, 128GB at $3,449.

ModelParametersWeightsCache at 32kNeedsCheapest machine that runs it
Qwen3-Coder NextQ4_K_M 79.7B 48.4 GB 0.8 GB 49.2 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
DeepSeek-R1-Distill-Llama-70BQ4_K_Molder 70.6B 42.5 GB 10.7 GB 53.3 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Llama 3.3 70B InstructQ4_K_Molder 70.6B 42.5 GB 10.7 GB 53.3 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers

How much memory for a 100B model or larger?

14 models on this site are over 100 billion parameters. The weights come to 63.4 GB to 189 GB, and at 32k context the cache adds 0.2 GB to 11.8 GB on top. That puts the whole job at 64.6 GB to 192.9 GB of memory at once. No machine on this list holds the hungriest of them, Tencent Hy3, which wants 192.9 GB at 32k context. The largest that does fit is GLM-5.3-Flash, on the Mac Studio M5 Ultra, 256GB at $10,799.

ModelParametersWeightsCache at 32kNeedsCheapest machine that runs it
gpt-oss-120bMXFP4 116.8B 63.4 GB 1.2 GB 64.6 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Llama 4 Scout 17B-16EQ4_K_Molder 108.6B 65.4 GB 2.8 GB 68.2 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Mistral Small 4 (119B-2603)Q4_K_M 119.4B 73.8 GB 0.8 GB 74.5 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Qwen3.5 122B-A10BUD-Q4_K_M 125.1B 78.3 GB 0.8 GB 79.1 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
GLM-4.5-AirQ4_K_Molder 110.5B 73 GB 6.2 GB 79.2 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Ling 3.0 flashQ4_K_M 124B 77.8 GB 3.8 GB 81.6 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Devstral 2 123BQ4_K_M 125B 74.9 GB 11.8 GB 86.7 GB Strix Halo Framework Desktop, 128GB $3,449 Run the numbers
Qwen3.8 Flash NextQ4_K_M 180B 119.6 GB 0.9 GB 120.5 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
Qwen3 235B-A22B Instruct 2507Q4_K_Molder 235.1B 142.2 GB 6.3 GB 148.5 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
MiniMax M2.7Q4_K_M 228.7B 140.2 GB 8.3 GB 148.5 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
DeepSeek V4-FlashUD-Q4_K_M 284B 155.1 GB 0.2 GB 155.3 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
Inkling SmallUD-Q4_K_M 266B 162.5 GB 1 GB 163.6 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
GLM-5.3-FlashUD-Q4_K_M 321.3B 189 GB 0.6 GB 189.5 GB Mac Studio M5 Ultra, 256GB $10,799 Run the numbers
Tencent Hy3Q4_K_M 295B 182.2 GB 10.7 GB 192.9 GB nothing on this list

Context is the part people miss

A longer window costs memory before it costs anything else. Here is how many of the 39 current models fit three machines as the window grows, counting a model only where its own context ceiling allows it.

ContextFramework Desktop, 32GB24 GB usableCorsair AI Workstation 300, 64GB48 GB usableFramework Desktop, 128GB96 GB usable
4k 262733
8k 262733
16k 262733
32k default 242733
64k 222732
128k 132632

That is a shopping list, not a setting. Llama 3.3 70B Instruct needs 45.2 GB at 8k context, which the Strix Halo Corsair AI Workstation 300, 64GB at $1,700 holds. At 32k it needs 53.3 GB, and the cheapest machine that holds it becomes the Strix Halo Framework Desktop, 128GB at $3,449.

Size is a poor guide to the cache. Two models here have the same 125 billion parameters: at 128k context Devstral 2 123B wants 47.2 GB of cache and Qwen3.5 122B-A10B wants 3.2 GB. Each model's page carries its own figure.

You can also make the cache smaller. llama.cpp keeps the key-value cache at 16 bits unless you pass --cache-type-k and --cache-type-v. q8_0 stores 32 values in 34 bytes and q4_0 in 18, so the cache shrinks to about a half or about a quarter. Every generated token reads the whole cache, so a smaller one also speeds up long contexts. Both are lossy; 4-bit loses more. (source) The calculator has that switch, and every figure on this page is at the 16-bit default.

Installed memory is not usable memory

The number on the box is not the number a model gets. The system takes a share, and on a machine with unified memory the GPU is only allowed to address part of the rest. This is what each machine can actually hand a model, cheapest machine shown at each level, counted against the 39 current models.

UsableInstalledCheapest machine at that levelModels that fit at 32kStrongest of them
10.5 GB 16 GB Mac mini M6, 16GB $899 10 Gemma 4 12B Below every hosted tier
16 GB 24 GB Mac mini M6, 24GB $1,099 13 Gemma 4 12B Below every hosted tier
21 GB 32 GB Mac mini M6, 32GB $1,299 19 Qwen3.8 27B Sonnet-class
24 GB 32 GB Strix Halo Framework Desktop, 32GB $1,269 24 Qwen3.8 27B Sonnet-class
27 GB 36 GB Mac Studio M5 Max, 36GB $2,499 27 Qwen3.8 27B Sonnet-class
31 GB 32 GB AMD Radeon AI PRO R9700, 32GB $1,299, card only 27 Qwen3.8 27B Sonnet-class
36 GB 48 GB Mac mini M5 Pro, 48GB $2,299 27 Qwen3.8 27B Sonnet-class
48 GB 64 GB Strix Halo Corsair AI Workstation 300, 64GB $1,700 27 Qwen3.8 27B Sonnet-class
72 GB 96 GB Mac Studio M5 Ultra, 96GB $5,499 29 Qwen3.8 27B Sonnet-class
95 GB 96 GB NVIDIA RTX PRO 6000 Blackwell, 96GB $18,000, card only 33 Qwen3.8 27B Sonnet-class
96 GB 128 GB Strix Halo Framework Desktop, 128GB $3,449 33 Qwen3.8 27B Sonnet-class
119.5 GB 128 GB DGX Spark GB10 Grace Blackwell, 128GB $4,699 33 Qwen3.8 27B Sonnet-class
192 GB 256 GB Mac Studio M5 Ultra, 256GB $10,799 38 GLM-5.3-Flash Sonnet-class

Read the last column before you spend anything. From 21 GB of usable memory up to 119.5 GB, the strongest model on this list does not change: it is Qwen3.8 27B the whole way. More memory across that stretch buys more models, more context and more room to work, not a cleverer one. The next step up is GLM-5.3-Flash, and the cheapest machine that holds it is the Mac Studio M5 Ultra, 256GB at $10,799.

Every figure is at 32k context unless the row says otherwise, with the cache at 16 bits, at the quantisation named against each model. Weights are the published file sizes on each model's page; the cache is worked out from the architecture recorded there. Machines are the current ones at list price, with the memory their maker publishes and the usable share on each machine's page; graphics cards are priced as the card alone, so add the PC around one before comparing one with a complete computer. The tables by size cover all 55 models listed here, superseded ones included and marked, because people still run them. The two tables of what a machine holds count the 39 current ones instead, which is what every machine page and the calculator count. To change the context, the quantisation or the cache type, open the calculator.