LocalClaw resources / Free planning tool
Will your next LLM
fit in memory?
Go beyond the model download size. Budget for weights, context and the memory your machine still needs to breathe.
One model, different workloads
Context has a memory cost.
These rows reuse your settings and change only the tokens per sequence. They do not verify supported context lengths.
| Tokens per sequence | KV cache | Total budget | Capacity check |
|---|---|---|---|
| 2,048 | 0.11 GiB | 8.01 GiB | Within budget |
| 8,192 | 0.44 GiB | 8.34 GiB | Within budget |
| 16,384 | 0.88 GiB | 8.77 GiB | Within budget |
| 32,768 | 1.75 GiB | 9.65 GiB | Within budget |
A reference you can check
What does a local LLM need?
Three worked examples at 4-bit weights + 10% weight overhead, 8,192 tokens, one sequence, FP16 cache, 1 GiB runtime and 3 GiB system reserve. All values below are GiB. This is arithmetic, not measured runtime performance.
| Model / config source | Weights | KV cache | Total + reserves |
|---|---|---|---|
| Qwen2.5 7B | 3.90 | 0.44 | 8.34 |
| Qwen2.5 14B | 7.53 | 1.50 | 13.03 |
| Qwen2.5 32B | 16.65 | 2.00 | 22.65 |
For example, the 7B preset totals 8.34 GiB: 3.90 weights + 0.44 KV cache + 1 runtime + 3 system reserve. The presets illustrate known transformer layouts; they are not a list of recommended models.
Method v1.0 · November 2, 2026
Every assumption is visible.
The calculator uses decimal billions of parameters and converts bytes to binary GiB (1 GiB = 1,073,741,824 bytes). An actual GGUF file size overrides the estimated weight size. Runtime buffers and the system reserve are editable allowances.
weights = parameters × 1,000,000,000 × bits ÷ 8 × (1 + overhead / 100) KV cache = 2 × layers × KV heads × head dimension × tokens × bytes × sequences total GiB = (weights + KV cache) ÷ 1,073,741,824 + runtime GiB + reserve GiB
For grouped-query attention, use the number of key/value heads, not query heads. Each concurrent sequence gets its own full cache in this conservative calculation; weights are shared. Prefix sharing and paged allocation may reduce actual use. A static cache may allocate for the full configured context.
Do not apply this cache formula to MLA, recurrent or hybrid architectures without adjusting for their actual cache design. Multimodal encoders, adapters, speculative decoding and extra model copies are outside this calculation. Maximum context support, memory fit and generation speed are separate questions.
Primary sources
- Qwen2.5 7B configuration: 28 layers, 4 KV heads, head dimension 128.
- Qwen2.5 14B configuration: 48 layers, 8 KV heads, head dimension 128.
- Qwen2.5 32B configuration: 64 layers, 8 KV heads, head dimension 128.
- Hugging Face: how caching works and cache strategies.
- llama.cpp benchmarking tools for actual backend measurements.
Sources checked November 2, 2026. Parameter counts are rounded planning inputs. Read the calculator source.
Cite this calculation
LocalClaw. Local LLM Memory Calculator, method v1.0 (November 2, 2026). https://localclaw.io/local-llm-memory-calculator. Include the result link or CSV to preserve your settings. Calculated estimate; not a measured benchmark.
Memory planning questions
How much RAM does a 7B model need?
Weight precision and context change the answer. In this planner, a 7.61B model at 4 bits with 10% weight overhead uses about 3.90 GiB for weights. The Qwen2.5 7B example adds 0.44 GiB for an 8,192-token FP16 KV cache, plus your runtime allowance and system reserve. These are calculated estimates, not measured memory use.
Can I add system RAM and GPU VRAM together?
No. Choose the pool you intend to use. The GPU calculation budgets the full weights and KV cache in VRAM; system RAM must be available separately. Apple Silicon uses a shared pool, so leave room for macOS and other apps. Partial CPU/GPU offload requires a separate runtime-specific plan.
Does a 4-bit GGUF use exactly four bits per parameter?
No. Quantization blocks, scales, mixed-precision tensors and metadata add overhead. The default 10% is an editable planning allowance, not an exact Q4_K_M ratio. Enter the actual complete GGUF size to replace the parameter-based weight estimate.
Does this work for MoE, hybrid or multimodal models?
The weight estimate needs total resident parameters, including all resident MoE experts. The KV formula here is for conventional full-attention transformer layers, including grouped-query attention. It does not model MLA, recurrent state, hybrid/sliding-window allocation, vision encoders, speculative decoding or expert offload. Use runtime measurements for those architectures.
Are these hardware recommendations or benchmark results?
They are transparent planning calculations. Runtime buffers, cache allocation, fragmentation, backend versions and other apps can change actual memory use. The tool does not measure tokens per second or guarantee that a runtime can load a model. Verify the selected model and backend before buying hardware.
Can I share or cite a result?
Yes. Copy the result link to preserve every input or download the CSV with the formula version and settings. Cite LocalClaw, the calculator URL and your assumptions. No account or paid app is required.