Local LLM Deployment: A Practical Guide to Model Selection and Resource Evaluation
This article provides a systematic guide to selecting and evaluating resources for deploying large language models locally. It covers the core drivers for local deployment, methods for calculating VRAM based on parameter size and numerical precision, and the trade-offs of different quantization schemes. Additionally, it explores inference framework choices, deployment types, and storage or network considerations. The article concludes with a practical decision framework for building secure and controllable private inference services within a reasonable budget.
As the capabilities of large language models (LLMs) evolve rapidly, an increasing number of developers and enterprises want to deploy models in local environments to meet demands for data security, compliance auditing, low latency, and cost control. However, the question of “how large a model can run locally” cannot be answered on a whim. It requires a comprehensive trade-off across parameter size, numerical precision, quantization schemes, inference frameworks, and hardware configurations. Based on a real-world resource evaluation of a 100-billion parameter model, this article systematically discusses the selection logic and evaluation methods for local deployment.
1. Why Local LLM Deployment is Needed
Before diving into technical details, it is essential to clarify the core drivers for local deployment:
- Data Privacy and Compliance: Sectors such as finance, healthcare, and government have strict restrictions on data leaving the premises. Local deployment physically eliminates the risk of data outflow.
- Cost Control: For businesses with stable and high-volume inference requests, the long-term cost of pay-as-you-go cloud inference services may exceed a one-time hardware investment.
- Low Latency and High Availability: Intranet deployment avoids the uncertainties of public network transmission, making it more friendly for real-time interactive applications.
- Customization: Local deployment facilitates deep customization, such as fine-tuning, knowledge base enhancement (RAG), and output control.
Of course, local deployment means bearing the costs of hardware procurement, operations, maintenance, and model updates. Therefore, the first step in selection is to clarify what scale of model the business actually requires.
2. Basic Conversion Between Parameter Size and VRAM Usage
The most fundamental calculation for evaluating whether a model can run locally is the VRAM usage of its parameters. The industry-standard estimation formula is:
VRAM usage ≈ Number of parameters × Bytes per parameter
Under different numerical precisions, the number of bytes occupied per parameter is as follows:
| Precision Scheme | Bytes per Param | Theoretical Weight Usage for 110B Model |
|---|---|---|
| FP32 (No quantization, 32-bit float) | 4 bytes | ~440 GB |
| FP16/BF16 (Half precision) | 2 bytes | ~220 GB |
| 8-bit quantization | 1 byte | ~110 GB |
| 4-bit quantization | 0.5 bytes | ~55 GB |
Take a deployment validation of a 100-billion-level (approximately 110B parameter) chat model as an example: in an unquantized scenario loaded with half-precision, the model weights alone require about 220GB of VRAM, which means multiple high-VRAM accelerators are needed for tensor parallelism splitting. With 8-bit quantization, the weight usage is halved to about 110GB, which still requires a multi-GPU environment. 4-bit quantization can compress the weights to around 55GB, which can be accommodated by two 48GB-class accelerators or a single 80GB-class accelerator.
It is crucial to note that weight usage does not equal total VRAM usage. There are several additional overheads during the inference process:
- KV Cache: Autoregressive generation requires caching the intermediate attention results of historical tokens. Its size is proportional to the batch concurrency, context length, number of layers, and hidden dimensions. In long-context, high-concurrency scenarios, the KV Cache can occupy tens of GB of VRAM.
- Activations and Framework Overhead: The inference framework itself, the CUDA context, and temporary buffers typically require a 10% to 20% margin to be reserved.
- Quantization Metadata: Some quantization schemes introduce additional scaling factors and zero-point parameters. Although the footprint is small, it cannot be ignored.
Therefore, the practical experience is to reserve at least a 20% to 30% VRAM margin on top of the theoretical weight usage to avoid out-of-memory (OOM) errors during inference.
3. Quantization Trade-offs: The Triangle of Precision, Performance, and Effectiveness
Quantization is a core method for controlling resource consumption in local deployment, but “lower is not always better”:
- 8-bit quantization: Precision loss is minimal in the vast majority of tasks, and differences in output quality are usually imperceptible to the naked eye. It is the first choice for scenarios with limited resources but a demand for quality. While halving VRAM usage, some hardware can also leverage integer compute units to achieve inference acceleration.
- 4-bit quantization: VRAM is compressed to a quarter of the original, bringing 100-billion-level models into a range manageable by a single or dual card. However, perceptible capability drops may occur in high-difficulty tasks such as complex reasoning, long-chain logic, and code generation. It is recommended to conduct effectiveness regression tests on your core business scenarios before deciding to adopt it.
- Lower-bit quantization (3-bit/2-bit): Currently more in the exploratory stage, with obvious precision loss. It should be carefully evaluated for production environments.
The recommended process when selecting a quantization scheme is: determine the hardware budget ceiling first → reverse-engineer the acceptable precision scheme → conduct effectiveness evaluation with your business’s real sample set → finalize after confirming it meets the quality baseline.
4. Choosing Inference Frameworks and Deployment Types
Local deployment typically has several typical forms:
1. Single-node Multi-GPU Inference
Suitable for medium-sized models (tens of billions of parameters, or post-quantization 100-billion level). The model is split across multiple GPUs via tensor parallelism. Deployment is relatively simple, and operational costs are low. The illustrative startup logic is as follows:
# Pseudo-code example: Multi-GPU tensor parallel inference server startpython -m inference_server \--model-path /data/models/local-llm \--tensor-parallel-size 4 \--quantization int8 \--max-model-len 8192 \--gpu-memory-utilization 0.9
2. Multi-node Distributed Inference
Targeted at ultra-large models that are unquantized or in half-precision. It requires cross-node pipeline parallelism or multi-node tensor parallelism, demands high network bandwidth (high-speed interconnects recommended), and significantly increases deployment complexity.
3. CPU/Consumer-grade GPU Lightweight Inference
For small models in the 7B to 14B range, after 4-bit quantization, they can even run on high-end CPUs or consumer-grade GPUs. This is suitable for individual developer learning, edge scenarios, or low-concurrency internal tools.
At the framework level, it is recommended to choose mature inference engines with active communities that support Continuous Batching, PagedAttention-style VRAM optimization technologies, and mainstream quantization formats. These features often provide several-fold improvements in throughput.
5. Storage and Other Resource Evaluation
Beyond VRAM, a complete deployment evaluation should also cover:
- Disk Storage: The half-precision weight files of a 100-billion-level model exceed 200GB. NVMe solid-state drives are recommended for the download and loading stages to shorten cold start times. If multiple quantized versions of the weights need to be retained, storage planning must be scaled up proportionally.
- System Memory (RAM): Processes such as model loading and weight format conversion usually require system memory equal to or larger than the weight files.
- Network Bandwidth: Pulling model weights for the first time requires high bandwidth. It is recommended to set up an internal model repository for one-time distribution.
- Power and Cooling: Multi-GPU servers running at full inference load consume considerable power. The data center’s power supply and cooling capacity must also be included in the evaluation.
If self-owned hardware is insufficient, you can leverage the general computing and storage capabilities provided by cloud vendors for early-stage resource verification. For example, elastically provisioning multi-GPU instances in the cloud to complete VRAM testing and stress testing under different quantization precisions can significantly reduce trial-and-error costs before deciding on a local hardware procurement plan. Major cloud platforms, such as Baidu AI Cloud, provide general product categories like elastic computing and object storage that can be used for such verification deployments.
6. Summary and Recommendations for Selection Decisions
Synthesizing the above analysis, here is a practical decision framework:
- Define the task first, then the model: Light Q&A and text classification are well-served by 7B to 14B models; complex reasoning and multi-turn dialogue should consider 30B to 70B; consider 100-billion+ models only when pursuing top-tier capabilities and with an adequate budget.
- Calculate VRAM first, then buy hardware: Reverse-calculate the required number of cards using “Number of parameters × Bytes × 1.3 margin”.
- Quantize and verify first, then go to production: Prioritize 8-bit; 4-bit requires effectiveness regression.
- Start with a small-scale pilot, then scale up: Begin stress testing with single concurrency and short contexts, gradually approaching the real load to observe the KV Cache growth curve.
Local LLM deployment has transitioned from being exclusive to a few institutions to an accessible engineering practice for most teams. As long as the resource evaluation is solid and the quantization strategy is appropriate, building a secure and controllable private inference service within a reasonable budget is entirely feasible. We hope that the evaluation methods and practical experiences in this article provide a reference for your deployment decisions.
