Hardware Requirements for Running a Full 671B LLM Locally
This article explains what it takes to run a full 671B parameter model locally, covering the three-tier storage architecture of VRAM, host memory, and NVMe SSD, four practical configuration tiers from feasibility testing to high-concurrency production, key software mechanisms such as weight offloading and paged KV cache, common misconceptions, and a tuning checklist for enterprise on-premise deployment.
1. Define the Problem First: What “Full-Parameter” Actually Means
Before discussing hardware, it is worth clarifying the engineering meaning of a “full” model. The industry generally refers to dense or Mixture-of-Experts (MoE) models with roughly 671 billion parameters as the full version, as opposed to smaller derivatives produced through distillation or pruning. Whether a model counts as full is not about how the API is packaged, but three things: whether all parameter tensors are loaded completely, whether the context window is left untruncated, and whether precision has not been excessively compressed.
The source material mentions running such a model with a single consumer-grade 24GB GPU plus 1TB of system memory. That conclusion is technically valid, but only on the premise that the inference engine supports offloading weights to host memory. Understanding this point matters more than memorizing a specific number.
2. VRAM Is Not the Only Bottleneck: Three Storage Tiers and Bandwidth
Large model inference is essentially moving weights plus matrix multiply-add operations. For a 671B-class model, weight size scales with precision roughly as follows (estimated by bytes per parameter, for capacity planning only):
- FP16/BF16: about 1.34TB
- INT8: about 0.67TB
- INT4 (W4A16): about 0.34TB
No single 24GB card can hold any of these, so a three-tier storage structure is required:
- VRAM tier (HBM): small capacity, high bandwidth (hundreds of GB/s to the TB/s range), holding only the shards and KV cache needed by the current compute unit;
- Host memory tier (DDR): large capacity (hundreds of GB to several TB), moderate bandwidth (tens of GB/s), responsible for pooling weights;
- Local storage tier (NVMe SSD): largest capacity, lowest bandwidth, used for weight persistence and fast swap-in.
Capacity determines whether it can run; bandwidth determines how fast it runs. If weights stay resident in memory and hundreds of gigabytes must be moved into VRAM for every generated token, memory bandwidth becomes the hard ceiling. This also explains why 1TB of system memory is easier to obtain than extremely large VRAM: memory modules are pluggable, redundant, standardized components with linear cost scaling, while accelerator cards with huge VRAM face more constraints in supply, power draw, and data center electrical capacity.
3. Four Practical Configuration Tiers
The tiers below progress from “runs” to “usable” to “comfortable.” All are general engineering ranges, not specific product specifications.
Tier A: Feasibility validation (about 1TB memory + 1–2 consumer cards in the 24GB class)
The goal is to get it running and verify precision alignment. Weights are stored in memory as INT4 and offloaded layer by layer. Expected output speed is on the order of a few tokens/s, suitable for offline batch processing and algorithm validation, not for interactive use.
Tier B: Internal trial (about 1.5TB memory + 4–8 professional cards in the 48GB class)
Weights stay resident in memory, KV cache is kept in VRAM as much as possible, and tensor parallelism is enabled. Speed reaches a usable range, suitable for grayscale trials of internal knowledge Q&A and code assistance.
Tier C: Team production (2TB-class memory + 8 accelerator cards in the 80GB class)
When budget allows, prioritize memory capacity and the number of memory channels first, then ensure inter-card interconnect bandwidth. This tier can support dozens of concurrent requests for regular workloads.
Tier D: High-concurrency production (multiple nodes + high-speed interconnect)
Cross-node tensor/pipeline parallelism, combined with request batching and paged KV management, decouples single-request latency from overall throughput for separate optimization.
4. Key Software Mechanisms: Letting the Model Live in Memory
- Weight offloading: the inference engine moves weights from memory to VRAM layer by layer and releases them immediately after computation, trading capacity for reduced bandwidth pressure.
- Memory-mapped loading (mmap): avoids the peak memory usage and startup jitter caused by reading multi-TB weights into memory all at once.
- Paged KV cache: splits the context cache into fixed-size blocks allocated on demand, significantly reducing fragmentation and improving concurrency capacity.
- Continuous batching: dynamically batches at the request level to improve throughput per unit time.
- Quantization and dequantization: W4A16 stores 4 bits in memory and converts to half precision during computation, a mainstream compromise between capacity and precision.
Illustrative configuration (pseudocode, structure only):
engine = InferenceEngine(model_path="/models/large-671b-int4",weight_dtype="int4", # 4-bit storage in memorycompute_dtype="bfloat16", # dequantized during computationoffload_to_host=True, # pool weights in host memorydevice_map="auto", # automatically map layers across GPUsmax_model_len=32768, # set context length based on remaining VRAMkv_cache="paged", # paged KV cachegpu_memory_utilization=0.90,)
5. Common Misconceptions and a Tuning Checklist
Misconception 1: Looking only at VRAM size. VRAM determines how many shards and how much KV cache a single card can hold; memory determines whether all weights can stay resident. The two cannot substitute for each other.
Misconception 2: Adding GPUs blindly. When inter-card interconnect bandwidth is insufficient, communication overhead eats up the gains from parallelism. Confirm the interconnect topology before choosing a parallelism strategy.
Misconception 3: Ignoring memory channels and NUMA. Multi-socket servers need processes bound to NUMA nodes to avoid cross-node memory access halving bandwidth.
Misconception 4: Maxing out the context. KV cache grows linearly with length, so long context should be budgeted as a separate resource.
Suggested tuning order: quantization precision alignment → memory capacity and channels → inter-card interconnect → parallelism strategy → batching and KV paging → monitoring metrics (throughput, time to first token, VRAM/memory levels).
6. The Enterprise Perspective: Why This Path Is Worth It
The core value of local deployment lies in the compliance and confidentiality advantages of keeping data inside the internal network, shifting inference cost from pay-as-you-go billing to a one-time capital investment, and the room for deeply customized fine-tuning and distillation. The practical recommendation is to start with Tier A to validate the fit between model and business, then scale up tier by tier according to concurrency targets, while retaining elastic cloud resources for peaks to form a hybrid model of “local as the base, cloud for peaks.” With platform capabilities such as compute scheduling, containerized orchestration, and logging, monitoring, and alerting support (for example, the general cloud product categories offered by Baidu AI Cloud), the operational complexity of a local cluster can be significantly reduced.
