How much RAM do I need for a local LLM? Table by model size

On a mini PC or Mac with shared memory, the GPU can only use part of the total RAM. The table runs from model size to the RAM you should plan, using the GPU-usable share from our device catalog, the file size of a common Ollama tag (4-bit, checked on ollama.com on October 25, 2026) and the LLMBOX planning reserve of about 3 GB for an 8K context and the runtime. It is a pre-selection, not a measurement.

Model size, file size, memory in use and RAM to plan, one user, 8K context
Model sizeExample (Ollama tag)File (4-bit)In useRAM to planCatalog devices that fit
7B–8BLlama 3.1 8Bllama3.1:8b4.9 GBabout 8 GB16 GB (8–12 GB GPU-usable)Boxes under €1,000
14BQwen3 14Bqwen3:14b9.3 GBabout 12 GB32 GB (16–24 GB GPU-usable)Best mini PCs for local AI
32BQwen3 32Bqwen3:32b20 GBabout 23 GB32 GB only with 24 GB GPU-usable, otherwise 64 GBDevices that fit 32B
70BLlama 3.3 70Bllama3.3:70b43 GBabout 46 GB64 GB (about 48 GB GPU-usable, tight); 96 GB for 32K context (about 50 GB)Devices for 70B models
120Bgpt-oss 120Bgpt-oss:120b65 GBabout 68 GB96 GB, only with 72 GB GPU-usableDevices that fit 120B
122BQwen3.5 122Bqwen3.5:122b81 GBabout 84 GB128 GB (96–110 GB GPU-usable)Devices that fit 122B

With a dedicated graphics card, read the VRAM instead of the RAM: a card with 8 GB VRAM lands in the 8B row. Longer contexts or several users move you one row down. Whether 64 or 128 GB is worth it on the same box is shown in EVO-X2 64 GB vs 128 GB. For your own model and context, the VRAM calculator does the same calculation; typical setups for chat and coding are on the use-case pages.

How much RAM do I need? Start from the RAM you have, 16 to 128 GB

On a mini PC or Mac with shared memory the GPU can use only part of the RAM. For each RAM size in our device catalog, the table shows the memory the catalog gives the GPU and the largest model of the size table above that fits at an 8K context with the same planning reserve. It is a pre-selection, not a measurement.

RAM size, GPU-usable memory and largest model that fits at 8K context, one user
RAMGPU-usable in the catalogLargest model that fits (8K context)Devices
16 GB8–12 GB7B–8B (Llama 3.1 8B)5 catalog devices
24 GB18 GB14B (Qwen3 14B)2 catalog devices
32 GB16–24 GB14B with 16 GB usable, 32B with 24 GB usable7 catalog devices
36 GB27 GB32B (Qwen3 32B)1 catalog device
64 GB48 GB70B (Llama 3.3 70B)2 catalog devices
96 GB64–72 GB70B with 64 GB usable, 120B with 72 GB usable2 catalog devices
128 GB96–110 GB122B (Qwen3.5 122B-A10B)9 catalog devices

Read it from the left: 16 GB is the entry for 7B–8B, 32 GB covers 14B and only reaches 32B when the GPU can use 24 GB of it, 64 GB is the entry for 70B (tight) and 128 GB holds the 120B class. Below 16 GB the catalog has no device, so no row.

How much RAM do I need for a 70B model?

A 70B model at 4-bit needs about 46 GB of memory in use at an 8K context: the Llama 3.3 70B file on Ollama is 43 GB, plus about 3 GB for context and runtime. On a Mac or mini PC with shared memory, where the GPU can use roughly 48 GB of 64 GB, that is tight, so plan 64 GB as the minimum and 96 GB if you want a 32K context (about 50 GB).

With a dedicated graphics card the number that counts is VRAM, not system RAM, and a single 24 GB card cannot hold the 43 GB file. The catalog devices that fit are ranked in devices for 70B models; to try another context or several users, use the configurator with Llama 3.3 70B preselected.

Does a longer context need more RAM? The exact cache for five models

Yes, and at long contexts the cache can grow as large as the model file. For DeepSeek R1 70B the KV cache is 2.68 GB at 8K, 10.74 GB at 32K and 42.95 GB at 128K tokens, next to a file of 43 GB.

File size and exact KV cache (f16) per context length, one user
ModelFile (4-bit)Cache at 8KCache at 32KCache at 128KFile + cache at 128K
DeepSeek R1 8B
config.json
5.2 GB1.21 GB4.83 GB19.33 GB24.5 GB
DeepSeek R1 14B
config.json
9 GB1.61 GB6.44 GB25.77 GB34.8 GB
DeepSeek R1 32B
config.json
20 GB2.15 GB8.59 GB34.36 GB54.4 GB
DeepSeek R1 70B
config.json
43 GB2.68 GB10.74 GB42.95 GB86 GB
Qwen3-Coder 30B
config.json
19 GB0.81 GB3.22 GB12.88 GB31.9 GB

Which box holds it?

DeepSeek R1 70B at 32K: 43 GB file + 10.74 GB cache = about 54 GB. These boxes in stock hold it, cheapest first.

Prices include VAT, as of Nov 30, 2026. Each box shows its cheapest offer including shipping; only shops with an affiliate program are listed. For purchases through “Ad” links we earn a commission; your price stays the same.

The cache is computed from layers, KV heads and head size in each model’s own config.json (linked in the first column, pinned revision, checked 9 November 2026) with the default f16 cache type and counts the cache only, without runtime and operating system. The device lists and hubs on this site plan the larger of two values: a flat reserve per context (3 GB at 8K, 7 GB at 32K, 18 GB at 128K) or this exact cache. For the dense DeepSeek models the exact cache is larger at 32K (32B and 70B) and at 128K (all four), so their planning figure is the last column. For the mixture-of-experts coder the flat reserve is larger than its cache, so the lists plan 37 GB for it at 128K, not the 31.9 GB of the table. The same figures for 47 models are in the memory table and its CSV; halving the cache with q8_0 is covered below.

Gemma 4: what the layers cost

Gemma 4 mixes two kinds of attention layers, and they cost very different amounts of cache. A few global layers keep every token of the context. Many sliding-window layers keep only their window plus the 512-token batch llama.cpp adds, padded to 256 cells: at most 1,536 cells however long the context. The table lists these inputs from each model’s own config.json, so every figure can be recomputed. Assumption: f16 cache (2 bytes per value), one sequence, llama.cpp defaults.

Gemma 4 KV cache (f16) by layer type, one sequence
ModelGlobal layers × KV heads × head dimSliding layers × KV heads × head dimWindowCache at 8KCache at 32KCache at 128K
Gemma 4 12B
config.json
config.json checked Nov 9, 2026
8 × 1 × 51240 × 8 × 2561,0240.64 GB1.04 GB2.65 GB
Gemma 4 31B
config.json
config.json checked Nov 9, 2026
10 × 4 × 51250 × 16 × 2561,0241.93 GB3.94 GB12 GB

Per layer group: 2 (K and V) × layers × KV heads × head dim × 2 bytes × cells. Global layers count every token of the context, sliding layers count the smaller of the context and 1,536 cells. Example, Gemma 4 12B at 128K: 2.15 GB global plus 0.5 GB sliding is 2.65 GB.

Public calculators show other figures for the same models. The context window calculator of wideareaai.com, read on Nov 10, 2026 with Q4_K_M weights, an FP16 cache and one parallel slot, shows Gemma 4 12B at 0.8, 2.3 and 8.3 GB and Gemma 4 31B at 2.0, 5.8 and 20.8 GB at 8K, 32K and 128K. Both sets of numbers are on this page with the inputs of ours above; compare them with the inputs of any calculator.

Cite this table: the figures are the rows gemma4-12b and gemma4-31b of models.csv (also as JSON), licence CC BY 4.0. Cite as: LLMBOX, local LLM memory table, Nov 9, 2026, https://llmbox.store/data/2026-11-09/models.csv. A single row links as /blog/llm-ram-requirements/#gemma4-12b or #gemma4-31b.

Which devices hold them: the Gemma 4 hardware guide lists every size with the catalog devices that fit, or open the configurator with Gemma 4 12B or with Gemma 4 31B.

With a dedicated graphics card: how much system RAM on top of the VRAM?

System RAM only has to hold what does not fit in the VRAM, plus your operating system. A 70B model needs about 46 GB in use at an 8K context (table above), so on a 24 GB card about 22 GB land in system RAM: plan 32 GB of RAM as the minimum, and 64 GB if you want room for the operating system and other programs.

According to the Ollama FAQ, ollama ps shows such a split as, for example, “48%/52% CPU/GPU”. A split model reads part of its weights from slower system memory for every token, so it decodes slower than the same model fully on the GPU; the bandwidth rule against 25 measurements shows how memory bandwidth sets that limit. LLMBOX publishes no speed figure for split setups. To see which devices hold the model entirely in GPU-usable memory, use the configurator with Llama 3.3 70B or the VRAM calculator.

RAM by model family: the five hardware guides

Each guide lists every size of one model line with its memory need and the catalog devices that fit:

The first calculation: parameters × bits

A model with eight billion parameters at four bits per weight needs roughly four billion bytes for the weights alone: 8 billion × 4 ÷ 8. That is 4 GB in decimal notation. This back-of-the-envelope figure says nothing about the final download size or the actual memory the model needs. Quantization blocks, scaling values and other tensors come on top. A specific Ollama tag is therefore a better starting point than the parameter count in the model name.

Quantization stores weights at lower precision. That reduces the space needed; the output can change. Whether that trade-off works for you is something you check with your own tasks. A model that only just starts when heavily compressed is not automatically a better choice than a smaller variant with enough headroom. Our model overview separates models and sizes so you can make this decision before buying hardware.

RAM isn’t automatically GPU memory

With a dedicated graphics card, system memory and VRAM are separate. A PC with 32 GB of RAM and a graphics card with 8 GB of VRAM therefore does not have a shared 40 GB pool for the GPU. With shared memory, the CPU and integrated GPU access the same physical memory. The operating system, drivers and other programs claim part of it as well.

How much of it the runtime can actually use depends on the device and the software. So buy based on the specific memory variant and the documented backend. A general label like “AI PC” does not answer this question. Plenty of free SSD space does not replace enough fast working memory, either. Swapping to the SSD may let a model start and still make it unusably slow to use.

Context needs its own space

Context includes your input, earlier messages, system instructions and room for the answer. In many transformer models, a KV cache holds information about tokens that have already been processed. How much it needs depends on architecture, context length, data type and parallelism, among other things. A blanket figure like “one gigabyte per thousand words” would therefore be misleading.

Ollama explicitly points out that longer contexts need more memory. The maximum value on a model card is no promise that it is usable on your mini PC. Start with a manageable context and test the longest conversation you actually need. For document search it is often better to feed in the relevant passages selectively than to pack every document into every request. That retrieval also needs its own application; simply loading a chat model does not set it up.

Default context depends on VRAM

According to the official Ollama documentation (checked on November 9, 2026), the default context depends on available VRAM: below 24 GiB it is 4k tokens, from 24 GiB up to 48 GiB it is 32k tokens, and from 48 GiB it is 256k tokens. For web search, agents and coding tools, the page recommends at least 64,000 tokens. That is a guideline from the vendor’s documentation, not an LLMBOX measurement.

Two consequences for your planning: a device with less than 24 GiB of VRAM starts with the small context at first. If you raise it, the documentation says you need more memory, so check beforehand that enough is free. The documentation does not say how Ollama determines the “VRAM” value for these tiers with shared memory (unified memory or integrated graphics). So watch the actual number in operation.

You can change the value in the Ollama app settings with the context slider, or when starting the server with OLLAMA_CONTEXT_LENGTH, for example OLLAMA_CONTEXT_LENGTH=64000 ollama serve. The CONTEXT column in the output of ollama ps shows which value the loaded model is actually running with.

Parallelism, loaded models and waiting time

The Ollama FAQ gives a simple scaling rule: the memory required grows with OLLAMA_NUM_PARALLEL × OLLAMA_CONTEXT_LENGTH. Its example: a 2K context with four parallel requests becomes 8K, and additional memory is reserved for it. The FAQ gives 1 as the default for parallel requests per model.

In addition, models stay in memory for five minutes after the last request by default (OLLAMA_KEEP_ALIVE). Several models at once are possible as long as they fit in memory; the default is three times the number of GPUs, or three for CPU-only runs. On a GPU, new models have to fit entirely in VRAM to be loaded in addition. Otherwise requests wait until another model is unloaded. This behavior explains why a second chat suddenly waits longer when memory is tight. It says nothing about concrete response times.

A smaller KV cache costs accuracy

The Ollama FAQ describes quantizing the KV cache via OLLAMA_KV_CACHE_TYPE. The default is f16. According to the documentation, the q8_0 type needs about half as much memory with little loss of quality, and q4_0 about a quarter with a small to medium loss of accuracy that can be more noticeable at larger contexts. The quantization takes effect when Flash Attention is active; Ollama uses it automatically if the backend and device support it. The setting applies to all models.

Treat this as an adjustment for tight configurations: check model size and context first, then change the cache type and compare using your own tasks. The proportions mentioned are vendor figures, and according to the FAQ, models with a high GQA count can be affected more.

We measured the memory side. On our M5 the q8_0 cache grew 45 to 51 percent as fast as the f16 calculation, four dense models, 10 Nov 2026. The table shows the step from an 8K to a 32K window: the memory Ollama reported on a MacBook Pro M5 with 24 GB (Ollama 0.33.0, flash attention on, KV cache set to q8_0) against the f16 cache growth computed from each model’s config.json. For Qwen2.5-Coder 14B that is 2.47 GB measured against 4.83 GB computed.

Memory growth from an 8K to a 32K window, MacBook Pro M5 with 24 GB
ModelComputed with f16Measured with q8_0Share
Qwen2.5-Coder 7B1.41 GB0.63 GB45 %
Qwen2.5-Coder 14B4.83 GB2.47 GB51 %
DeepSeek R1 8B3.62 GB1.84 GB51 %
DeepSeek R1 14B4.83 GB2.15 GB45 %

Two runs per window, rounded to 0.01 GB, so read it as “about half”, not as a constant. q8_0 stores 8.5 bits per value against 16, which predicts 53 percent. gpt-oss, Qwen3.5 and Gemma 4 are not in the table: they use sliding-window or hybrid layers, and the memory of the first two did not grow with the window (for Gemma 4 see the layer table above). Our runs measured memory only. The quality loss the Ollama FAQ describes was not part of them, so compare answers on your own tasks. The runs are on the LLMBOX Bench page, which names both changed settings.

How much RAM to run an LLM locally: a worked example without false precision

Suppose your specific model file takes up 5 GB. For a first attempt you reserve another 3 GB for context and runtime. Then you plan for 8 GB of model operation; the memory for the operating system and other apps comes on top. The 3 GB is a freely chosen planning reserve, not a measured value for this model. A doubled context length or several users can change this plan.

So note four values: file size of the chosen tag, desired context, concurrent requests and measured usage in your trial. If memory is short, adjust model size, context or parallelism first. If you want to keep several models ready at once, account for their combined usage. With mixture-of-experts models, a small number of active parameters does not mean that only those weights need to be stored.

How to check your choice

Start the model and run ollama ps in a second terminal. According to the Ollama FAQ, the PROCESSOR column shows whether the model sits on the GPU (“100% GPU”), in system memory (“100% CPU”) or split (“48%/52% CPU/GPU”); the CONTEXT column shows the active context. Also watch your operating system’s memory display. Check a short chat first, then your longest usual input, and only then parallel requests. Keep the model tag, context and runtime version the same for a fair comparison.

A configuration only really fits once answer quality and waiting time are good enough for your task. Check the first start after unloading separately from another answer in an already loaded model. Download, loading and the actual text generation are different waits. The LLMBOX calculation is a pre-selection with disclosed assumptions, not a hardware benchmark. The methodology explains this limit; the setup guide walks you through the first local test. Use hardware you already have for this trial before buying reserve on suspicion.

Frequently asked questions

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

As a rough guide for 4-bit models with an 8K context: 16 GB of RAM for 7B–8B, 32 GB for 14B (32B only if the GPU can use about 24 GB), 64 GB for 70B and 128 GB for the 120B class. For a specific model, start from the file size of its Ollama tag, add a reserve for context and runtime, and leave room for the operating system.

How much RAM do I need for a 70B model?

About 46 GB in use at 4-bit and an 8K context: the Llama 3.3 70B file is 43 GB plus about 3 GB for context and runtime. On a Mac or mini PC with shared memory, plan 64 GB as the minimum (tight) and 96 GB for a 32K context. With a dedicated graphics card the VRAM counts, and one 24 GB card cannot hold the file.

What is the default context length in Ollama?

According to the official Ollama documentation (checked on November 9, 2026) it depends on VRAM: 4k tokens below 24 GiB, 32k from 24 to 48 GiB and 256k from 48 GiB. For web search, agents and coding tools it recommends at least 64,000 tokens.

Can I shrink the KV cache in Ollama?

Yes, with OLLAMA_KV_CACHE_TYPE. The default is f16; per the documentation q8_0 needs about half the memory with little quality loss and q4_0 about a quarter with a small to medium accuracy loss. It takes effect when Flash Attention is active. On our M5 the q8_0 cache grew 45 to 51 percent as fast as the f16 calculation, four dense models, 10 Nov 2026. That is memory only; answer quality was not part of our runs.

Is 16 GB of RAM enough for a local LLM?

Yes for 7B–8B: Llama 3.1 8B needs about 7.9 GB in use at an 8K context, and the catalog’s 16 GB devices give the GPU 8 to 12 GB. It is not enough for 14B: Qwen3 14B needs 12.3 GB, more than the 12 GB the catalog gives a 16 GB device at most.

Is 32 GB of RAM enough for a local LLM?

For 14B yes (Qwen3 14B needs 12.3 GB). For 32B only if the GPU can use 24 GB (Qwen3 32B needs 23 GB); the catalog has 32 GB devices with 16 and with 24 GB GPU-usable. For 70B (46 GB) 32 GB is not enough.

Does a longer context need more RAM?

Yes. For DeepSeek R1 70B the KV cache grows from 2.68 GB at 8K to 10.74 GB at 32K and 42.95 GB at 128K tokens, next to a file of 43 GB (computed from the model’s config.json, f16 cache). Per the Ollama documentation, OLLAMA_KV_CACHE_TYPE=q8_0 halves the cache with a very small loss in precision.

How much system RAM do I need with a dedicated graphics card?

Only what does not fit in the VRAM, plus the operating system. A 70B model needs about 46 GB in use at an 8K context; on a 24 GB card about 22 GB land in system RAM, so plan at least 32 GB of RAM. A split model runs slower than one that fits entirely on the GPU.

Sources & context

Official sources, checked on November 10, 2026. Technical details and model tags can change. This guide is an editorial assessment; it contains no hardware measurements of our own.

How LLMBOX assesses memory, prices and speed is explained in the Methodology. Found a mistake? Send us the exact passage and your source.