Local LLM Deployment Guide: Model Selection and Hardware Planning
This guide offers a practical method for choosing and sizing a large language model for local deployment. It covers how to match model size to your use case, verify model files, estimate GPU memory with quantization, and test performance through load testing and service deployment.
Successful local deployment depends on fit, not raw size. The right model size and quantization strategy should match your use case, hardware, budget, and compliance requirements. Chasing the largest parameter count or the top leaderboard rank often leads to poor results on real workloads.
The original question, “Which large models can be deployed locally?”, is best answered with a reusable selection process. Start by defining the task type and quality requirements. Then inventory your GPU memory, system RAM, disk space, and multi-GPU setup. Finally, validate feasibility through quantization, load testing, and service deployment. The sections below cover model sourcing, hardware estimation, model tiers, engineering practices, and common mistakes.
1. Build a Selection Framework: Work Backward from the Use Case
Local deployments usually fall into three scenario types: lightweight text processing, general chat and knowledge Q&A, and high-quality generation with complex reasoning. Each type has very different requirements for parameter size.
- Lightweight tasks: Text classification, information extraction, simple summarization, and edge-device Q&A can usually start at the 1B to 3B parameter range. These models need less GPU memory, can run on a CPU or a low-VRAM GPU, and keep response time and cost easier to control.
- General tasks: Multi-turn chat, document Q&A, code assistance, and customer support assistants are usually more balanced at 7B to 14B parameters. After 4-bit quantization, these models are practical on a personal workstation or a single GPU.
- High-quality tasks: Complex reasoning, long-form generation, multi-document analysis, and specialized domain Q&A may call for 30B to 70B parameters or larger. These models often require multiple GPUs, more system memory, and stricter inference optimization.
Parameter count is only a starting point. Context length, vocabulary size, number of layers, attention structure, quantization method, and batch concurrency all affect actual memory use and throughput. Define your acceptable time to first token, generation speed, concurrency, and answer quality first. Then work backward to the model tier.
2. Model Sourcing: Neutral Channels and Verification Steps
Obtain locally deployable models from official release channels, model hosting communities, enterprise model repositories, or compliant mirror sites. These should provide the weights, configuration files, and documentation. Regardless of the source, complete the following checks:
- Version and hash verification: Confirm that the model files are complete and have not been corrupted or tampered with.
- License and compliance: Confirm whether the license allows commercial use, redistribution, private deployment, and domain fine-tuning.
- Dependencies and runtime requirements: Check the inference runtime, numeric precision format, quantized version, and minimum hardware requirements.
- Documentation completeness: Review the model card, configuration notes, evaluation scope, and known limitations. Avoid using a general-purpose model directly in high-risk scenarios.
Do not decide based only on “latest release.” New models may lack mature runtime support, have incomplete quantized versions, or depend on unstable toolchains. For production, choose a model version with clear versioning, broad community validation, and long-term maintenance.
3. Hardware Estimation: VRAM Formula and Quantization Adjustment
Without quantization, a common rough estimate for model weight memory is:
Model weight memory (GB) ≈ model parameters (B) × bytes per parameterFP16/BF16: about 2 bytes per parameter, so params (B) × 2 GBINT8: about 1 byte per parameter, so params (B) × 1 GBINT4: about 0.5 bytes per parameter, so params (B) × 0.5 GB
For example, a 7B model needs about 14 GB of weights in FP16, 7 GB in INT8, and 3.5 GB in INT4. A 13B model needs about 26 GB, 13 GB, and 6.5 GB, respectively. A 70B model needs about 140 GB, 70 GB, and 35 GB. Actual VRAM use is much higher than the weights alone, so add the KV cache, activation buffers, runtime overhead, and batch headroom. You can use the following pseudocode for a first-pass estimate:
def estimate_vram_gb(params_b, bytes_per_param, kv_factor, context_len, batch, overhead_ratio):weights = params_b * bytes_per_paramkv_cache = kv_factor * context_len * batchtotal = (weights + kv_cache) * (1 + overhead_ratio)return total# bytes_per_param: about 2 for FP16, 1 for INT8, 0.5 for INT4# Determine kv_factor from the model's layer count, hidden dimension, and attention heads,# either by measurement or by using the figures in the model documentation
In engineering terms, several factors matter. The KV cache grows linearly with context length. Higher batch concurrency increases both VRAM use and latency, so long-context workloads need extra headroom. Model loading, format conversion, and quantized copies all consume disk and system memory. As a rough guide, reserve at least 2 to 3 times the model file size in disk space, and at least 1.5 to 2 times the weight size in system RAM for loading, conversion, and caching.
4. Model Tiers by Hardware Class
The table below gives general estimates. Actual figures depend on the model architecture, quantized version, context length, and inference runtime.
| Parameter tier | FP16 weights (est.) | INT4 weights (est.) | Estimated inference VRAM | Typical use cases |
|---|---|---|---|---|
| 1B–3B | 2–6 GB | 0.5–1.5 GB | 4–8 GB or CPU | Lightweight classification, extraction, edge Q&A |
| 7B–8B | 14–16 GB | 3.5–4 GB | 8–12 GB workable, 16 GB more stable | General chat, document Q&A, code assistance |
| 13B–14B | 26–28 GB | 6.5–7 GB | 16–24 GB | Complex Q&A, multi-turn tasks, domain assistants |
| 30B–34B | 60–68 GB | 15–17 GB | 24–48 GB | High-quality generation, complex analysis |
| About 70B | About 140 GB | About 35 GB | 48–80 GB across multiple GPUs | Demanding generation, enterprise-scale inference |
With 8 to 12 GB of VRAM, individual developers can start by evaluating 4-bit quantized 7B to 8B models, but should accept some accuracy loss and limited context length. With 16 to 24 GB, a single GPU can run quantized 7B to 14B models, which suits development and validation. With 24 to 48 GB, 30B-class quantized models become a realistic option. 70B-class models usually require multi-GPU parallelism and a more complete inference serving setup.
For enterprise scenarios, Baidu AI Cloud offers general-purpose product categories, such as object storage, container platforms, log services, and monitoring and alerting. These can support model file management, inference service orchestration, and observability. Check the official documentation for specifications and current capabilities.
5. Engineering Deployment: Serving, Load Testing, and Security
A local deployment is not finished once a single inference call works. Production readiness includes inference service packaging, authentication and rate limiting, request queuing, batching, audit logging, VRAM and latency monitoring, model version management, gradual rollout, and rollback procedures. Start with a small-traffic load test to measure time to first token, generation speed, concurrent throughput, and peak VRAM use. Then decide whether to enable continuous batching, multi-GPU parallelism, or quantization acceleration. For knowledge Q&A, retrieval-augmented generation (RAG) can connect private knowledge to vector or keyword retrieval, which reduces the risk of hallucinated answers.
For security and compliance, verify where model files come from, control access permissions, sanitize inputs and outputs, keep audit trails, and filter sensitive content. When handling enterprise data, use a private network, least-privilege access, and encrypted storage.
Common mistakes to avoid include the following:
- Looking only at parameter count and ignoring context length and concurrency.
- Counting model weights but forgetting the KV cache.
- Over-quantizing and losing too much output quality.
- Launching to production without load testing.
- Overlooking model licenses and data compliance.
The recommended selection workflow is: define the use case, inventory hardware, screen model size, evaluate quantization, run load tests, and roll out gradually.
