BunkerAI Articles · Practice

How much memory does local AI really need?

Why the model file size is only the beginning of the calculation: we analyze weights, context, KV-cache, parallel users and reasonable configurations from 16 to 512 GB.

The question “how much memory does local AI need” is often boiled down to a single number. For model 70B they call 40 GB, for 120B - 70 GB, after which they select a computer with the same amount of memory. In the demo, the model can actually run. But the working system must not only load weights: it needs context memory, service buffers, an operating system, document search and simultaneous user requests.

The right question is: how much memory does your working scenario, not the model, need?

What does memory consumption consist of?

1. Model weights

The first approximation is simple: the number of parameters is multiplied by the number of bits per parameter. The 70B model in BF16 requires about 140 GB for weights alone, in 8-bit about 70 GB, and in 4-bit about 35 GB. Actual file and memory consumption will be slightly higher due to metadata, mixed tensor types, and format features.

MoE models only have a subset of their parameters active during generation, so they can calculate faster than a dense model of similar full size. But all experts must still be stored in memory or loaded, so you cannot rely only on the number of active parameters.

2. Context and KV-cache

The longer the dialogue or document, the more memory is occupied by the KV-cache - the saved internal state of the attention layers. The cost depends on the model architecture, context length, cache format and the number of simultaneous sessions. One user with a context of 8,000 tokens and ten users with a context of 64,000 tokens are fundamentally different configurations, even if the model is the same.

3. Engine and working environment

Ollama, llama.cpp, MLX and vLLM reserve memory differently. Additionally, there is a web interface, embedding model, reranker, vector index, speech recognition and other modules. Leaving the system with zero reserve means unloading layers into system memory, errors with long documents, or a service crash with a second user.

Practical Configuration Classes

  • 16–32 GB: models 4-14B, personal assistant, classification, short documents and basic RAG. It's a good starter node, but not an all-in-one enterprise server.
  • 32–64 GB: Models 20–35B with normal context, single user local agent, programming and document processing.
  • 96–128 GB: high-quality 70B models, some MoE profiles, long context and several light services on one node.
  • 192–256 GB: 120–200B class models in practical quantization, multiple users, large knowledge base, voice and agent modules.
  • 512 GB or more: heavy 300B+ models, large MoE, multiple models simultaneously, or increased context and parallelism requirements.

These are not guaranteed limits, but rather safe classes to plan for. The exact result depends on the architecture and quantization. The 120B MoE model may be easier to compute, but more memory-intensive than the dense 70B.

Why “started” does not mean “suitable for work”

Alex Ziskind paired two Ryzen AI Halo computers and allocated approximately 120 GB of shared memory to each to test the 400B class model. The experiment shows that affordable hardware does make it possible to enter the realm of very large models. At the same time, it shows the cost of such a solution: Linux setup, manual memory allocation, network connection, and speed dependence on how the model is decomposed between nodes.

A similar situation arises with unloading part of the model into regular RAM. The model fits, but memory bandwidth becomes the limiter. For a reference request, the delay may be acceptable; for an interactive agent that makes dozens of calls to the model, no longer.

How to count memory before purchasing equipment

  1. Define tasks: chat, documents, programming, voice, images or agent processes.
  2. Choose two models: the main and backup are more compact, and not one fashionable release.
  3. Capture context: average and maximum volume of one request in real documents.
  4. Calculate parallelism: how many people and background agents will be able to access the system at the same time.
  5. Add stock: usually at least 20–30% above the measured peak for updates, cache and additional services.
  6. Run a pilot: measure not only tokens per second, but also time to first response, quality and stability over a long session.

How we apply this at BunkerAI

We select the configuration based on the scenario, and not on the advertising name of the model. For an internal knowledge base, long context and quick search are important; for the code agent - quality of tool calling and processing of a large repository; for “Protocolist” - simultaneous operation of speech recognition, diarization and summarization. Therefore, two customers with the same LLM may receive different amounts of memory.

Short conclusion: 32 GB is suitable for getting started with local AI, 64-128 GB covers a significant portion of personal and small enterprise tasks, and 256 GB becomes a reasonable point for a serious general-purpose node. Everything above should be considered for a specific model, context and number of users.

Sources and further reading