Local LLM Deployment: A Practical Guide to Hardware Sizing and Quantization
Running large language models on your own hardware has moved from a niche experiment to a real requirement for many developers and teams. This guide walks through the practical side of local LLM deployment: how to find and choose open-source models, how to determine whether your hardware is actually sufficient, how to estimate GPU memory needs with a simple formula, and how quantization lets you fit larger models on limited hardware. You will learn why VRAM capacity is usually the first constraint, what overhead to reserve beyond model weights, and how to pick the right precision and inference setup to get a model running locally.
1. Why more people are deploying LLMs locally
Running large language models on your own machine has gone from a niche experiment to a practical requirement for many developers and teams. Four main drivers sit behind this shift:
- Data privacy: For workloads that involve internal documents, code, or customer data, teams often prefer to keep data from flowing out to external services.
- Cost control: When call volume is steady and large, a one-time hardware investment can be more economical than paying for usage over the long term.
- Low latency and controllability: Local inference removes network round trips, delivers more consistent response times, and is not subject to external rate limits or service shutdowns.
- Customization and offline operation: You can fine-tune for a specific domain and run entirely in air-gapped, network-free environments.
That said, local deployment is not as simple as “download a model file and run it.” At its core, it is an engineering problem of balancing three things: your hardware budget, model capability, and inference quality. Before answering “what can I run locally,” two questions need to be settled first: where to get the model, and how to judge whether your hardware is enough.
2. Where to find suitable open-source models
Today’s mainstream open-source model hubs can be roughly understood as “code repositories for AI developers.” They host not only model weights but also accompanying datasets, inference and training libraries, and usage documentation. Almost every newly released open-source model is synced to these platforms shortly after launch, covering text, image, audio, multimodal, reinforcement learning, and other tasks.
Understanding model naming is equally important. A typical model name is usually made up of three parts: series name + version number + parameter count. For example, a name like xxx-6b generally refers to a particular version within that series with roughly 6 billion parameters; suffixes such as 8b, 13b, and 70b correspond to 8 billion, 13 billion, and 70 billion parameters respectively. The larger the parameter count, the stronger the model’s potential capability, but the higher the hardware requirements climb as well. This leads directly to the next core question.
3. The core question: is your hardware actually enough?
3.1 GPU memory is the first constraint
For GPU inference, the primary indicator that decides “can it run” is GPU memory (VRAM) capacity. A rough but practical rule of thumb: as long as your local GPU’s VRAM can meet the model’s memory requirements, you can basically complete the deployment; if VRAM is insufficient, the model cannot be fully loaded, and inference is out of the question. So before picking a model, the first thing you must do is find out the VRAM ceiling of your GPU.
3.2 A formula for estimating memory usage
Without any quantization technique, and with model weights loaded at FP16/BF16 precision, you can use a very practical rule of thumb to quickly estimate memory requirements:
Model VRAM (GB) ≈ Parameters (B) × 2
The logic behind this “×2” is straightforward: one FP16/BF16 parameter occupies 2 bytes. So:
- 6B model: about 6 × 2 = 12 GB VRAM;
- 13B model: about 13 × 2 = 26 GB VRAM;
- 70B model: about 70 × 2 = 140 GB VRAM.
As you can see, a 70-billion-parameter model needs 140 GB of VRAM for the weights alone. That already exceeds the capacity of most single consumer-grade GPUs and often requires multi-GPU parallelism or quantization. This is often the “surprise” people encounter when they first get into LLM deployment: what actually holds you back is not compute, but VRAM capacity.
3.3 Easily overlooked overhead
The formula above only counts the model weights themselves. In a real deployment, VRAM is also home to several “hidden tenants” that must be accounted for:
- KV cache: The key-value tensors cached to preserve historical context during inference. These grow with context length and concurrency, and in long-context scenarios can take up a great deal of memory.
- Activations and intermediate tensors: Temporary data produced during the forward pass.
- Framework and runtime overhead: The inference framework itself, the CUDA context, memory fragmentation, and so on.
- Batch concurrency: If you serve multiple requests at once (batching), memory demand can multiply.
So the safer engineering practice is to reserve an additional 20%–40% or more on top of the weight estimate from the formula, to accommodate these overheads.
3.4 Beyond VRAM: compute, bandwidth, and other memory
VRAM capacity is only one gate. Actual inference speed also depends on two more factors:
- Memory bandwidth: The decode stage of large models is a “memory-bound” task. Every generated token requires moving the massive weights from VRAM to the compute units, so bandwidth often matters more than raw compute for single-request token generation speed.
- Compute (FP16/BF16 throughput): This affects the prefill stage that processes long inputs, as well as overall throughput.
If you have no discrete GPU locally, you can fall back to CPU inference. In that case, the core metrics shift to system memory capacity and memory bandwidth. Devices with a unified memory architecture can let the CPU and GPU share the same memory pool, allowing larger-parameter models to run against a bigger pool of memory.
4. Quantization: trading precision for space
When VRAM is not enough to load the full model at FP16, quantization becomes almost mandatory.
4.1 The basic idea of quantization
The core idea of quantization is to reduce the number of bits each parameter occupies, approximating the original weights with lower numerical precision. After precision is reduced, VRAM usage drops roughly in proportion, though output quality may suffer a slight loss. By replacing the coefficient in the formula with “bytes per parameter,” you can quickly estimate post-quantization VRAM:
| Precision | Bytes per parameter | VRAM estimate (GB) ≈ Params (B) × factor | 70B model example |
|---|---|---|---|
| FP16/BF16 | 2 | × 2 | ~140 GB |
| INT8 (8-bit) | 1 | × 1 | ~70 GB |
| INT4 (4-bit) | 0.5 | × 0.5 | ~35 GB |
This table shows the power of quantization at a glance: the same 70-billion-parameter model drops from 140 GB at FP16 to about 35 GB at 4-bit, making it possible to run on more consumer-grade or single-GPU setups.
4.2 Precision tradeoffs: lower isn’t always better
The lower the quantization precision, the more VRAM you save and often the faster you run, but the greater the risk of quality degradation. 8-bit quantization generally preserves the original precision well and serves as the balance point between quality and resources. 4-bit quantization saves VRAM substantially, and on most tasks the quality loss remains within an acceptable range, making it the mainstream choice for local deployment today. More aggressive low-bit quantization needs to be evaluated empirically on your specific task to avoid noticeable semantic degradation.
4.3 Two dimensions of quantization
Understanding quantization can start from two angles:
- By timing: Post-training quantization (PTQ) compresses the weights directly after the model has finished training, with no retraining required, which is deployment-friendly. Quantization-aware training (QAT) simulates quantization error during the training phase, yielding higher accuracy at a greater cost.
- By object: Weight-only quantization is simple to implement and has a direct effect on saving VRAM. Schemes that quantize both weights and activations are theoretically more efficient, but more complex to engineer.
For the vast majority of developers who just want to “get it running,” choosing a ready-made post-training quantized version is the most convenient and practical path.
5. Inference acceleration and getting to deployment
Once you’ve selected the model, secured the VRAM, and settled on a quantization precision, the deployment stage usually relies on an inference framework to handle loading and acceleration. The value of such frameworks lies in packaging the tedious work of efficient weight loading, KV cache management, and batch scheduling, so you can start a service with only a small amount of configuration.
A few general optimization directions worth knowing:
- Paged KV cache management: Splitting the cache into small blocks allocated on demand, significantly reducing memory fragmentation and improving concurrency.
- Continuous batching: Dynamically batching multiple requests together to improve GPU utilization and overall throughput.
- Speculative decoding: Using a small model as a drafter plus a large model for verification to speed up generation while maintaining quality.
A typical deployment decision flow can be summarized as follows:
- Define the task and your quality floor, and determine the acceptable quantization precision.
- Use the estimation formula to calculate weight VRAM at the target precision, then add a 20%–40% margin.
- Check feasibility against your local hardware (VRAM, bandwidth, memory), and if necessary, reduce the parameter count or increase the level of quantization.
- Choose an inference framework; first verify correctness with a single request, then stress-test VRAM peaks under concurrency and long context.
- Based on measured token generation speed and VRAM usage, fine-tune context length, batch size, and quantization configuration.
6. Conclusion
Deploying LLMs locally is essentially a process of “constraint solving around VRAM.” First estimate weight usage by multiplying the parameter count by bytes per parameter, then reserve headroom for the KV cache and runtime overhead, and finally use quantization to strike a balance between quality and resources. This method applies to almost every open-source model selection. Once you grasp this main thread — hardware sets the ceiling, the formula does the estimation, quantization closes the gap, and the framework improves efficiency — you can quickly judge what your machine can actually run, and how to run it well, even when faced with a vast range of models with different parameter counts and precisions.
