Full 671B LLM Local Deployment: Memory, GPU, and CPU Config Guide

    This guide explains what a “full” 671B model means, how to estimate memory for Q8 vs Q4, and how to size multi-GPU clusters, CPU-only setups, and fine-tuning budgets without changing the original estimates or conclusions.

    What “full” 671B actually means

    In community usage, a “full” 671B model is the complete ~671 billion-parameter checkpoint, not a distilled or pruned variant. Parameter count alone is not enough. “Full” also usually implies loading and running all parameters at relatively high numeric precision—typically 8-bit quantization (Q8 / INT8 / FP8). Dropping to 4-bit (Q4) can make the model run, but quality loss is often noticeable, so it is not “full” in the strict sense.

    Before sizing hardware, lock two facts:

    1. Scale: 671B is the base for every resource estimate.
    2. Precision: Q8 is the common “full” bar; Q4 is a resource-constrained compromise.

    Each bit of precision roughly halves memory, and quality falls with it. That is a quality-for-resources trade, not a free lunch.

    A conservative memory formula

    A widely used rough estimate is:

    1. M = (P × 4) / (32 / Q) × 1.2
    • M: total RAM/VRAM (GiB)
    • P: parameters in billions (671 for a 671B model)
    • Q: quantization bits (8, 4, …)
    • × 1.2: headroom for a weight copy, KV cache, context, and framework overhead

    The logic: P × 4 treats FP32 (4 bytes per parameter) as the baseline; divide by 32/Q to scale linearly with bits (÷4 for Q8, ÷8 for Q4); 1.2 covers an extra weight copy, KV cache that grows with context, and runtime tensors/fragmentation.

    For 671B:

    1. P = 671 # parameters (billions)
    2. for Q in [8, 4]:
    3. M = (P * 4) / (32 / Q) * 1.2
    4. print(f"Q{Q}: {M:.1f} GiB")

    Results:

    • Q8: ~805.2 GiB
    • Q4: ~402.6 GiB

    This is an optimistic floor. Long context (tens of thousands of tokens) inflates KV cache. Plan another 15–30% on top.

    GPU inference: servers from VRAM SKUs

    805 GiB (Q8) or 403 GiB (Q4) exceeds any single card. Spread the load across multi-GPU, multi-node systems. Using 8-GPU servers as the unit and conservative headroom:

    Overview (8 GPUs per server):

    Per-GPU VRAM Q8 (with headroom) Q8 (tight) Q4
    80 GB class datacenter 2× 8-GPU servers 1× 8-GPU + 1× 4-GPU 1× 6-GPU server
    48 GB class datacenter 3× 8-GPU servers 2× 8-GPU + 1× 4-GPU 1× 8-GPU + 1× 2-GPU
    24 GB class consumer 5× 8-GPU servers 4× 8-GPU + 1× 4-GPU 3× 8-GPU servers

    Notes:

    1. Smaller VRAM means more nodes and more communication. Five 8-GPU 24 GB machines can cover Q8 with headroom, but cross-node traffic slows inference and ops complexity grows.
    2. Tight vs headroom is whether you reserve for long context and concurrent requests. Solo experiments can use the tight layout; shared or multi-request services should use headroom.
    3. Interconnect is a hidden bottleneck. Inference syncs activations and shards often. Datacenter GPUs typically have high-bandwidth GPU interconnect; consumer cards rely on PCIe. Throughput follows that gap.

    Cost: which path is more cost-effective

    For a Q8 target, spend differs a lot:

    • 80 GB class (2× 8-GPU): highest capex (whole servers often in the million-RMB class in the original market context), but top compute, interconnect, and stability—suited to pretraining and heavy iterative work.
    • 48 GB class (3× 8-GPU): mid-range whole-server cost (tens of thousands to hundreds of thousands RMB class in the original context); per-GPU compute is already strong. A solid price/performance pick for inference-only.
    • 24 GB consumer (5× 8-GPU): lowest hardware bill, but many machines, high comms cost, and higher failure rates. Only if budget is extremely tight and slower decode is acceptable.

    Pitfall: a 48 GB datacenter cluster is reasonable for inference, not for large-scale training. Gradient sync needs far more bandwidth than inference. Mid-range and consumer interconnects become the limiter. Full pretrain/continual training/tuning should budget for flagship high-interconnect cards.

    CPU-only: it runs, and that is about it

    No GPU:

    • Q8: at least one dual-socket high-end server CPU generation plus 1 TB+ RAM
    • Q4: roughly half the RAM by the same formula

    Hard limits:

    1. Memory bandwidth. Each decode step reads hundreds of GiB of weights. Even hundreds of GB/s of RAM bandwidth often yields only a few tokens per second.
    2. Weak parallel compute. CPU GEMM is orders of magnitude behind GPUs; no spare capacity for concurrency.
    3. Training is not practical. Fine-tuning or training this scale on CPU is too slow to be useful.

    CPU is for capability checks, very low-frequency offline batches, or a stopgap before GPUs.

    Extra budget if you fine-tune

    • LoRA / low-rank adapters: freeze the backbone; VRAM is roughly inference-like. The GPU layouts above can often be reused.
    • Full-parameter fine-tuning: gradients and optimizer states push VRAM to about 6–10× inference. For 671B Q8 that is multi-TB VRAM—only a top multi-node datacenter cluster.

    Practical takeaway: most vertical tasks are fine with LoRA-class methods. True full-parameter training means cloud burst or dropping to a distilled (non-“full”) size—the same full-vs-cost tradeoff.

    Decision checklist

    1. Pick precision first: Q8 is “full”; Q4 is a compromise.
    2. Floor with M = (P × 4) / (32 / Q) × 1.2, then add for long context and concurrency.
    3. Inference: prefer mid-range datacenter GPU clusters for cost/performance; keep flagship cards for real training needs.
    4. CPU for validation, not production.
    5. Fine-tune with LoRA first; full-parameter FT is an order of magnitude more hardware.

    Local 671B deployment is hardware-first. Configs are hard to unwind cheaply. Validate the stack on a smaller quantized build, then scale. Teams with limited budget or low usage can consider on-demand hosted inference instead of a large one-time cluster. Match load and budget; there is no single correct SKU.