Hardware Configuration Guide for Running 671B-Class Large Models Locally
This guide explains how to size hardware for local deployment of 671B-class LLMs, focusing on full-parameter, 8-bit, inference-first workloads. It covers weight and KV-cache estimation, pure-GPU and CPU-GPU hybrid configurations, pure-CPU limits, fine-tuning and training requirements, and a validation checklist to complete before purchase.
Hardware Configuration Guide for Running 671B-Class Large Models Locally
Local deployment of a 671B-class large model cannot be reduced to dividing the total parameter count by the memory capacity of a single GPU. Real systems are constrained by model weight capacity, runtime cache, context length, concurrent batch size, quantization precision, parallel communication, storage reads, power and cooling, and software stack support. This article focuses on the core scenario of full parameters, 8-bit precision, and inference-first operation. If the goal is 4-bit quantization, 16-bit original precision, parameter-efficient fine-tuning, or full-parameter training, the hardware requirements will be very different.
1. Define the Boundary Between “Can Run” and “Fully Capable”
Before discussing configuration, it is necessary to break the goal into four questions.
Will all parameters be loaded?
Full parameter loading in this article means that all layers and all experts are loaded completely, without pruning or skipping, and participate in inference. For models using a mixture-of-experts (MoE) architecture, the total parameter count differs from the number of parameters actually activated per token, but full loading still requires memory for all weights.What precision is required?
8-bit inference usually means weights are stored in 8-bit form and may participate in computation or partial computation in that form; it is not equivalent to 16-bit original precision. If full weights at 16-bit precision are required, memory requirements roughly double. 4-bit quantization can significantly lower VRAM and memory thresholds, but it may introduce quality differences compared with 8-bit, so regression testing with business datasets is necessary.Is the goal inference only, or does it include fine-tuning and training?
Inference only needs to load the model and process context. Fine-tuning also requires activations, gradients, optimizer states, and larger training batches. Full-parameter training must further consider high-speed interconnect, checkpoint saving, and long-term stability. These three workloads cannot be estimated with the same configuration.What is the difference between “can run” and “production-ready”?
As long as there is enough memory, loading the model and producing output is not difficult. Production use, however, also requires acceptable first-token latency, sustained output speed, concurrent throughput, P95 latency, memory headroom, and failure recovery. Many configurations can perform inference but are not suitable for production.
2. Estimating Weights and Runtime Cache
2.1 Quick Formula for Weight Capacity
Let the parameter count be P (in billions) and the quantization bit width be Q. Weight capacity can be approximated as:
Weight capacity ≈ P × Q ÷ 8.
Considering quantization metadata, tensor partitioning, runtime replicas, operator workspaces, communication buffers, and preloading space, multiply by a safety factor of 1.15 to 1.3:
Runtime weight capacity ≈ P × Q ÷ 8 × safety factor.
For 671B parameters and a safety factor of 1.2:
- 8-bit precision: approximately 671 × 8 ÷ 8 × 1.2 ≈ 805GB;
- 4-bit precision: approximately 671 × 4 ÷ 8 × 1.2 ≈ 403GB;
- 16-bit precision: approximately 671 × 16 ÷ 8 × 1.2 ≈ 1610GB.
These are engineering planning values, not substitutes for actual testing. Different inference frameworks use different weight quantization methods, expert partitioning strategies, mixed-precision policies, and memory mapping approaches, all of which affect actual usage. In production, it is advisable to reserve another 10% to 20% of headroom, because batching, long context, and concurrent connections consume substantial additional cache.
2.2 KV Cache Cannot Be Ignored
During LLM inference, in addition to weights, attention cache must be stored. A simplified estimate is:
Cache bytes ≈ 2 × layers × KV heads × head dimension × batch size × sequence length × bytes per element.
For example, with 80 layers, 8 KV heads, head dimension 128, batch size 1, context length 32768, and 1 byte per cache element, the cache for a single sequence is approximately:
2 × 80 × 8 × 128 × 32768 ≈ 5GiB.
If context increases to 128K, the cache for a single sequence can grow to about 20GiB; with 8 concurrent sequences, it may exceed 160GiB. If cache elements use 2 bytes, capacity doubles again.
Therefore, a configuration cannot simply match “805GB” exactly in VRAM or memory. Space must be reserved for long context, concurrency, and runtime fluctuations. For 8-bit full-parameter inference, total available memory or VRAM should be planned at at least 900GB to 1TB or more. For 4-bit quantization, plan for at least 450GB to 600GB or more, depending on concurrency and context.
3. Pure-GPU Inference Configuration
The core principle of a pure-GPU solution is to keep all weights and KV cache resident in VRAM as much as possible to achieve lower latency and higher throughput. The table below provides estimates for three common single-GPU memory sizes: 80GB, 48GB, and 24GB. The “theoretical lower bound” counts only weights plus the safety factor, while the “engineering recommendation” accounts for cache, partitioning redundancy, parallel topology, and load fluctuations.
| Precision | Weights plus safety factor | Pure-VRAM theoretical lower bound: 80GB / 48GB / 24GB | Engineering recommendation: 80GB / 48GB / 24GB |
|---|---|---|---|
| 8-bit | About 805GB | 11 cards / 17 cards / 34 cards | 12 to 16 cards / 20 to 24 cards / 36 to 40 cards |
| 4-bit | About 403GB | 6 cards / 9 cards / 17 cards | 8 cards / 10 to 12 cards / 20 to 24 cards |
Several important conclusions:
- 8-bit, 80GB GPU class: Theoretically, about 12 cards can cover weights and some cache. For engineering safety, two 8-GPU nodes or an 8+4 GPU combination, i.e. 12 to 16 cards, is more robust. If concurrency and context are high, prefer 16 cards.
- 8-bit, 48GB GPU class: Typically 20 to 24 cards are needed, forming two 8-GPU nodes plus one 4-GPU node, or three 8-GPU nodes.
- 8-bit, 24GB GPU class: The card count, power consumption, and operational complexity are high. Around 36 to 40 cards are recommended. Although the unit price is lower, total system power, cooling, failure rate, and communication overhead must be carefully evaluated.
- 4-bit, 80GB GPU class: 8 cards is a common starting point, but high concurrency or long context still requires more VRAM or tiered caching.
- 4-bit, 48GB GPU class: 10 to 12 cards is more reasonable. 4-bit, 24GB GPU class: 20 to 24 cards is recommended rather than pushing the 17-card limit.
3.1 Multi-GPU Interconnect Matters More Than Simply Adding Cards
Large-model inference usually requires tensor parallelism, pipeline parallelism, or expert parallelism. The more cards involved, the more complex communication becomes. If inter-GPU interconnect bandwidth is insufficient, compute units will frequently wait for weight and intermediate-result synchronization, resulting in low GPU utilization and poor throughput. During deployment, focus on:
- High-bandwidth intra-node GPU interconnect capability;
- Low-latency networking between nodes;
- Whether the parallel partitioning strategy matches the model’s layer count, attention head count, and expert count;
- Whether VRAM load is balanced across GPUs;
- Whether batching and cache management support continuous batching and dynamic scheduling.
Usually, it is preferable to choose 8-GPU nodes with high-bandwidth GPU interconnect first, and then scale to multiple nodes over a high-bandwidth network. If the model cannot be evenly divided at a specific parallelism degree, simply adding GPUs will not improve performance linearly.
3.2 Host-Side Configuration Still Matters
Pure-GPU inference does not mean the host can be configured arbitrarily. Host memory should be at least 256GB to 512GB for model loading, system cache, data processing, and temporary buffers. Local high-speed storage should be 2TB or more, because 8-bit full weights and multiple checkpoints can easily reach hundreds of GB. Power supply, cooling, and rack weight capacity for multi-GPU servers must also be calculated in advance.
4. CPU-GPU Hybrid Inference: A Lower-Cost Route
For models using a mixture-of-experts architecture, an “expert offloading” approach can be considered: place frequently used or latency-sensitive experts, embedding layers, and attention-related components in GPU memory, while caching other experts in host memory and dynamically swapping them in based on routing results or letting the CPU participate in computation. This can significantly reduce GPU VRAM requirements, but it trades host memory bandwidth and host-to-GPU transfer bandwidth for lower cost.
4.1 Suitable Hardware Combination
A typical low-cost inference combination is:
- Dual high-core-count server CPUs;
- 1TB to 1.5TB host memory for 8-bit weight caching, KV cache, and the operating system; for 4-bit, 512GB to 768GB can be considered, but sufficient headroom is still recommended;
- 1 to 4 large-VRAM professional GPUs for hot experts, attention computation, and cache acceleration;
- A motherboard configuration with high memory channel count, prioritizing memory bandwidth;
- High-speed local storage for fast loading of full weights and log saving;
- Sufficient host-to-GPU interconnect bandwidth to avoid expert swap-in/swap-out becoming a bottleneck.
4.2 Performance and Applicable Scenarios
The advantage of hybrid inference is that hardware cost may be significantly lower than full-VRAM deployment. It is especially suitable for individual developers, small-team validation, low-concurrency internal tools, and offline batch jobs. However, its bottlenecks are also obvious:
- Expert routing is dynamic, and hot experts may differ by question, so stress testing with real business data is required;
- As batch size increases, data movement from memory to VRAM will squeeze latency;
- Long context increases cache usage and the complexity of swapping;
- Inference speed is affected jointly by CPU memory bandwidth, host bus bandwidth, and scheduling policy;
- It is essentially unusable for training or full-parameter fine-tuning.
If the goal is inference only and not high-concurrency online service, this type of solution has practical appeal. If stable SLA is required, a pure-GPU VRAM solution should be prioritized.
5. Pure-CPU Inference: Useful for Validation, Not High Throughput
The main barrier to a pure-CPU solution is memory capacity. For 8-bit full parameters, at least 1TB or more of memory is recommended. For 4-bit, this can be reduced to 512GB to 768GB, but space must still be left for cache, the operating system, and concurrency. CPUs should preferably be multi-socket server platforms with multi-channel memory and high memory bandwidth, rather than being selected only by core count.
The main problems with pure-CPU inference are memory bandwidth and compute bottlenecks. Even if the model can be loaded, sustained output speed may be very low, especially with long context and high concurrency. It is more suitable for:
- One-time validation of model usability;
- Offline batch processing and latency-insensitive tasks;
- Internal experiments where data cannot easily be sent outside and performance requirements are not high;
- Serving as the host-side foundation for a hybrid inference solution.
Pure-CPU platforms are not recommended for large-model fine-tuning or training, because matrix operation volume, memory bandwidth, and parallel efficiency do not match the requirements.
6. Additional Requirements for Fine-Tuning and Training
6.1 Parameter-Efficient Fine-Tuning
If parameter-efficient fine-tuning methods such as low-rank adaptation are used, the base model usually remains frozen and only a small number of adapter parameters are trained. VRAM requirements are generally higher than for pure inference because intermediate activations, optimizer states, and training batch data must also be stored. Even for parameter-efficient fine-tuning, a multi-GPU environment is recommended for 671B-class models, and benchmarking should be performed based on batch size, sequence length, and gradient checkpointing strategy. Mixture-of-experts models may also experience uneven expert load, requiring finer-grained parallelism and caching strategies.
6.2 Full-Parameter Fine-Tuning and Pretraining
Full-parameter fine-tuning or pretraining requires weights, gradients, optimizer states, activations, and communication buffers. Under common mixed-precision training estimates, each parameter may occupy more than ten bytes or even more. For 671B parameters, model states alone may reach the 10TB level, and the scale becomes even larger after adding activations, checkpoints, and parallel redundancy. This is far beyond what a single server can handle. Such tasks require multi-node high-bandwidth clusters, distributed storage, stable power, and comprehensive fault tolerance.
Therefore, if the goal is “run locally for inference,” the configuration focus is memory capacity and bandwidth. If the goal is “perform full training locally,” it should be planned as building a small compute cluster, not estimated as a single-machine GPU purchase.
7. Validation Checklist Before Purchase
Confirm model architecture parameters
This includes layer count, hidden dimension, attention head count, KV head count, expert count, default context length, and maximum context length. Without these data, any VRAM calculation is only a rough range.Confirm quantization format and quality
8-bit, 4-bit, weight-only quantization, and simultaneous weight-and-activation quantization have different runtime footprints and precision impacts. Compare output quality using business samples; do not rely only on theoretical memory.Confirm inference framework support
Check whether the framework supports multi-GPU partitioning, expert parallelism, dynamic batching, long-context cache management, quantized inference, and memory offloading. If framework capabilities are insufficient, even high-end hardware may fail to deliver effective throughput.Run real-load stress tests
Focus on first-token latency, output tokens per second, P95 latency, concurrency, VRAM headroom, host memory headroom, GPU utilization, CPU utilization, and network/bus bandwidth. Test with input and output lengths similar to production, not just a short prompt.Account for storage and loading time
8-bit full weights can reach hundreds of GB. Loading, checkpoint saving, and warm-up time after system restart must all be included. Use high-speed local storage and reserve enough space for logs, cache, and backups.Account for power, cooling, and operational costs
Multi-GPU servers consume significant power. Confirm power distribution, UPS, rack cooling, and long-term operating costs. Although stacking 40 24GB cards may have a lower unit price, total system power, failure points, and maintenance complexity will rise significantly.Verify redundancy and failure recovery
Multi-GPU and multi-node deployments must consider single-GPU failure, single-node failure, cache rebuild, weight reloading, and request retry. For online services, recovery time is often more important than theoretical peak compute.Validate at small scale on general cloud resources first
Before purchasing local hardware, validate on general cloud GPU instances with the same quantization precision, context length, and concurrency to obtain actual throughput and memory curves, then work backward to the local configuration. Cloud validation is not fully equivalent to local deployment, but it can effectively reduce selection risk.
8. Recommendations for Different Requirements
Goal: 8-bit full parameters, high-concurrency inference, sufficient budget
Prioritize two 8-GPU, 80GB-VRAM-class nodes with high-bandwidth GPU interconnect. If budget is limited, start with at least 12 cards and perform strict stress testing. For 48GB VRAM class, 20 to 24 cards are recommended; for 24GB VRAM class, 36 to 40 cards are recommended.Goal: cost-first, low concurrency, internal use
Consider a hybrid inference solution with dual high-core-count CPUs, 1TB to 1.5TB memory, and 1 to 4 large-VRAM GPUs, using mixture-of-experts offloading to reduce VRAM pressure. Validate hit rate and response speed with a real question set.Goal: 4-bit quantization, rapid validation
Eight 80GB GPUs can serve as a starting point; 10 to 12 cards for 48GB VRAM class; 20 to 24 cards for 24GB VRAM class. Pay attention to quality differences between 4-bit and 8-bit models and to framework compatibility.Goal: offline batch processing only
Pure CPU or a CPU-plus-few-GPU hybrid solution can also be considered, but lower throughput must be accepted, and task queues and caching strategies should be designed properly.Goal: parameter-efficient fine-tuning
Add VRAM and training optimization strategies on top of a multi-GPU foundation. Prefer complete machines with high-bandwidth interconnect and avoid training across slow networks.Goal: full-parameter training or pretraining
Do not target single-machine local deployment. Plan for a multi-node compute cluster, high-speed network, distributed storage, and an operations system.
Conclusion
Running a 671B-class large model locally is not about finding a fixed answer. It is about building a verifiable configuration model around precision, context, concurrency, latency, budget, and whether fine-tuning is required. For 8-bit full-parameter inference, the starting point for a full-VRAM route is usually between a dozen and several dozen large-VRAM GPUs, depending on single-GPU memory capacity and safety headroom. Lower-cost routes can take advantage of mixture-of-experts architectures by using large host memory plus a small number of GPUs for expert offloading, but they must accept trade-offs in throughput and latency. Whichever route is chosen, first estimate capacity with the formulas, then stress-test with real workloads, and finally decide the purchase scale.
