Local Deployment of a Full 671B-Parameter LLM: Complete Hardware Configuration Guide

    This article explains how to plan hardware for locally deploying a full 671B-parameter large language model. It defines what “full deployment” means, provides a conservative memory estimation formula, compares GPU configurations at 80GB, 48GB, and 24GB VRAM per card, covers CPU-only inference limitations, discusses cost and training versus inference trade-offs, and outlines VRAM requirements for LoRA and full fine-tuning. The goal is to help readers choose a configuration based on precision, workload, and total cost.

    1. First, Define “Full Deployment”

    In the community, running a 671B-parameter model “fully” usually means loading all parameters at 8-bit (Q8) precision for inference. Why emphasize precision? Because the number of precision bits directly determines the storage and VRAM/RAM footprint of the model weights. The same model at different quantization precisions can have hardware requirements that differ by several times.

    Understanding this is the first step in hardware planning: parameter count × precision bits = baseline memory requirement, plus other overhead during inference.

    2. Memory Requirement Estimate: A Practical Conservative Formula

    A rough but sufficiently conservative estimation formula commonly used in the industry is:

    1. M = (P × 4) / (32 / Q) × 1.2

    Where:

    • M: required memory (GiB)
    • P: model parameter count (in units of 1B; for a 671B model, P = 671)
    • Q: quantization precision bits (e.g., 8 or 4)
    • 1.2: redundancy factor covering model copies, KV Cache (context cache), framework runtime, and other extra overhead

    Substituting the 671B parameter count:

    • Q8 (8-bit precision): M = (671 × 4) / (32/8) × 1.2 ≈ 805.2 GiB
    • Q4 (4-bit precision): M = (671 × 4) / (32/4) × 1.2 ≈ 402.6 GiB

    The value of this formula is that it is conservative: it roughly accounts for context length, concurrent requests, and framework overhead. In actual deployment, if the context window is long or concurrency is high, KV Cache usage will grow further, so reserving redundancy is very necessary.

    3. GPU Inference Configurations: Combining Servers by VRAM Spec

    With the memory requirement in hand, the next step is to choose a GPU configuration. The core idea is: single-card VRAM × number of cards ≥ total required VRAM, with redundancy reserved. Below are typical configurations for three common VRAM specs (VRAM specs are general hardware parameters and are not specific to any vendor):

    1. 80GB VRAM per card (data center high-end cards)

    • Q8 (with redundancy): about 2 8-GPU servers (16 cards × 80GB = 1280GB, ample redundancy)
    • Q8 (compact configuration): 1 8-GPU server + 1 4-GPU server (12 cards × 80GB = 960GB)
    • Q4: 1 6-GPU server is sufficient (480GB ≥ 402.6GB)

    2. 48GB VRAM per card (professional cards)

    • Q8 (with redundancy): 3 8-GPU servers (24 cards × 48GB = 1152GB)
    • Q8 (compact configuration): 2 8-GPU servers + 1 4-GPU server (20 cards × 48GB = 960GB)
    • Q4: 1 8-GPU server + 1 2-GPU server (10 cards × 48GB = 480GB)

    3. 24GB VRAM per card (consumer flagship cards)

    • Q8 (with redundancy): 5 8-GPU servers (40 cards × 24GB = 960GB)
    • Q8 (compact configuration): 4 8-GPU servers + 1 4-GPU server (36 cards × 24GB = 864GB)
    • Q4: 3 8-GPU servers (24 cards × 24GB = 576GB)

    A clear pattern emerges: the smaller the VRAM per card, the more cards and servers are required, and the complexity and failure surface of cross-machine communication also increase. Configurations that fit into a single machine with multiple GPUs are significantly easier to operate and have lower requirements for high-speed multi-card interconnect.

    4. CPU Inference: Lower Barrier but Limited Experience

    If the budget is limited, CPU inference is a path that can “get it running”:

    • Q8: at least a dual-socket high-end server CPU (e.g., new-generation EPYC class) + 1TB RAM in one server
    • Q4: same architecture, with memory reduced to about 512GB

    However, three hard limitations of CPU configurations must be clearly recognized:

    1. Memory bandwidth bottleneck: LLM inference is a typical memory-bound task. GPU HBM bandwidth is several times or even more than ten times that of CPU multi-channel memory, so CPU inference will be very slow.
    2. Insufficient parallel compute: even if the memory requirement is barely met, there is almost no spare compute capacity to support long contexts or concurrent requests.
    3. Completely unsuitable for training: using CPUs for fine-tuning and training is basically not practical; it can only serve as the lowest-cost attempt at pure inference.

    Conclusion: CPU configurations are suitable for validation, experiments, or scenarios that are extremely insensitive to latency. For serious production services, return to GPU configurations.

    5. Cost and Cost-Effectiveness Trade-offs

    From a pure procurement cost perspective, building an 8-GPU server around 48GB VRAM professional cards costs approximately RMB 350,000–400,000 per server. Per-card compute can be comparable to consumer flagship cards, making this a cost-effective route for Q8/Q4 inference. For 80GB-class data center high-end cards, the total cost of an 8-GPU server is often over RMB 1.5 million.

    But cost-effectiveness is not the only dimension. There is a key boundary:

    • Inference only: a 48GB VRAM card cluster is fully sufficient and offers the best cost-effectiveness.
    • Full pretraining, large-scale iteration, and tuning are required: at large cluster scale, the communication bandwidth of lower-spec cards becomes a clear bottleneck, and multi-machine multi-GPU scaling efficiency drops. In this case, it is necessary to return to 80GB-class data center cards; their high-speed interconnect (such as NVLink-class card-to-card high-speed channels) is the guarantee for training throughput.

    In short: inference depends on total VRAM and cost, while training depends on interconnect bandwidth and compute specifications. Before selecting hardware, clarify the boundaries of your workload.

    6. VRAM Requirements for Fine-Tuning

    If there is a “specialized training” requirement after deployment, VRAM estimation must be treated separately:

    • LoRA fine-tuning: only low-rank adapter matrices are trained, while backbone parameters are frozen. VRAM requirements are close to inference, so the inference configuration planning above can be reused.
    • Full-parameter fine-tuning: gradients, optimizer states (such as momentum and second moments), and activations must be stored. VRAM requirements are usually 6–10 times those of inference. For a 671B model, this means that even at Q4 precision, several TB of effective VRAM is required. This can only be achieved with large-scale clusters plus various memory optimization techniques (such as ZeRO partitioning, gradient checkpointing, and CPU/NVMe offloading).

    7. Summary

    The decision path for local deployment of a 671B-class LLM can be summarized in four steps:

    1. Define precision: Q8 pursues quality, while Q4 trades for half the hardware cost.
    2. Calculate memory: use the conservative formula; Q8 is about 805 GiB, and Q4 is about 403 GiB.
    3. Choose an approach: for GPU inference, combine servers by VRAM spec; CPU is only for lowest-cost validation.
    4. Distinguish workloads: pure inference can choose the cost-effective route, while training requires data center cards and high-speed interconnect.

    Hardware is only a one-time investment. Inference speed, concurrency capability, and future scalability also determine total cost of ownership. Before formal procurement, it is advisable to validate the inference framework and networking plan with smaller models, then scale gradually, avoiding paying for either redundant or insufficient configurations.