Choosing a GPU for Local LLM Deployment: VRAM Estimation and Tier Comparison

    Deploying Large Language Models (LLMs) locally requires careful hardware selection, with GPU VRAM being the primary bottleneck. This article explores the transition from cloud-based evaluation to local deployment, detailing how to estimate VRAM requirements based on model weights and KV Cache. It compares common GPU tiers, highlights frequent selection pitfalls, and provides a practical three-step guide to matching hardware with your specific LLM workloads and budget.

    1. Why LLM Selection Has Become Complex

    Since 2024, the capabilities of LLMs have iterated rapidly. Whether for general conversation, code generation, or multimodal understanding, flagship models from mainstream vendors have reached a highly usable level. For developers and enterprise users, asking “which model is the best” is no longer a simple single-choice question, but a set of trade-offs that must be evaluated based on specific scenarios.

    Two common usage methods each have their pros and cons:

    • Cloud API calls: Suitable for quickly validating product prototypes without data compliance pressures. Typically billed based on usage volume, keeping initial costs manageable.
    • Local or private deployment: Suitable for scenarios demanding high data privacy, requiring deep customization, or aiming to amortize long-term costs. The barrier to entry lies in hardware investment and operational capabilities.

    After validating capabilities in the cloud, many teams encounter the next question: Can the model be run locally, and what hardware is required? This article focuses on this issue, specifically discussing hardware selection for local deployment.

    2. Cloud Evaluation: Compare Using Real Tasks First

    Before deciding on local deployment, it is advisable to evaluate model capabilities through cloud services. The following dimensions can serve as an evaluation checklist:

    1. Task Adaptability: General benchmark scores are for reference only. A more reliable approach is to prepare at least 100 real business samples, have the candidate models answer them one by one, and track the accuracy, format compliance rate, and hallucination rate.
    2. Context Window and Inference Cost: Long-context capabilities determine whether a complete document can be input at once. You can test using actual document lengths to observe first-token latency and answer completeness. The price per token dictates the bill after scaling. You can estimate monthly costs using the formula below:

      Monthly Cost ≈ Daily Requests × 30 × (Average Input Tokens + Average Output Tokens) ÷ 1000 × Unit Price

    3. Ecosystem and Toolchain: General capabilities like function calling, structured output, and streaming responses directly impact application development efficiency. Some cloud providers bundle model services with object storage, container platforms, and monitoring alerts to help build a complete inference pipeline. Refer to official documentation for specific capabilities.

    4. Private Licensing: Some models offer open-weight or private licensing options, which is a prerequisite for local deployment. Verify the licensing terms, especially regarding commercial use restrictions.

    Once the cloud evaluation is complete and the local deployment route is confirmed, hardware selection becomes the next critical decision.

    3. How Much VRAM is Needed for Local LLMs? Calculate Weights and KV Cache

    When running LLMs locally, the bottleneck is typically VRAM, not compute power. The VRAM required for weights can be roughly estimated using this formula:

    Weight VRAM ≈ Parameters × Bytes per Parameter

    • FP16 precision uses 2 bytes per parameter, INT8 uses 1 byte, and INT4 uses about 0.5 bytes.
    • For a 7B model: FP16 loading requires about 7 × 2 = 14GB; INT4 quantization requires about 7 × 0.5 = 3.5GB.
    • For a 13B model: FP16 loading requires about 13 × 2 = 26GB; INT4 quantization requires about 6.5GB.

    Weights are only part of the equation. Inference also requires VRAM for KV Cache, activations, and the framework’s own runtime overhead. It is usually necessary to reserve an additional 20% to 50% buffer.

    KV Cache grows with context length and concurrency, estimated as follows:

    KV Cache Bytes ≈ 2 × Layers × KV Heads × Head Dimension × Sequence Length × Batch Size × Bytes per Element

    Taking a 7B model with 32 layers, 32 KV heads, and a head dimension of 128 as an example, using FP16 cache, a 4096 context, and a batch size of 1, the KV Cache is about 2GB. If the context is lengthened or concurrency is increased, this VRAM usage will scale proportionally. Note that quantizing weights does not automatically reduce KV Cache footprint unless the KV Cache itself is also quantized.

    Based on this logic, several practical conclusions can be drawn:

    • For 13B model FP16 inference, the weights alone require about 26GB. Including KV Cache and overhead, it typically requires more than 32GB of VRAM.
    • 20GB-class VRAM can comfortably run a 7B FP16 model while retaining a certain amount of context space.
    • Running a 13B model on 20GB-class VRAM requires quantization. INT8 weights take about 13GB, and with the KV Cache for a 4096 context, it is already near the upper limit with little buffer left. INT4 is more relaxed but introduces some accuracy loss, requiring real-world testing on your own tasks.

    4. Parameter Logic for Common GPU Tiers

    The table below abstracts four common solution tiers. It only describes the relative relationship of parameters and does not provide specific models or precise values. Always refer to official spec sheets and real-world test results before purchasing.

    Dimension Old Architecture High VRAM (Modded) Data Center Compute Cards (Bare Second-hand) New Architecture Sweet-Spot (~20GB) New Architecture Flagship (~24GB)
    VRAM Capacity Large Medium to Large ~20GB ~24GB
    VRAM Bandwidth Medium High Medium-High High
    bf16 Precision Usually unsupported Usually unsupported Supported Supported
    Attention VRAM Optimization Usually unsupported Usually unsupported Supported (requires framework, driver, model compatibility) Supported (requires framework, driver, model compatibility)
    Cooling & Power Requires modification Passive cooling, requires modded cooling, adapters, and power supply Standard setup Standard setup
    Power Consumption High Medium, idle power cannot be ignored Medium High
    Price Position Low Very low (bare card), not necessarily low after modding costs Medium High

    One point must be emphasized: GPU architecture is only a prerequisite. Whether attention optimization and bf16 actually take effect requires simultaneous support from the GPU, drivers, inference framework, and model structure. Looking only at GPU specs can easily lead to incorrect judgments.

    5. Common Mistakes in Selection

    1. Large VRAM Does Not Equal Strong Inference Performance

    For old architecture high-VRAM cards, the extra memory is only valuable if the model actually fits. If the framework cannot use bf16 or attention optimization, inference throughput may be significantly lower than that of new architecture cards. The reasonable use for these cards is building multi-GPU systems via high-speed interconnects to assemble large VRAM at a lower cost to run ultra-large models. This requires compatible motherboards and interconnect solutions, which is an advanced approach.

    2. Second-hand Data Center Cards: Low Price, High Hidden Costs

    These cards feature high VRAM bandwidth, which significantly accelerates inference, and their bare card prices are attractive. However, note the following:

    • Modification costs: Passive cooling requires custom cooling solutions, adapter boards, and independent power supplies. The total investment may approach or exceed that of a new card.
    • Idle power consumption: A single card’s idle power consumption can reach tens of watts. The electricity cost of a multi-GPU system idling for a day cannot be ignored.
    • Warranty and replacement: These cards usually have no warranty. If custom modded parts break, it is often difficult to find universal replacements, and the chassis space they occupy is substantial.
    • Price volatility: Second-hand market prices fluctuate greatly with supply and demand. Check current market conditions before buying.

    3. Sweet-Spot Cards May Be Optimal for Single-GPU Scenarios

    When the following conditions are met simultaneously, a new architecture ~20GB sweet-spot card may be the optimal choice:

    • Only using a single GPU;
    • Running a 7B FP16 model or a 13B quantized model;
    • Budget is in the mid-range (around $400 to $700, subject to market fluctuations);
    • The same machine also needs to handle other workloads like AI image generation or gaming.

    If you need to run FP16 models above 30B or perform local fine-tuning, the VRAM and compute of these cards may be insufficient, requiring a re-evaluation.

    4. Flagship Cards Suit Specific Needs

    Compared to sweet-spot cards, flagship cards offer about 4GB more VRAM, higher bandwidth, and more compute power, but they are usually significantly more expensive, and performance gains vary by model and test workload. For pure inference scenarios, marginal returns diminish as the price increases. Upgrading is only meaningful if you need longer context, higher concurrency, or local fine-tuning.

    6. How to Choose a GPU: A Three-Step Approach

    Based on the analysis above, you can follow this process for selection.

    Step 1: Define Model Size and Precision. Estimate VRAM requirements using the weight and KV Cache formulas, and leave a buffer.

    Step 2: Check Framework Requirements. Confirm whether the inference framework requires bf16 and attention optimization, and verify driver and model support. Old architecture cards can typically be ruled out for single-GPU scenarios.

    Step 3: Match Budget to Tier. The following prices are reference ranges and fluctuate with the market; verify current prices before purchasing:

    • Under $300: Only recommended for users willing to accept the risks of modding, power supply, and power consumption, considering second-hand compute cards or old architecture cards, ideally for multi-GPU interconnect scenarios. If workloads are light, consider cloud pay-as-you-go directly.
    • $400 to $700: New architecture sweet-spot cards, a common first choice for single-GPU scenarios.
    • Over $1,100: Flagship cards, suitable for users with explicit requirements for throughput, context length, or fine-tuning.

    Additionally, there are two alternative approaches. One is renting cloud GPUs or pay-as-you-go inference services, turning one-time hardware investments into variable costs. The second is using quantization to reduce VRAM usage, but you must test accuracy loss on your own tasks rather than just looking at VRAM numbers.

    7. Conclusion and Practical Advice

    Cloud validation remains the most cost-effective first step. Once the model is determined, you can move into the local deployment phase.

    The cost-effectiveness of local deployment depends on the specific model, quantization method, context length, and concurrency requirements. Rather than relying on a fixed “inflection point,” it is better to judge using a consistent testing process: use the same model, quantization, context length, and concurrency to measure first-token latency and tokens generated per second. If test results meet business needs, there is no need to upgrade; if they fall short, upgrade hardware targeting the bottleneck.

    Selection should revolve around real workloads. Calculate VRAM requirements first, then compare parameters across tiers, and finally confirm with real-world test results. This ensures that every GB of VRAM and every TFLOPS of compute is truly used for practical tasks.