GPU VRAM Estimation for Open-Source LLMs: A Practical Single-GPU Deployment Guide

    A practical guide to estimating VRAM requirements for open-source large language models, with a focus on MoE architectures. It explains why low activated-parameter counts do not reduce memory usage, how to choose weight formats and licenses, how to build a full VRAM budget, and how to deploy on single-GPU, dual-GPU, and multi-GPU setups with vLLM, plus a pre-launch validation checklist.

    1. First, a Common Misconception: Fewer Activated Parameters Does Not Mean Less VRAM

    When developers first work with open-source large language models built on a Mixture-of-Experts (MoE) architecture, they often make an intuitive assumption: since each token only activates a few billion parameters, VRAM requirements should scale at that same order of magnitude. That inference does not hold up.

    Two completely different concepts need to be separated:

    • Compute (FLOPs): Determined by the parameters that actually participate in the forward pass for each token. This affects throughput and latency.
    • VRAM footprint: Determined by all weights that must stay resident in VRAM, regardless of whether they are activated.

    The value of MoE lies in “trading a large parameter pool for knowledge capacity while keeping the compute cost of a single inference pass under control.” It optimizes compute efficiency, not storage cost. Expert weights that are not activated still have to be loaded into VRAM; otherwise, computation is impossible when routing sends a token to that expert.

    A typical example is a recent lightweight flagship open-source model: roughly 125 billion main model parameters, about 6 billion activated per token, plus an N-gram embedding table of around 51 billion, roughly 4 billion multi-token prediction (MTP) parameters, a vision encoder, and a native context window of 260K tokens. The final FP8 weight size reaches about 172.78 GiB, while the BF16 version is about 335.28 GiB.

    The conclusion is straightforward: a 32GB consumer-grade GPU cannot run the FP8 weights of this kind of model, but the roughly 27 billion parameter dense version from the same series is entirely feasible. The first principle of model selection is to be clear about whether you want the upper bound of capability or deployability.

    2. Three Preparation Steps Before Deployment

    1. Confirm the Weight Format, Not the Number of Models

    The same model is often released in multiple weight formats such as BF16, FP8, and NVFP4. These are different-precision storage of the same parameters, not different models. When selecting:

    • BF16: Highest precision, highest VRAM and bandwidth requirements. Suitable for teams with multi-GPU, high-VRAM environments doing baseline evaluations.
    • FP8: The mainstream compromise. Roughly half the size of BF16, and the hardware must natively support this precision.
    • Lower-bit quantization such as NVFP4: Aimed at consumer-grade GPUs and VRAM-friendly, but watch for precision loss and operator support.

    2. Read the Weight License

    The code repository license and the model weight license are two separate sets of terms. Many open-source projects use a permissive license for the code, but the weights come with their own community license that imposes additional constraints on commercial use, redistribution, and ownership of output. Enterprises must read the weight license separately before deployment, rather than assuming commercial use is allowed just because the code repository has a permissive license.

    3. Build a Complete VRAM Budget, Not Just a File-Size Estimate

    Available VRAM must cover the following:

    1. Total VRAM requirement ≈ weight size
    2. + KV Cache (grows linearly with context length and concurrency)
    3. + CUDA runtime / framework workspace
    4. + activations and temporary buffers
    5. + peak overhead from concurrent requests

    Practical advice: keep the weight size within 70% of available VRAM and leave the rest for KV Cache and runtime. The impact of context length on KV Cache is often linear, and a 262K context can consume tens of GB of VRAM in long-sequence scenarios.

    3. Tiered Selection Strategy for Single-GPU and Dual-GPU Setups

    Tier 1: A Single 32GB-Class Consumer GPU

    Choose the 4-bit quantized version of a roughly 27 billion parameter model and follow the principle of “get it running first, then apply pressure”:

    • Drop the context to 32K first, verify stability, then increase it gradually.
    • Enable eager execution mode (--enforce-eager) and disable graph capture to save VRAM.
    • Do not chase 260K or even million-level context from the start.

    Example startup parameters:

    1. vllm serve <model-name-4bit> \
    2. --max-model-len 32768 \
    3. --enforce-eager \
    4. --gpu-memory-utilization 0.90

    Tier 2: Dual-GPU Parallelism

    A dual-GPU setup with FP8 weights is a safer combination and can support long context and moderate concurrency:

    1. vllm serve <model-name-fp8> \
    2. --tensor-parallel-size 2 \
    3. --max-model-len 262144 \
    4. --kv-cache-dtype fp8 \
    5. --reasoning-parser qwen3 \
    6. --enable-auto-tool-choice \
    7. --tool-call-parser qwen3_coder

    Storing the KV Cache in FP8 significantly reduces VRAM pressure for long contexts. Tensor parallelism requires the model dimensions to be divisible by the number of GPUs. If the framework offers an expert parallelism mode, confirm that the parallelism strategy matches the hardware topology; ordinary tensor parallelism is not compatible with some MoE models.

    Tier 3: Multi-GPU High-VRAM Cluster

    If you must run a very large MoE model, the officially validated path typically starts with an 8-GPU high-VRAM platform and recommends 4-GPU tensor parallelism or 8-GPU expert parallelism. This kind of scenario is better suited to requesting resources on demand from a cloud container platform, combined with object storage for weight distribution and logging and monitoring services for runtime observability.

    4. Pre-Launch Validation Checklist

    1. Precision check: Before a quantized version goes live, compare it against the BF16 baseline on a fixed evaluation set and confirm the precision drop is within an acceptable range.
    2. Long-text stress test: Increase pressure gradually from 8K to the target context and observe the VRAM and throughput curves.
    3. Concurrency stress test: Confirm that KV Cache does not trigger preemption or timeouts under peak concurrency.
    4. Tool calling and reasoning chains: If the business relies on structured output, verify that the reasoning parser and tool call parser are working.
    5. Observability: Connect monitoring and alerting, and set thresholds for VRAM level, time to first token, and queue length.

    5. Summary

    The core of local LLM deployment is not “getting it to run,” but getting it to run stably within the VRAM budget. Remember three points: activated parameters determine compute cost, while all weights determine VRAM cost; choose the right weight format and model tier before discussing context and concurrency; and read the weight terms of the license separately. Follow this path, and a single GPU can deliver a usable inference service, while multiple GPUs can scale smoothly to long-context production scenarios.