Skip to content
AI Gear Compass

How much memory do you need for local AI?

Updated November 29, 2026 · Maria Rodriguez

Illustrative memory budget for an 8B four-bit model, showing weights, cache, workspace and headroom.
Image: AI Gear Compass. Original planning diagram; not measured performance.

Choose memory around a concrete workload: the model weights, the conversation state and the software that will run them. This guide explains the arithmetic behind our hardware finder and shows where a simple estimate can mislead.

Key takeaways

  • Weight size is a lower bound, not total runtime memory.
  • Context length and model architecture change KV-cache requirements.
  • A memory match does not establish backend compatibility or inference speed.

Memory is several budgets, not one number

The first number to separate is storage. A model file stays on an SSD when it is not loaded. Working memory holds the data needed during execution. System RAM, dedicated graphics memory and shared unified memory describe different arrangements; they are not interchangeable simply because a listing uses the same unit. A machine with 32 GB system RAM and an 8 GB graphics card does not present one 40 GB GPU allocation. Software may divide work between them, but the placement and transfer behavior become part of the workload.

Next separate weights from the live state of a conversation. Model weights are largely fixed for a chosen artifact. The key-value cache grows with the amount of retained context and the number of simultaneous sequences, subject to the architecture and cache strategy. The runtime also needs workspace. A calculation based only on parameter count is useful as a first lower bound, but it should never be presented as the complete purchase requirement.

As an Amazon Associate I earn from qualifying purchases.

Check price on Amazon

Calculate raw weight storage

For a dense model, begin with parameters multiplied by bits per parameter, divided by eight to convert bits to bytes. Divide again by 1,073,741,824 to express the result in GiB. The billion in an 8B model means a decimal billion for this calculation. That distinction explains why a raw result expressed in GiB differs from the same bytes expressed in decimal GB. The capacity printed in a hardware name is only a label; check what the runtime reports as available.

Eight billion parameters at four bits give 4,000,000,000 bytes, or about 3.73 GiB. At eight bits the raw result is about 7.45 GiB; at sixteen bits it is about 14.90 GiB. Real quantization formats can mix precisions and include scales, metadata or other structures. Our finder adds ten percent to the raw weight result as an explicit planning allowance. That allowance is not a claim that every format has exactly ten percent overhead. Use the actual artifact size and runtime allocation when available.

Understand the cache formula

For the conventional attention example used by our finder, KV-cache bytes equal two multiplied by layers, KV heads, head dimension, context tokens, bytes per cache element and concurrent sequences. The factor of two represents keys and values. Our default calculator models one sequence and exposes architecture inputs because the parameter count does not determine them. With 32 layers, eight KV heads, a head dimension of 128, 8,192 tokens and two-byte cache elements, the example cache is exactly one GiB.

This is not a universal formula for every model architecture. Sliding-window attention, hybrid architectures, compression, paged allocation and runtime policies can change actual allocation. Grouped-query attention uses KV-head counts that may be smaller than the query-head count; entering the wrong head count can badly distort the result. Read the model configuration rather than guessing it from the model size. For an unfamiliar architecture, treat the finder as a screening tool and validate with the backend documentation.

A worked example with visible headroom

Take an 8B dense model at four-bit weights with the default architecture above and an 8,192-token context. Start with 3.73 GiB of raw weights. Multiply by 1.10 for the weight allowance, add one GiB of KV cache and one GiB of workspace, then multiply the subtotal by 1.15 for headroom. The result is approximately 7.01 GiB. This is an arithmetic estimate, not a measured peak allocation and not a named-model compatibility statement.

The same assumptions at eight-bit weights produce about 11.72 GiB. Increasing only the context from 8,192 to 32,768 tokens makes the cache four GiB and changes the four-bit total to about 10.46 GiB. That example shows why a device that handles a short conversation may run out of memory on a long document. Headroom is deliberately visible so a reader can change it, rather than mistaking a rounded answer for a guarantee.

Check price on Amazon

Read the memory table as a first pass

Raw dense-model weights only; no cache or workspace
Parameters 4-bit 8-bit 16-bit
3B 1.40 GiB 2.79 GiB 5.59 GiB
8B 3.73 GiB 7.45 GiB 14.90 GiB
14B 6.52 GiB 13.04 GiB 26.08 GiB
32B 14.90 GiB 29.80 GiB 59.60 GiB
70B 32.60 GiB 65.19 GiB 130.39 GiB

The table deliberately shows raw weights rather than labeling a hardware tier as capable of every model of that size. Add your own architecture-specific cache, runtime workspace and headroom. A near-fit should be treated as a reason to investigate, not as permission to ignore the missing allocations. Mixture-of-experts models need additional care: the number of active parameters per token is not necessarily the amount of resident weight storage.

Dedicated VRAM and shared memory

On a discrete GPU, host RAM is still important for loading, preprocessing and CPU offload. It does not automatically extend device VRAM at equivalent behavior. A system can successfully load a partly offloaded model yet respond very differently from a fully resident run. Decide whether offload is acceptable for your actual usage, and record it when comparing measurements. Otherwise two apparently similar demonstrations may be exercising very different hardware paths.

On a unified-memory system, the operating system and applications share the capacity used by the model. Our finder reserves four GiB before matching those products. That is a simple planning convention, not a statement about a fixed OS requirement or an operating-system GPU allocation limit. A browser with many tabs, a development environment or a media application may need considerably more. Leave room for the complete working session, and check the backend’s usable allocation rules.

Choose settings before choosing a product

Write a small workload specification: model artifact, weight quantization, maximum retained context, number of users and any additional models loaded at the same time. An embedding model, reranker or vision component can create another allocation. Put those requirements beside the memory estimate instead of assuming a chat-only example covers your application. If the workload is still uncertain, prioritize a sensible margin over a result that barely fits on paper.

Use the finder on the homepage to narrow the catalog, then open the product page for configuration details and manufacturer sources. For example, the ASUS PRIME 16 GB configuration and the 32 GB W7800 configuration present different capacity ceilings. That comparison does not rank their performance or imply the same software support. Resolve the backend before deciding that more capacity is the better purchase.

Check price on Amazon

What to record when validating the estimate

A useful validation note includes the exact model filename or revision, runtime version, backend, driver, context setting, cache precision and concurrency. Record the memory reported before loading and the peak observed during a representative prompt and response. State whether the model is fully resident or partly offloaded. Do not compare a warm short prompt on one machine with a cold long-document run on another and call the result a hardware ranking.

If a run fails, first distinguish capacity from configuration. A missing kernel, unsupported operator or driver mismatch can fail before memory is the limiting issue. Start with a small known-working workload, then increase one setting at a time. When the measured allocation exceeds this estimate, prefer the measurement for that configuration and investigate which assumption differs. The purpose of the calculator is to make the assumptions inspectable, not to overrule evidence from the actual software.

When one estimate is not enough

Concurrency is an easy source of underestimation. The finder represents one sequence. If a server keeps several independent conversations active, each can need its own cache state. A shared prompt or a runtime-specific allocation strategy may change the exact result, so multiplying the entire single-user estimate is not always the right model either. Separate the shared weights from the per-sequence state and document how the server actually allocates them. A capacity decision for a shared service should use that server configuration rather than the single-user homepage default.

Training and fine-tuning are outside this calculator. Gradients, optimizer state, activations and training techniques create another memory problem. A card that fits an inference example is not thereby recommended for training the same model. The same caution applies to image-generation pipelines, multimodal encoders and architectures with nonstandard state. State the boundary of the estimate instead of stretching a convenient formula into an unrelated recommendation.

Keep a small worksheet beside any purchase shortlist. In one column record what is known from the model configuration. In another record planning assumptions, and in a third record values measured on a real run. This prevents a guessed workspace allowance from acquiring the authority of a manufacturer specification. When an assumption changes, recalculate every shortlisted configuration with the same inputs. That consistency is more useful than a highly precise-looking answer based on undocumented defaults.

Sources and scope

This is spec-based planning advice, not a hardware test. The arithmetic examples are our calculations under the stated assumptions. Consult the current runtime documentation and the exact manufacturer configuration before buying.