How to Deploy a Full 671B LLM Locally: Hardware Configuration Guide
This guide explains how to run a full 671B parameter model at Q8 precision locally, without pruning, distillation, or sparsification. It covers a memory estimation formula, minimum GPU cluster configurations by per-card VRAM, CPU-only inference limits, memory multipliers for LoRA and full fine-tuning, and cost-effective hardware selection advice.
1. What “Full” Actually Means
Before choosing hardware, the terminology needs to be clear. In this guide, “full” means the model keeps all 671 billion parameters, with no pruning, no distillation, and no sparsification, loaded and run at 8-bit precision (Q8). Anything below that bar, such as a smaller distilled model or a variant with reduced parameter count, is out of scope.
Two concepts are easy to confuse:
- Parameter count (P): measured in billions (1B). For this scenario, P is 671.
- Quantization precision (Q): the number of bits each parameter actually occupies, commonly 8-bit or 4-bit, and sometimes as low as 3-bit or 2-bit.
Parameter count sets the model’s capability ceiling; precision determines its resource footprint. Together they define the input for hardware selection.
2. Estimating VRAM and Memory Usage
A conservative formula is commonly used to derive resource requirements quickly:
M = (P × 4) / (32 / Q) × 1.2
Here M is the required memory capacity in GiB, P is the parameter count in units of 1B, and Q is the precision in bits. The first part, (P × 4) / (32 / Q), gives the theoretical footprint of the weights themselves. The trailing 1.2 is an engineering overhead factor that covers model replicas, KV cache, context windows, framework runtime overhead, and fragmentation.
Plugging in this scenario:
- Q8 precision: about 805 GiB
- Q4 precision: about 403 GiB
Note that 1.2 is only the minimum needed to get the model running. If the context length grows to tens of thousands of tokens and concurrent requests increase, the KV cache expands quickly, and the real factor often needs to rise to 1.5 or higher. For production, plan for 1.5x.
3. GPU Cluster Options by Per-Card VRAM
Multi-GPU inference is constrained mainly by total VRAM capacity and inter-GPU interconnect bandwidth. The minimum viable configurations, grouped by per-card VRAM:
| Per-card VRAM | Q8 precision | Q4 precision |
|---|---|---|
| 80 GiB class | 1 eight-GPU server + 1 four-GPU server | 1 six-GPU server |
| 48 GiB class | 2 eight-GPU servers | 1 eight-GPU + 1 two-GPU server |
| 24 GiB class | 4 eight-GPU + 1 four-GPU servers | 3 eight-GPU servers |
For a more conservative overhead factor of 1.5, everything moves up a tier: 2 eight-GPU servers for the 80 GiB class, 3 eight-GPU servers for the 48 GiB class, and 5 eight-GPU servers for the 24 GiB class.
Three engineering points matter:
- Cross-node communication is the main bottleneck. Multiple GPUs in one machine usually have a high-speed interconnect; across machines you are limited to a conventional network, and tensor parallelism across nodes significantly reduces throughput. Prefer a “multiple GPUs in one machine” topology over “fewer GPUs across multiple machines.”
- Match the parallelism strategy to the topology. Tensor parallelism fits within a single machine; across machines, pipeline parallelism is a better fit, splitting the model by layer to reduce frequent round trips of small messages.
- Stacking 24 GiB-class cards has the worst cost-performance ratio. The more cards, the greater the communication and scheduling overhead. Consider it only when the budget is extremely tight.
4. CPU Inference: Possible but Slow
Without a discrete GPU, the minimum bar for Q8 is a dual-socket server-class processor (mainstream models with 32+ cores and 12-channel memory support) paired with 1 TiB of memory. For Q4, memory can drop to about 512 GiB.
Its limits must be clear:
- Memory bandwidth is the hard constraint. At this model size there is almost no compute headroom, and output speed is typically only single-digit tokens/s.
- All memory channels must be populated; running on a single channel halves the bandwidth.
- CPU inference suits offline batch processing, algorithm validation, and precision alignment, not user-facing online serving.
- Fine-tuning or training on CPU is effectively unusable.
5. Memory Multipliers from Inference to Fine-Tuning and Training
- LoRA-style parameter-efficient fine-tuning: memory demand is on the same order as inference, about 1–1.2x, making it the most realistic option for local customization.
- Full-parameter fine-tuning: requires 6–10x the inference memory, on the order of 4800–8000 GiB at Q8.
- Pre-training from scratch: additionally requires optimizer states, gradients, activations, and high-bandwidth interconnect. A standard Ethernet topology cannot support it; a training cluster with a high-speed interconnect is mandatory.
6. Cost and Selection Advice
A self-built machine typically costs in the hundreds of thousands of yuan as a one-time investment. An eight-GPU server with 48 GiB-class cards is the balance point between “running full Q8” and “keeping the budget under control,” with per-card compute close to a flagship consumer card and clearly better cost-performance than the 80 GiB-class option (whose whole-machine price is often several times higher). For short-term validation, renting cloud GPU instances or using a managed cloud inference service is more economical. If data residency compliance requires data to stay within a defined boundary, self-hosting or a dedicated resource pool from Baidu AI Cloud is the safer choice.
Conclusion: To run full Q8, the minimum is 10 cards of the 80 GiB class, or one dual-socket CPU server with 1 TiB of memory. For cost-performance, choose an eight-GPU server with 48 GiB-class cards. For customization only, LoRA is the most practical path today.
