Local LLM Deployment: A Practical Guide to Hardware Sizing and Capacity Planning
Plan hardware for local large language model deployment by estimating model weights, KV cache, runtime overhead, and concurrency requirements. This guide explains single- and multi-GPU trade-offs, whole-system sizing, and workload testing to help balance model quality, latency, throughput, and operating costs.
1. Define the Deployment Goals Before Choosing Hardware
A common mistake when building a computer for local LLM deployment is to set a budget, choose an accelerator, and only then consider the model and workload. A better approach reverses that sequence: define the workload, estimate resource requirements, and then select the hardware.
Clarify at least five things:
- Model size and architecture: Will you use a dense model or a mixture-of-experts model? How many parameters does it have, and at what precision will its weights be stored?
- Context requirements: Will typical inputs contain a few hundred tokens, or must the system handle long documents, code repositories, and multi-turn conversations?
- Concurrency targets: Is the system for one person, or must it serve multiple users simultaneously?
- Response requirements: Is time to first token more important, or do you prioritize generation speed for long responses and overall throughput?
- Deployment scope: Will the machine handle inference alone, or also fine-tuning, retrieval, document parsing, and related tasks?
The same model can have very different hardware requirements for single-user, short-context chat and multi-user, long-context serving. Loading the model successfully is only the starting point—not proof that the deployment can meet its operational requirements.
2. GPU Memory Planning: Weights Are Only the Beginning
Estimate Model Weight Storage
Raw model weight storage can be approximated as:
Weight storage ≈ Total parameters × Bytes per parameter
For example, a model with approximately 30 billion parameters requires about 60 GB for raw weights stored at 2 bytes per parameter. With 4-bit quantization, the theoretical raw storage is about 15 GB.
These figures use decimal GB. Hardware specifications and software tools may report memory in different units, so use consistent units when comparing capacity.
This calculation is only an initial estimate. Actual loading may also require memory for:
- Quantization scales, grouping information, and other metadata
- Weights that remain unquantized
- Tensor alignment and memory allocation overhead
- Temporary computation buffers
- Framework runtime state and computation graphs
Theoretical weight storage below the available VRAM does not guarantee stable operation. Quantization also involves trade-offs. Its effects depend on the quantization method, model architecture, and implementation. It can affect output quality and does not necessarily deliver proportional speedups across different hardware.
For Mixture-of-Experts Models, Active Parameters Are Not the Whole Story
Mixture-of-experts, or MoE, models typically activate only some experts for each computation. Their compute requirements per token can therefore be substantially lower than those of dense models with the same total parameter count.
However, two quantities must be distinguished:
- Active parameters primarily determine how many weights participate in the current computation.
- Total parameters primarily determine the storage needed for the complete model weights.
Even when only a few experts are active at a time, the inference system still needs to store the relevant weights if requests may access different experts. Placing some experts in host memory or on other devices introduces additional considerations, including dynamic scheduling, data transfers, and cache hit rates.
For models with hundreds of billions of parameters, local deployment is usually no longer a matter of buying one faster accelerator. It becomes a combined problem of model compression, cross-device partitioning, communication topology, and serving orchestration.
Context Caches Consume Additional VRAM
Autoregressive generation typically stores the keys and values associated with previous tokens to avoid recomputing the entire history at every step. This storage is commonly called the key-value cache, or KV cache.
For common attention architectures, its size can be estimated as:
KV cache bytes ≈ 2 × Layers × KV heads × Head dimension × Total cached tokens × Bytes per element
The factor of 2 accounts for keys and values. This formula applies to common implementations; different attention architectures, compressed caches, or quantized caches require calculations based on their actual implementation.
Consider a model with 32 layers, 8 KV heads, a head dimension of 128, and cache elements stored at 2 bytes each:
- One request with approximately 8,192 cached tokens requires about 1 GiB.
- Eight similar requests maintained simultaneously require about 8 GiB.
These values do not apply to every model, but they illustrate a central point: VRAM requirements grow with context length and concurrency even when model weights remain unchanged.
The total cached token count includes both input tokens and output tokens generated so far. Planning only for input length can underestimate memory requirements for long responses.
Build a Complete Memory Budget
A more practical budgeting equation is:
Required VRAM = Weights + KV cache + Runtime buffers + Communication buffers + Safety margin
Do not apply a fixed safety-margin percentage mechanically. Determine the margin through testing with the target workload. At minimum, tests should cover the longest input, longest output, target concurrency, and a mixture of requests with different lengths.
If loading the model nearly exhausts a GPU’s memory, configuration changes may allow the service to start, but it will likely remain vulnerable to cache shortages, request queues, or allocation failures.
3. Capacity, Bandwidth, and Compute: Bottlenecks Change by Phase
Prefill Performance Affects Time to First Token
During input processing, commonly called prefill, the model computes representations for the entire prompt. Long inputs and large batches can make this phase more compute-intensive, although attention implementations, memory access, and communication also affect the bottleneck.
Time to first token includes more than model execution:
- Request queuing
- Tokenization and preprocessing
- Prefill computation
- Scheduling delays
- Delivery of the first output to the client
A fast first token in a single-user test therefore does not establish that the same configuration is suitable for high-concurrency serving.
Token-by-Token Generation Is Often Bandwidth-Constrained
During decoding, each step produces a small number of tokens while repeatedly accessing model weights and the existing cache. At low batch sizes, GPU memory bandwidth is often an important constraint.
Increasing the batch size can improve reuse of weight reads, but it also consumes more cache memory and may increase per-request latency. The right balance between throughput and responsiveness depends on the workload.
Peak hardware compute specifications describe a theoretical ceiling; they cannot be converted directly into tokens per second. Actual performance also depends on weight precision, cache layout, compute kernels, model architecture, and scheduling.
Compare Performance Only Under Matching Conditions
Hardware comparisons should keep at least the following consistent:
- Model version
- Quantization scheme
- Input and output lengths
- Concurrency
- Software configuration
If one test uses short prompts and another uses long inputs, or one offloads weights while another keeps them entirely in VRAM, the throughput difference cannot be attributed to the accelerator alone.
For purchasing decisions, reproducible workload tests are more useful than performance multipliers published without clear test conditions.
4. Multi-GPU Deployment: More VRAM Does Not Automatically Form One Pool
Define How the Model Will Be Partitioned
Two GPUs with enough combined VRAM do not automatically allow an application to load a model across them. The inference system must support an appropriate distributed strategy.
Common approaches include:
- Tensor parallelism: Splits portions of operations across devices and requires frequent synchronization and communication.
- Pipeline parallelism: Distributes model layers across devices; performance depends on stage balance and scheduling.
- Expert parallelism: Places different experts on different devices, requiring token dispatch and result aggregation.
- Replica parallelism: Runs a complete model on each device or device group. This expands serving throughput but does not solve the problem of fitting a single model into memory.
These approaches can be combined, but doing so increases deployment and operational complexity.
Communication Topology Determines Multi-GPU Efficiency
Multi-GPU planning requires more than counting expansion slots. Check:
- The motherboard’s actual lane availability
- The electrical link width of each slot
- Whether devices support efficient peer-to-peer transfers
- Device and memory locality in multi-processor systems
- Chassis space, power connectors, and cooling
Some motherboards provide several full-length slots with different bandwidths. For communication-heavy workloads, slower inter-device transfers can offset the benefits of adding accelerators.
Several smaller-memory GPUs and fewer larger-memory GPUs should therefore not be compared on total capacity alone. Communication overhead, failure handling, power consumption, and maintenance costs also matter.
5. Size the Whole System, Not Just the GPUs
CPU: Match the Processor to Its Responsibilities
The CPU typically handles tokenization, request scheduling, preprocessing, and service management. If the model runs primarily on accelerators, pursuing the highest possible core count may provide little value.
However, CPU and memory-subsystem performance become more important when the same machine also handles document parsing, retrieval, embedding computation, or weight offloading.
Evaluate multitasking capability, memory bandwidth, available I/O lanes, and accelerator connectivity rather than comparing clock speed alone.
Host Memory: Account for Loading and Supporting Services
System RAM must accommodate the operating system, application services, model-loading buffers, retrieval data, and any offloaded weights.
Some loading processes retain additional weight copies in RAM, while others support incremental loading. Their peak memory requirements can differ substantially. A rule such as “system RAM must be several times GPU memory” is therefore not universally appropriate.
Host memory can technically compensate for limited VRAM, but transfer bandwidth and access latency usually constrain inference speed. Treat offloading as a tested compromise rather than the default configuration for high performance.
Storage: Focus on Loading and Data Processing
Storage capacity should cover model files, different quantized versions, application data, logs, and rollback files. Testing several models can significantly increase disk requirements.
Fast solid-state storage mainly improves model loading, version switching, and data access. Once model weights reside in VRAM, faster storage usually does not produce a proportional improvement in sustained generation speed.
If inference frequently reads weights from disk, evaluate that latency separately. Storage offloading should not be treated as equivalent to adding VRAM.
Power and Cooling: Design for Sustained Load
The power supply must support the sustained consumption of the accelerators, CPU, and other components, with reasonable headroom. Confirm connector specifications, cable capacity, and chassis compatibility.
Long-running inference differs from a brief benchmark. Inadequate cooling can cause throttling, performance instability, or interrupted jobs. Multi-GPU systems require particular attention to blocked airflow and hot-air recirculation.
Business deployments should also account for ambient temperature, noise limits, hardware maintenance, and fault alerts. Stable operation often matters more than short-lived peak performance.
6. Choose a Configuration Path for the Use Case
Personal Learning and Lightweight Development
Start with a model that fits entirely on one GPU, then validate it with short contexts and low concurrency.
Prioritize usability, power consumption, noise, and configuration simplicity. Before committing to a very large model that depends on slow offloading, test whether a smaller model meets the task’s quality requirements.
Professional Development and Long-Document Processing
Reserve sufficient cache capacity beyond the model weights. Larger VRAM is valuable not only because it can hold larger models, but also because it reduces resource contention, supports longer inputs, and leaves scheduling headroom.
If workloads frequently include complete source files or multi-turn tool interactions, use representative inputs for testing. Short-chat benchmarks are not a sound basis for purchasing decisions.
Internal Services for Small Teams
Focus on concurrency, queuing, and resource isolation. When a model fits on one GPU, multiple independent replicas may be easier to operate than complex model partitioning. If it does not fit, validate the communication costs of the multi-GPU approach.
Set limits on input length, output length, and concurrency to prevent a few exceptionally long requests from exhausting the cache and affecting every user.
Production Serving for Very Large Models
Treat this as server systems engineering rather than a desktop upgrade. Beyond capacity and throughput, account for monitoring, failure recovery, version rollback, access control, and data security.
Business evaluations should determine whether a very large model is necessary. If a smaller model combined with retrieval and workflow constraints already meets requirements, increasing parameter count may only add cost and maintenance complexity.
7. Validate with Real Workloads Before Purchasing
Use the following testing sequence.
Step 1: Verify Model Loading
Record model load time, peak host memory usage, baseline VRAM usage, and whether any implicit offloading occurs.
Step 2: Test Individual Requests
Test short and long inputs as well as short and long outputs. Record time to first token, generation speed, and total response time.
Step 3: Increase Concurrency Gradually
Monitor system throughput, queue time, cache usage, and failure rate. Do not optimize only for the highest throughput figure; confirm that user waiting times remain acceptable.
Step 4: Run Mixed Workloads
Submit requests of different lengths together and run the system long enough to observe temperature, power consumption, memory growth, and performance variability.
Step 5: Evaluate Quality and Total Cost
Recheck task accuracy after quantization. Include hardware, electricity, maintenance, and downtime in the cost assessment.
Record both median and high-percentile latency. Acceptable average response times do not guarantee a consistently good user experience.
8. Final Selection Principles
Local LLM hardware planning follows a clear decision chain:
Task quality requirements → Model and precision → Weight and cache budget → Single- or multi-GPU design → Whole-system resources → Real-workload validation
For personal use, prioritize keeping the complete model on one GPU and delivering stable responses. For team services, focus on concurrent cache demand, queuing, and failure recovery. For very large models, give communication and system architecture as much attention as VRAM capacity.
The right configuration is not the one with the strongest specification sheet. It is the one that consistently meets quality, latency, and cost requirements at the intended input length, output length, and concurrency.
