How to Choose a Locally Deployed LLM: From VRAM Budget to Production Deployment

    Choosing a local large language model requires more than comparing parameter counts. This guide explains how to match model size to the task, estimate storage and VRAM requirements, understand the impact of KV cache and context length, evaluate quantization options, and choose between single-GPU, multi-GPU, and distributed deployments. It also provides a practical evaluation process based on quality, latency, throughput, concurrency, and operating cost.

    1. Why Consider Local LLM Deployment?

    As generative AI becomes increasingly common in knowledge-base question answering, coding assistance, content moderation, data analysis, and customer support, more teams are evaluating local LLM deployment. Compared with calling an online API, local inference can offer several advantages:

    1. Greater data control

      For sensitive data such as internal documents, source code, financial records, production logs, and customer information, local inference reduces the number of times data must leave the internal network. This makes it easier to enforce internal access controls, auditing, and logging policies.

    2. More predictable usage costs

      When request volumes are high and services run continuously, purchasing hardware or renting fixed computing resources may be easier to budget than paying per API call. However, local deployment is not cost-free. Hardware depreciation, electricity, maintenance, staffing, and model upgrades must also be included.

    3. Deeper customization

      Locally deployed models can be combined with enterprise knowledge bases, retrieval-augmented generation (RAG), tool calling, workflow orchestration, and domain-specific fine-tuning to build applications for specific business processes.

    4. Better adaptability to restricted or unstable networks

      In internal networks, edge environments, or locations with unreliable connectivity, local inference reduces dependence on external network services and can improve service continuity.

    Local deployment also introduces challenges, including insufficient VRAM, inconsistent inference speed, complex model management, and limited concurrency. Model selection should therefore consider four dimensions together: task requirements, hardware resources, deployment method, and service scale.

    2. Define the Task Before Choosing the Model Size

    A larger model is not always a better choice. Increasing parameter count usually means higher storage and VRAM requirements, greater inference costs, and a more complicated deployment process.

    Models can be initially classified into the following groups.

    2.1 Small Models

    Small models can often run on a personal computer, office workstation, or a single consumer-grade GPU. Common use cases include:

    • Text classification
    • Simple summarization
    • Structured information extraction
    • Short-text rewriting
    • Basic question answering
    • Lightweight code completion

    These models consume fewer resources and respond quickly. They are suitable for applications that require fast responses but do not involve highly complex tasks.

    2.2 Medium-Sized Models

    Medium-sized models are better suited to internal enterprise assistants, knowledge-base question answering, document analysis, and code generation. After appropriate quantization, some models can run on a single machine with multiple GPUs.

    This category often provides a practical balance between capability and resource requirements, making it a strong starting point for enterprise deployments. For many real-world applications, validating a medium-sized model first is more reliable than immediately attempting to deploy an extremely large model.

    2.3 Large Models

    Large models generally offer stronger performance in complex reasoning, long-context understanding, multi-turn conversations, and code generation. However, their hardware requirements increase substantially.

    During deployment, VRAM must be reserved not only for model weights but also for runtime cache, input context, output sequences, and concurrent requests.

    For one-time testing, a large model may run on multiple GPUs or cloud computing resources. For a long-running online service, teams must also evaluate throughput, fault recovery, GPU utilization, and operating costs.

    3. Estimating Model Storage Requirements

    The storage required for model weights mainly depends on parameter count and numerical precision. A simple estimate is:

    1. Weight storage ≈ Number of parameters × Bytes per parameter

    The theoretical storage requirements for common formats are approximately:

    • 32-bit floating point: about 4 bytes per parameter
    • 16-bit floating point: about 2 bytes per parameter
    • 8-bit integer: about 1 byte per parameter
    • 4-bit integer: about 0.5 bytes per parameter

    For example, a model with roughly tens of billions of parameters may require tens of gigabytes when stored at 16-bit precision. With 8-bit quantization, its weight files are typically close to half the original size. With 4-bit quantization, storage requirements can be reduced further.

    The theoretical value is not the same as the actual disk footprint. Model files may also include:

    • Model configuration files
    • Tokenizer files
    • Weight indexes
    • Quantization parameters
    • Runtime metadata
    • Multiple versions of the weights
    • Temporary download files

    For this reason, storage should not be allocated based only on the theoretical weight size. Reserve at least an additional 20% to 50% for model conversion, caching, upgrades, and rollback operations.

    4. Why VRAM Requirements Exceed Model File Size

    A common surprise for first-time deployers is that a model file may occupy only a few dozen gigabytes while the running model requires considerably more VRAM. Inference needs more than model weights; it also uses memory for other runtime components.

    Inference VRAM can be roughly represented as:

    1. Total VRAM ≈ Model weights + Activations + KV cache + Framework overhead + Temporary buffers

    4.1 Model Weights

    Weights are the easiest component to estimate. The selected numerical precision directly affects how much memory they consume.

    4.2 KV Cache

    During multi-turn conversations and long-context tasks, the KV cache can become a major source of VRAM consumption. The longer the context and the greater the number of concurrent requests, the more memory the cache requires.

    A rough relationship is:

    1. KV cache usage ∝ Number of layers × Hidden size × Context length × Concurrency

    Therefore, a model may load successfully but still run out of VRAM if the context length is too large or multiple requests are processed simultaneously.

    4.3 Framework and Temporary Overhead

    Inference frameworks typically allocate additional memory for operator execution, tensor conversion, memory alignment, and batching. Actual overhead can vary considerably depending on the framework, hardware, and runtime configuration.

    A machine should not be configured on the assumption that its VRAM only needs to match the size of the model weights. A more practical approach is to reserve sufficient headroom for runtime operations.

    5. Choosing a Quantization Strategy

    Quantization is one of the most common ways to optimize local LLM deployment. It represents model parameters with lower-precision values to reduce storage and VRAM usage.

    5.1 No Quantization

    Running without quantization generally means using a higher-precision format. The main advantage is minimal accuracy loss, which is useful for capability benchmarking, precision comparisons, and high-quality inference.

    The disadvantages are the highest resource consumption and greater requirements for VRAM capacity, GPU count, and memory bandwidth. Unless hardware resources are abundant or output quality is extremely important, this may not be the most economical long-term option.

    5.2 8-Bit Quantization

    8-bit quantization often provides a good balance between resource savings and quality retention. It can significantly reduce VRAM usage while preserving good output quality for many text-generation tasks.

    Typical use cases include:

    • Enterprise knowledge-base question answering
    • Long-form summarization
    • Everyday coding assistance
    • Document classification and extraction
    • Online services that require both quality and speed

    5.3 4-Bit Quantization

    4-bit quantization lowers hardware requirements further, allowing larger models to run in environments with limited VRAM. It is suitable for individual developers, offline workloads, and cost-sensitive applications.

    However, the more aggressively a model is quantized, the more carefully the following issues should be evaluated:

    • Whether complex reasoning performance declines
    • Whether long-form generation remains stable
    • Whether code generation produces more errors
    • Whether domain-specific terminology remains accurate
    • Whether multi-turn conversations show noticeable degradation

    Quantization should not be selected solely by comparing VRAM usage. Build a business-oriented test set and compare accuracy, response speed, and stability across different precision levels.

    6. Build a Resource Evaluation Checklist Before Deployment

    Before downloading and deploying a model, create an evaluation table such as the following:

    Evaluation Area What to Check
    Model scale Parameter count, number of layers, and context length
    Weight format High precision, 16-bit, 8-bit, or 4-bit
    Disk space Weights, cache, temporary files, and backups
    VRAM capacity Per-GPU capacity, GPU count, and interconnect
    System memory Model loading, data preprocessing, and concurrency cache
    Inference target Single-user interaction, batch processing, or online service
    Context length Short questions, long documents, or sustained multi-turn dialogue
    Concurrency Simultaneous requests and peak traffic
    Output priorities Speed, quality, or cost

    Individual developers should generally begin with a small or medium-sized model and a lower-precision version, then verify its performance on real tasks.

    Enterprise users should also conduct load tests covering:

    • Stability during continuous operation
    • Peak concurrency
    • Average response time
    • Time to first token
    • Resource utilization

    7. Choosing Between Single-Machine and Multi-GPU Deployment

    Single Machine, Single GPU

    This option is simple to deploy and inexpensive to maintain. It is suitable for personal experiments and lightweight services. Its limitations include restricted VRAM, fewer large-model options, and generally limited concurrency.

    Single Machine, Multiple GPUs

    Multiple GPUs can be used to split a model across devices, making larger models possible to run. Deployment must account for data-transfer efficiency between GPUs. Otherwise, a system may have enough total VRAM but still deliver poor inference speed.

    Multiple Machines, Multiple GPUs

    This approach is suitable for large models and high-concurrency services, but it requires more advanced networking, scheduling, fault handling, and monitoring.

    Unless there is a clear business requirement and a reliable operations capability, expanding a cluster solely to run a larger model is not recommended.

    8. How to Select the Right Local Model

    The following decision process provides a practical starting point:

    Step 1: Define the task.
    If the main requirements are summarization, classification, or information extraction, an extremely large model may be unnecessary. Consider a larger parameter scale when the workload involves complex reasoning, code generation, or long-document analysis.

    Step 2: Confirm the hardware.
    Record GPU VRAM, system memory, disk capacity, and GPU count. Reserve additional capacity for runtime caching.

    Step 3: Select two or three candidates.
    Choose models with different sizes or quantization levels and test them with the same set of business samples.

    Step 4: Compare four key metrics:

    • Output quality
    • First-response latency
    • Tokens generated per second
    • Stability during peak load

    Step 5: Make the final decision based on actual business costs.
    For low-frequency workloads, a larger model may not be cost-effective. For frequent, sensitive workloads that require consistent response times, a medium-sized local model may offer a better balance of capability and cost.

    9. Conclusion

    There is no single local deployment strategy that works for everyone. Parameter count is only one selection criterion. Actual deployment performance also depends on quantization, context length, concurrency, GPU bandwidth, system memory, and the nature of the application.

    For rapid validation, start with a small or medium-sized model that has modest resource requirements and a mature deployment process. For an enterprise-grade service, focus on model quality, long-context performance, concurrency, data security, and operational capabilities.

    By estimating storage first, evaluating VRAM requirements next, and then running load tests with real business workloads, teams can find a practical balance between model capability and deployment cost.