Step 1 of 2 · AI for documents
Local AI model advisor
Find out which text models fit in your available memory and how much each GGUF variant needs.
The example starts with 8 GiB of free VRAM and 4,096 tokens. Adjust the values to match your hardware and context needs.
What uses memory
- GGUF weights
- The size varies with quantization.
- Context cache
- It grows as you use more tokens.
- Runtime overhead
- Estimated memory needed by the runtime.
01 · By hardware
Which models fit?
Choose where to load the model and how much memory you can allocate to it.
02 · By model
How much memory do I need?
Compare model variants for the selected device and context size.
How memory is calculated
Model weights. We use the published GGUF file size for each variant. To convert bytes to GiB, we divide by 1,073,741,824. Q4_K_M typically takes less space than Q5_K_M and Q8_0. Compressing weights further can affect response quality.
Context cache. We estimate the FP16 key-value (KV) cache for one conversation. We multiply the token count by the number of layers, the number of KV heads, the dimensions per head, and 4 bytes (2 for each key and 2 for each value). We use the context length published by the model author without extensions such as YaRN.
Runtime overhead. We add the greater of 10% of the weight size or a device-specific minimum. The minimum is 1 GiB for GPU, 1.5 GiB for unified memory, and 0.75 GiB for CPU. Actual overhead varies with the runtime, batch size, and settings.
Ranking. The list starts with models that leave at least 0.5 GiB or 5% of the available memory free, whichever is greater. Within that group, we sort by the selected use case first and then by model size. We suggest the highest-precision quantization that preserves that headroom. A variant that fits with less headroom is marked “Tight fit.”
Scope. The estimate assumes the weights, cache, and runtime are all loaded into the same memory. It covers a single dedicated GPU, unified memory, or system RAM used by the CPU. Speed and compatibility depend on your hardware and software.
The calculation runs in your browser and the values you enter stay there.
If you know how much memory your weights and context need, try the manual memory estimator.
Cache calculation in llama.cpp FP16 cache settings in llama.cpp
