Hardware Configuration Guide for Local Deployment of 671B-Class MoE LLMs
This article provides a capacity-planning framework for locally deploying 671B-class MoE large models, covering 8-bit full-weight inference, 4-bit quantized deployment, GPU and CPU configurations, CPU-GPU heterogeneous expert caching, and the additional resources required for fine-tuning and training. It explains how to estimate memory and VRAM requirements, derive multi-GPU configurations, validate interconnect and runtime constraints, and use a checklist and example script to support hardware selection.
Local deployment of a 671B-class MoE large model is not only a question of whether you have a GPU card with a large amount of VRAM. The real difficulty comes from the combined constraints of the VRAM wall, the memory wall, the interconnect wall, and operational cost. This article focuses on general technical questions: What configuration is required to run a 671-billion-parameter model at 8-bit precision? How do hardware requirements change if 4-bit quantization is used? What scenarios are suitable for GPU, CPU, and CPU-GPU heterogeneous approaches? How many additional resources must be reserved for fine-tuning and training?
1. Clarifying What “Full-Weight” Means
In engineering contexts, “full-weight” usually means loading and running all model weights at 8-bit precision without using 4-bit or lower-bit quantization to compress the weights. The 8-bit format may be 8-bit integer or 8-bit floating point, depending on the inference framework and hardware support. The key point is that the weight representation remains close to the original precision. Q4 is a quantized deployment mode. Although VRAM and memory requirements drop significantly, it should not be confused with “full-weight 8-bit” inference.
There is a common misconception about MoE architectures: a small number of activated parameters does not mean a small number of weights. During inference, an MoE model activates only some experts, but all expert weights still need to be loaded into VRAM or memory and participate in computation according to routing results. Therefore, capacity estimation should still be based on the total parameter count, not on the number of activated parameters in a single pass.
2. VRAM and Memory Estimation Formula
A conservative capacity estimate can be written as:
M = (P × 4) / (32 / Q) × 1.2
Here, M is the total required memory or VRAM in approximately GiB; P is the model parameter count in billions of parameters; Q is the precision bit width; and 1.2 is a rough redundancy factor covering model copies, context, runtime buffers, and other overhead.
For a model with P = 671:
Q8: M = 671 × 4 / (32 / 8) × 1.2 ≈ 805.2 GiBQ4: M = 671 × 4 / (32 / 4) × 1.2 ≈ 402.6 GiB
It is important to emphasize that this is a conservative upper-bound estimate, not the usable capacity of a production environment. Actual deployment must also account for KV cache, batch size, context length, framework runtime, communication buffers, VRAM fragmentation, fault redundancy, and monitoring reservations. In production, it is advisable to reserve an additional 20%–40% on top of the estimate. If context lengths are very long or concurrency is high, KV cache can grow quickly, and the reserve should be more generous.
3. How to Derive GPU Inference Configurations
A GPU solution should not be based only on a single card model. It should be estimated by “single-card VRAM capacity tier × number of cards per server × number of servers.” The following table provides general configurations for three VRAM tiers: 80GB, 48GB, and 24GB. In the table, “Q8 conservative” means retaining more redundancy; “Q8 compact” means approaching the theoretical upper limit and requiring fine partitioning and lower concurrency; and “Q4” means 4-bit quantized deployment.
| Single-card VRAM tier | Q8 conservative configuration | Q8 compact configuration | Q4 configuration |
|---|---|---|---|
| 80GB | 2 servers with 8 cards each | 1 server with 8 cards + 1 server with 4 cards | 1 server with 6 cards |
| 48GB | 3 servers with 8 cards each | 2 servers with 8 cards each + 1 server with 4 cards | 1 server with 8 cards + 1 server with 2 cards |
| 24GB | 5 servers with 8 cards each | 4 servers with 8 cards each + 1 server with 4 cards | 3 servers with 8 cards each |
This table is a starting point from a capacity perspective, not a directly purchasable conclusion. Before actual deployment, four things must be validated:
- Whether the inter-card interconnect topology supports expert parallelism and all-to-all communication;
- Whether single-server memory bandwidth and cross-server networking match the target throughput;
- Whether the inference framework supports MoE expert partitioning, pipeline parallelism, and efficient batching;
- Whether fault redundancy is sufficient, and whether a single-server failure would make the overall service unavailable.
For inference only, multi-GPU servers with 48GB cards are often easier to fit into a budget than 80GB tiers. However, for full pretraining, iterative tuning, and large-scale training, the value of 80GB tiers and high-speed interconnect increases significantly. In training scenarios, the bottleneck is often not total VRAM but communication bandwidth, parallel efficiency, and stability.
4. CPU Inference and Heterogeneous Expert Caching
The capacity threshold for pure CPU inference can be understood as follows: running Q8 requires at least a dual-socket high-core-count server CPU plus around 1 TiB of memory; running Q4 mainly reduces the memory capacity requirement. However, CPU inference is limited by memory bandwidth, NUMA cross-node access, and parallel efficiency. Token latency and throughput are generally lower than GPU solutions. It is suitable for offline batch processing, low-frequency validation, and cost-sensitive prototypes, but not for online high-concurrency services, and even less for fine-tuning and training.
A more noteworthy approach is CPU-GPU heterogeneous MoE expert caching: leveraging the sparse activation characteristics of MoE, frequently used “hot experts” reside in GPU VRAM, while infrequently used “cold experts” are cached in large-capacity memory, with CPU and GPU collaborating to complete inference. This can support low-cost inference validation with “dual-socket high-core-count CPU + 1 TiB memory + one professional-grade GPU.” This approach is suitable for inference-only scenarios without fine-tuning, but it requires stress testing expert routing locality, cache hit rate, CPU-GPU transfer overhead, and batching strategy. If the hit rate is low and routing is scattered, the advantage of the heterogeneous approach will be offset by transfer overhead.
5. Additional Requirements for Fine-Tuning and Training
The VRAM requirements for parameter-efficient fine-tuning are usually close to those for inference, but additional headroom is still needed for gradients, optimizer states, and activations. Full-parameter fine-tuning often requires 6–10 times the inference VRAM requirement, along with large-scale parallel training, high-speed interconnect, and more complex fault-tolerance mechanisms. For a 671B-class model, full-parameter fine-tuning is not a single-server problem but a cluster engineering problem. If an enterprise’s goal is only to inject domain knowledge, it should first evaluate retrieval-augmented generation, prompt engineering, parameter-efficient fine-tuning, and data governance rather than immediately moving to full-parameter training.
6. Selection Checklist and Example Script
During selection, confirm each of the following items:
- Define the precision target: 8-bit full-weight inference or 4-bit quantized inference;
- Estimate weight capacity, KV cache, framework overhead, and redundancy factor;
- Choose a parallelism strategy: tensor parallelism, pipeline parallelism, expert parallelism, or hybrid parallelism;
- Validate inter-card interconnect, cross-server networking, and storage loading bandwidth;
- Stress test with real context lengths and concurrency rather than relying only on theoretical VRAM;
- Calculate TCO for complete servers, power, data center facilities, operations, and spare parts;
- For heterogeneous solutions, separately validate cache hit rate and tail latency.
Below is a general capacity estimation example script. It is for estimation only and does not replace real stress testing:
import mathdef weight_mem_gib(params_b, q_bits, overhead=1.2):return params_b * 4 / (32 / q_bits) * overheaddef min_cards(required_gib, card_gib, reserve=0.15):usable = card_gib * (1 - reserve)return math.ceil(required_gib / usable)for q in [8, 4]:mem = weight_mem_gib(671, q)print("Q", q, "Estimated capacity GiB:", round(mem, 1))mem_q8 = weight_mem_gib(671, 8)print("Minimum number of 80GB cards:", min_cards(mem_q8, 80))print("Minimum number of 48GB cards:", min_cards(mem_q8, 48))print("Minimum number of 24GB cards:", min_cards(mem_q8, 24))
In summary, the core of local deployment for 671B-class MoE large models is to “calculate capacity by total parameters, calculate communication by parallelism, and choose precision by scenario.” Full-weight 8-bit inference should prioritize multi-GPU servers with 80GB or 48GB VRAM. When the budget is sensitive and the workload is inference-only, CPU large-memory and heterogeneous expert caching approaches can be evaluated. When fine-tuning and training are involved, high-speed interconnect, parallel efficiency, and operational capability must be included in the overall design.
