Skip to content
Tools · Private AI Sizing

LLM VRAM Calculator: Size the GPU for Your Private AI Server

LLM VRAM calculator for planning a private AI server. Pick an open-weight model preset or enter your own, then set quantization, context length and concurrent users. You get the GPU memory it needs as weights, KV cache and overhead, plus the GPU tiers that fit.

Book a Strategy Session Runs in your browser · nothing you enter is stored or sent
Calculator

Estimate GPU Memory for an Open-Weight LLM

Choose a preset or enter a custom model, then set the precision, the context length and how many people use it at once. Every figure is computed in your browser, and nothing you enter is stored or sent.

Model
Presets use the parameter count, layers, KV heads and head dimension from each model's config.json, model card or technical report. Edit any field below to size a custom model.
Precision
Most servers keep the KV cache at 16-bit by default. vLLM can store it in FP8 to halve it.
Workload
Prompt plus generated tokens. 4K is 4,096 tokens, 8K is 8,192, 32K is 32,768 and 128K is 131,072.
Each user is assumed to fill the full context at the same time.

Estimated VRAM

19.8 GB

Smallest single GPU tier that fits: 24 GB, for example the RTX 4090.

  • Model weights16.1 GB
  • KV cache1.1 GB
  • Overhead (10% plus 1 GB)2.7 GB

Single GPU tiers

    One 80 GB GPU holds this estimate, so no multi-GPU split is needed.

    Model card context for Llama 3.1 8B: 128K tokens.

    Results are estimates for planning. All figures are in GB, where 1 GB is 1,000,000,000 bytes. Real memory use depends on the inference server, its settings, the model file format and batching, so confirm on your own hardware before you buy GPUs.

    Method

    How the LLM VRAM Estimate Works

    The calculator adds three parts: the model weights, the KV cache that holds each user's context and a margin for the inference server. All figures are in GB, where 1 GB is 1,000,000,000 bytes.

    Model weights

    weights = parameters × bytes per parameter

    FP16 and BF16 use 2 bytes per parameter, 8-bit uses 1 and 4-bit uses 0.5. Llama 3.1 8B has 8.03 billion parameters, so its weights take 16.1 GB at FP16 and 4.0 GB at 4-bit.

    KV cache

    KV cache = 2 × layers × KV heads × head dimension × context × bytes per value × users

    The 2 counts the key and the value the model keeps for every token in every layer. Values take 2 bytes (FP16) unless you choose an 8-bit cache, and each user is assumed to fill the full context. Llama 3.1 8B keeps 131,072 bytes per token, so 8,192 tokens take 1.1 GB.

    Overhead

    overhead = 10% of (weights + KV cache) + 1 GB

    The margin stands in for activations, the runtime and the memory an inference server reserves for itself. Servers handle this differently, so treat it as a planning cushion.

    Where the Numbers Come From

    Presets take the parameter count, layers, KV heads and head dimension from each model's own sources: the Llama 3 paper and Meta's Hugging Face repositories for Llama 3.1, Qwen's model cards and config.json files for Qwen2.5 and Qwen3, Mistral AI's config.json for Mistral 7B v0.3 and the Gemma 2 technical report for Gemma 2. A GPU tier fits when the total is at or below the memory on the vendor's spec page. The multi-GPU line checks 2, 4 and 8 cards of 80 GB, splits the total evenly and adds no overhead per card, so treat it as a minimum.

    How Close the Estimate Comes to Published Figures

    Qwen's speed benchmark measured Qwen3-8B in BF16 at 16,811 MB of GPU memory with a 6,144-token prompt and 2,048 generated tokens. For the same 8,192 tokens the calculator gives 17.6 GB for weights plus KV cache and 20.4 GB with the margin. Mistral AI's model page lists about 20 GB at bf16 and 5 GB at fp4 for Mistral 7B v0.3, against 18.1 GB at FP16 and 6.2 GB at 4-bit here at 8,192 tokens.

    Real 4-bit files also store scaling factors alongside the weights, so they take a little more than 0.5 bytes per parameter. Qwen's benchmark reports 6,177 MB for a 4-bit AWQ build of Qwen3-8B with a one-token prompt, above the 5.8 GB this method gives for those 2,049 tokens. When a 4-bit estimate sits close to a card's limit, plan for the next tier up.

    GPU Tiers

    GPU Tier Table: Which LLMs Fit in 8 GB to 80 GB of VRAM

    Computed with the method above for one user at 8,192 tokens, with the KV cache at FP16. Each row lists the presets that first fit at that tier, with their estimated total. Example GPUs and their memory come from NVIDIA's spec pages, checked November 20, 2026.

    VRAM tierExample GPUsModels that fit at 4-bitModels that fit at FP16Context-length cost
    8 GBGeForce RTX 5060 (8 GB GDDR7)Qwen2.5 7B (5.7 GB), Mistral 7B v0.3 (6.2 GB), Llama 3.1 8B (6.6 GB) and Qwen3 8B (6.8 GB)The smallest FP16 preset, Mistral 7B v0.3, needs 18.1 GBLlama 3.1 8B at 4-bit rises to 10.1 GB at 32,768 tokens, which moves it to 12 GB
    12 GBGeForce RTX 5070 (12 GB GDDR7)Adds Gemma 2 9B (9.2 GB)FP16 presets start at 18.1 GBFour users at 8,192 tokens take the same KV cache as one user at 32,768, so Llama 3.1 8B at 4-bit needs 10.1 GB either way
    16 GBGeForce RTX 5080, RTX 5070 Ti and the 16 GB RTX 5060 Ti (16 GB GDDR7)Same presets as 12 GBFP16 presets start at 18.1 GBGemma 2 9B keeps 2.6 times the KV cache per token of Llama 3.1 8B, so four users at 8,192 tokens take it to 18.5 GB at 4-bit
    24 GBGeForce RTX 4090 (24 GB GDDR6X)Adds Gemma 2 27B (19.4 GB), Qwen2.5 32B (21.2 GB) and Qwen3 32B (21.4 GB)Mistral 7B v0.3 (18.1 GB), Qwen2.5 7B (18.3 GB), Llama 3.1 8B (19.8 GB) and Qwen3 8B (20.4 GB)Qwen2.5 32B at 4-bit needs 28.3 GB at 32,768 tokens, which moves it to 32 GB
    32 GBGeForce RTX 5090 (32 GB GDDR7)Same presets as 24 GBAdds Gemma 2 9B (24.4 GB)Qwen3 8B at FP16 needs 24.4 GB at 32,768 tokens, which moves it from 24 GB to this tier
    48 GBNVIDIA L40S (48 GB GDDR6 with ECC)Adds Llama 3.1 70B (42.8 GB) and Qwen2.5 72B (43.9 GB)Same presets as 32 GBLlama 3.1 70B at 4-bit needs 51.6 GB at 32,768 tokens or for four users at 8,192, which moves it to 80 GB
    80 GBNVIDIA H100 SXM (80 GB)Every presetAdds Gemma 2 27B (64.3 GB), Qwen2.5 32B (74.9 GB) and Qwen3 32B (75.5 GB)Llama 3.1 70B at 4-bit serves eight users at 8,192 tokens in 63.4 GB. One user at 131,072 tokens needs 87.0 GB
    Multi-GPU2, 4 or 8 NVIDIA H100 SXM cardsLlama 3.1 70B at 131,072 tokens (87.0 GB) on 2 × 80 GBLlama 3.1 70B (159.2 GB) on 2 × 80 GB and Qwen2.5 72B (163.9 GB) on 4 × 80 GBRead multi-GPU rows as a minimum, because the total is split evenly and no overhead is added per card

    NeuralChainAI sets up single-GPU private LLM pilots with Ollama and multi-user serving with vLLM on hardware sized this way, as part of a private AI deployment on your own servers or in your cloud tenant.

    Questions

    Frequently Asked Questions on LLM VRAM Sizing

    Add the weights at your chosen precision to the KV cache for your context length and user count, then add a margin for the runtime. With this calculator's method, Llama 3.1 8B at FP16 with one user at 8,192 tokens needs about 19.8 GB, so it fits a 24 GB card such as the GeForce RTX 4090. The same model at 4-bit needs about 6.6 GB and fits an 8 GB card. Llama 3.1 70B at 4-bit needs about 42.8 GB, which points to a 48 GB card such as the NVIDIA L40S.

    It gives a planning estimate. Qwen's published speed benchmark measured Qwen3-8B in BF16 at 16,811 MB of GPU memory with a 6,144-token prompt and 2,048 generated tokens. This method gives 17.6 GB for the weights and KV cache at those 8,192 tokens and 20.4 GB once the overhead margin is added. Real 4-bit files run a little above the 0.5-byte rule, and each inference server reserves memory its own way, so test the model on your runtime before you buy hardware.

    The KV cache stores a key and a value for every token in every layer, so it grows in a straight line with context length and with the number of concurrent users. Four users at 8,192 tokens each take the same cache as one user at 32,768 tokens. Llama 3.1 70B at 4-bit needs about 42.8 GB at 8,192 tokens and 51.6 GB at 32,768 tokens. Models with fewer KV heads grow more slowly, and Qwen2.5 7B has 4 where most presets here have 8. Storing the cache in 8-bit halves it, and vLLM offers this as its FP8 KV cache option.

    At 4-bit with one user at 8,192 tokens, the estimate is about 42.8 GB, which fits a 48 GB card such as the NVIDIA L40S. Four users at 8,192 tokens need about 51.6 GB, which moves it to an 80 GB card such as the H100. At FP16 the weights alone take 141.1 GB, so the model runs across at least two 80 GB GPUs.

    Yes. vLLM's documentation recommends tensor parallelism when a model is too large for one GPU but fits on one server with several, and you set it with its tensor parallel size option. The calculator's multi-GPU line divides the total evenly across 80 GB cards and adds no overhead per card, so read it as the minimum card count. NeuralChainAI's vLLM deployments size the split to your model and traffic.

    Size and Deploy Your Private AI Server

    Bring your estimate to a strategy session. We review the model, context length and user count with you, then map out the GPUs and the Ollama or vLLM serving stack for your own servers or cloud tenant.

    Discuss Your Project