How Much Hardware Does It Take to Run the Full 671B LLM Locally?
A practical, hardware-first guide to running a full, undiminished 671B-parameter large language model on your own machines. It explains why memory capacity—not raw compute—is the deciding constraint, works through VRAM estimation formulas and the often-overlooked KV cache, lays out GPU plans across 80/48/24 GiB card tiers, and shows why CPU inference stays slow. It also covers the very different memory demands of full-parameter versus parameter-efficient fine-tuning, and closes with total-cost-of-ownership guidance for choosing between self-built hardware and the cloud.
1. What “Full-Blown” Actually Means
In the open-source LLM community, “full” (满血) is not an official parameter—it is a colloquial term for the complete version of a model that has not been distilled, pruned, or shrunk in parameter count. This article focuses on a model with roughly 671 billion (671B) parameters and on the order of 1.4 trillion bytes of weights (half precision). Models in this class offer reasoning ability close to the frontier, but their hardware requirements are on an entirely different scale from those of models with a few billion parameters.
Before asking “what configuration do you need,” it helps to answer a more fundamental question: which part of the model must fit into VRAM or system memory?
The answer is the weights themselves. LLM inference follows a “load layer by layer, compute layer by layer” process. When a given layer is computing, its input tensor must be multiplied by every parameter in that layer, so all of that layer’s parameters must already be in place before the computation begins. In other words, the model weights must reside fully in VRAM or memory—they cannot be swapped in and out on demand the way an operating system manages pages. This leads to the most important conclusion in this article: the primary factor that determines whether a model can run locally is memory capacity (VRAM or RAM), not raw compute.
This conclusion directly drives three things:
- Inference memory access scales with parameter count: generating each token typically requires reading through all the weights once.
- Inference speed is capped by VRAM or memory bandwidth: large-model decoding is a memory-bound workload.
- Budget planning should start from “gathering enough VRAM”: figure out capacity first, then talk about speed.
2. Step One: Do the VRAM Math with a Formula
2.1 VRAM estimation formula and derivation
For dense-model inference, there is a simple and conservative estimation method:
M = P × Q / 8 × 1.2
where:
- M is the required VRAM or memory capacity, in GiB;
- P is the model parameter count, in units of 10⁹ (i.e., 1B);
- Q is the precision in bits, e.g., 8 for 8-bit integer quantization, 16 for half precision;
- 1.2 is an overhead coefficient that roughly covers extra usage such as model copies and runtime context.
The formula means: each parameter occupies Q/8 bytes, so 1B parameters occupy Q/8 GiB at Q-bit precision, plus about 20% headroom.
It is worth stressing that while the original text calls this coefficient “conservative,” it is actually optimistic. The reason is in Section 3: KV cache overhead does not scale as a fixed proportion of parameter count, but depends on context length and concurrency.
Code 1: VRAM estimation function
def estimate_memory_gib(params_b: float, bits: int, overhead: float = 1.2) -> float:"""Estimate VRAM (GiB) required for inference from parameter count and quantization bit width.params_b: parameter count, in units of B (billions)bits: weight precision in bits, e.g., 8 (Q8), 4 (Q4), 16 (half precision)overhead: extra overhead coefficient (model copies, runtime context, etc.)"""return params_b * bits / 8 * overheadprint(estimate_memory_gib(671, 16)) # 1610.4 GiB, original half-precision weightsprint(estimate_memory_gib(671, 8)) # 805.2 GiB, Q8 precisionprint(estimate_memory_gib(671, 4)) # 402.6 GiB, Q4 precision
The results are:
- Half precision: about 1610 GiB, beyond the capability of most local environments;
- Q8: about 805 GiB;
- Q4: about 403 GiB.
The “full” mentioned in the original text refers to running the 671B-parameter model at 8-bit precision. Here, 8-bit precision usually means 8-bit integer quantization of the weights, what the industry commonly calls Q8 or W8A8 (both weights and activations participate in computation at 8 bits).
2.2 Three easily overlooked details
First, the difference between GiB and GB. VRAM is labeled in units of 2³⁰ bytes (GiB), while memory module capacities and storage vendor ratings are mostly quoted in 10⁹ bytes (GB), a difference of about 7.4%. The 805.2 GiB from the formula is roughly 864 GB. If you buy 805 GB of memory directly, the actual usable capacity will fall short.
Second, “Q8” can mean static or dynamic quantization. When the model weights themselves are 8-bit, VRAM usage matches the calculation in 2.1. Another common approach is to do inference computation in 8-bit floating point, or to quantize only the weights to 8 bits and dequantize back to higher precision during computation. Both use the same amount of VRAM, but whether you can exploit the hardware’s 8-bit compute capability depends on whether the accelerator natively supports the corresponding precision. When it does not, the weights must be dequantized before computation, and actual speed takes a hit.
Third, quantization reduces weight storage, not problem difficulty. Inference compute is usually measured by the number of floating-point operations in a single forward pass, and that number is determined by parameter count. For a 671B model, one forward pass takes about 2 × 671B ≈ 1.34 × 10¹² FLOPs, i.e., about 1.34 TFLOPs; quantization does not meaningfully change this order of magnitude.
3. Don’t Overlook It: KV Cache Is the Hidden Big Spender
3.1 KV cache composition and estimation
During autoregressive decoding, every time a new token is generated, the model needs the current token to attend to the Key and Value vectors of all previous tokens. Recomputing historical tokens at every step would make compute grow quadratically with sequence length, so inference systems cache them for reuse—this data is the KV cache.
For models using standard multi-head attention, the estimation formula is:
KV cache (bytes) = 2 × layers × KV heads × head dim × bytes per element × sequence length × concurrent requests
Code 2: KV cache estimation function
def kv_cache_gib(layers, kv_heads, head_dim, seq_len, batch=1, dtype_bytes=2):"""Estimate KV cache usage (GiB); layers/kv_heads/head_dim come from the model config"""per_token = 2 * layers * kv_heads * head_dim * dtype_bytes # one copy each for K and Vreturn per_token * seq_len * batch / (1024 ** 3)# Example: 60 layers, 8 KV heads, head dim 128, half-precision cachecache = kv_cache_gib(layers=60, kv_heads=8, head_dim=128, seq_len=4096, batch=8)print(round(cache, 2)) # 7.5 GiB
The layer count and KV head count here are just illustrative; actual calculations should follow the model’s config file. Grouped-query attention (GQA) and multi-query attention (MQA) let multiple query heads share the same set of KV heads, greatly compressing KV cache size; multi-head latent attention (MLA) compresses before caching.
3.2 Why the 20% coefficient isn’t enough
The KV cache scales with context length and concurrent requests. A single long-context request might not use much, but a service facing many users often has to maintain dozens of concurrent sessions, and this overhead accumulates quickly.
Beyond the KV cache, there are several other expenses:
- Framework and runtime overhead: compute graphs, communication buffers, VRAM fragmentation, and so on;
- Activations: grow with batch size and sequence length;
- Request queuing and prefill: the prefill stage processes long prompts all at once, so transient activation usage is clearly higher than during decoding.
Therefore, the 1.2 coefficient suits evaluating a “minimum viable configuration”—judging whether a machine can start. For production capacity planning, first estimate the KV cache size at peak concurrency, add it to the weight size, and reserve a 10%–20% safety margin.
If concurrency pressure is high, general techniques such as KV cache quantization, paged KV cache management, and sliding-window attention are worth considering. They trade reduced cache usage for a possible accuracy loss, and should be validated against business results.
3.3 A counterintuitive conclusion
“Q4 uses fewer resources than Q8” only roughly holds at low concurrency and short context. In long-context, high-concurrency scenarios, the KV cache grows independently of the precision tier. When necessary, “high-precision weights + smaller batch size” and “low-precision weights + larger batch size” may end up with nearly the same total usage, so selection should account for the whole picture.
4. The GPU Inference Plan: Sizing Card Count by VRAM Tier
4.1 Theoretical minimum card count
GPU VRAM capacity and inter-card interconnect capability determine the shape of a plan. Common GPU VRAM falls into three tiers, each with different compute use and positioning:
- 80 GiB class: data-center training cards, with large per-card VRAM and usually high-bandwidth direct multi-card interconnect;
- 48 GiB class: professional cards positioned between data center and workstation, with moderate per-card VRAM; multiple cards within a node usually connect via a high-speed external bus;
- 24 GiB class: high-end consumer or graphics cards, with small per-card VRAM and high value for money, but usually lacking data-center-class direct multi-card capability—multi-card communication can only rely on the motherboard bus.
Dividing total VRAM demand by per-card VRAM and rounding up gives the theoretical minimum card count (excluding the KV cache):
| Precision | Total VRAM demand | 80 GiB/card | 48 GiB/card | 24 GiB/card |
|---|---|---|---|---|
| Q8 | 805.2 GiB | 11 cards | 17 cards | 34 cards |
| Q4 | 402.6 GiB | 6 cards | 9 cards | 17 cards |
Code 3: Calculating card count and node count from per-card VRAM
import mathdef plan(total_gib: float, per_gpu: int, cards_per_server: int = 8):cards = math.ceil(total_gib / per_gpu) # theoretical minimum card countservers = math.ceil(cards / cards_per_server) # number of full servers neededreturn cards, serversfor gpu in (80, 48, 24):q8_cards, q8_servers = plan(805.2, gpu)q4_cards, q4_servers = plan(402.6, gpu)print(f"{gpu:>2} GiB/card -> Q8: {q8_cards:>2} cards / {q8_servers} x 8-card server"f" Q4: {q4_cards:>2} cards / {q4_servers} x 8-card server")
4.2 Putting it into full servers: re-checking the original plan
Servers are usually sold as 8-card units. Rounding the theoretical card count up to whole-server scale gives directly deployable configurations. Re-checking against the original text:
| Precision | 80 GiB/card | 48 GiB/card | 24 GiB/card |
|---|---|---|---|
| Q8 (with redundancy) | 2× 8-card servers | 3× 8-card servers | 5× 8-card servers |
| Q8 (minimum config) | 1× 8-card + 1× 4-card | 2× 8-card + 1× 2-card | 4× 8-card + 1× 4-card |
| Q4 | 1× 6-card server | 1× 8-card + 1× 2-card | 3× 8-card servers |
Re-check result: all the values above are correct.
Take the 80 GiB tier as an example: Q8 needs 11 cards, which becomes “1× 8-card server + 1× 4-card server”; Q4 needs only 6, so a single 6-card server suffices. For the 48 GiB tier, Q8 needs 17 cards, split into “2× 8-card + 1× 2-card” for 18 cards and 864 GiB total VRAM; Q4 needs 9 cards, so “1× 8-card + 1× 2-card” for 10 cards and 480 GiB total.
These plans share a feature: each card has more than 40 GiB of VRAM left over, leaving ample room for the KV cache.
The 24 GiB tier’s Q4 plan deserves more scrutiny. Splitting 17 cards into “3× 8-card servers” gives 24 cards and 576 GiB—VRAM is plentiful, but you pay extra CPU and motherboard cost to fill the PCIe lanes of four machines. If a single server supports expanding to multiple cards—say 4 or 8 per machine—there is a chance to reduce the number of whole servers. However, on such platforms, multi-card communication can usually only go through the PCIe bus, so tensor-parallel overhead grows noticeably. This is the root cause of why multi-card consumer plans are “cheap in total but discounted in efficiency.”
4.3 What to do when a single machine can’t hold it
Take Q8: a single 8-card 80 GiB machine totals 640 GiB, below the 805 GiB demand. Even accounting for KV cache headroom, crossing nodes is nearly unavoidable; Q4, on the other hand, may fit into a single 6-card machine.
A practical rule of thumb:
- When a single node can hold the model, prefer single-machine multi-card. Tensor parallelism then runs entirely over the node’s high-speed interconnect, giving the best communication efficiency and the simplest operations.
- When you must cross nodes, a hybrid “intra-node tensor parallelism + inter-node pipeline parallelism” plan is recommended. Tensor parallelism splits each layer’s weights across multiple cards, requiring a global reduction after each layer’s computation. Pipeline parallelism cuts the model into segments by layer, placing each segment on a node, with only activations passed between adjacent segments—far less communication, well suited to inter-node links.
- Pipeline parallelism should be paired with micro-batching. Otherwise the pipeline stages wait on each other and device utilization stays low.
In addition, all parallelism plans require each node to load the same weight copy, so model distribution needs to be planned ahead. Weight files on the order of hundreds of GiB need high-speed shared storage and a sensible loading strategy, and the first deployment often takes longer than expected.
5. The CPU Inference Plan: It Runs, but Don’t Expect Speed
5.1 Hardware requirements
GPUs aren’t the only option—CPUs can run large models too, but the bar isn’t low. Take Q8:
- Memory capacity is a hard threshold. By the formula you need the equivalent of at least about 805 GiB of VRAM, which translates to 1 TB or more of system memory. Mainstream consumer platforms have few slots and limited per-module capacity, making this hard to satisfy. In practice, you typically need a dual-socket high-end server CPU platform with multiple large-capacity memory modules.
- CPU, memory, and the whole machine must match. The chosen CPU must support the required memory capacity and channel count, and the machine must have enough memory slots.
- The same goes for Q4. Just switch to 4-bit precision, and memory drops to around 512 GB, but the conclusion that “you must go with a server platform” still holds.
5.2 Why CPU inference is doomed to be slow
Large-model decoding is memory-bound: every token generated requires reading the weights once, so the speed ceiling can be approximated by:
Single-user decode speed (tokens/sec) ≈ effective memory bandwidth ÷ bytes read per token
Take Q8: each token requires reading about 671 GiB of weights. Modern dual-socket server platforms usually offer memory bandwidth on the order of hundreds of GB/s, and after losses from NUMA cross-node access, cache misses, and other factors, effective bandwidth is lower. The theoretical estimate is only single digits to a dozen or so tokens per second, and real-world speed is often even lower.
The contrast with GPUs is even starker. A single high-end HBM card can reach bandwidth on the order of several TB/s, and stacking multiple cards pushes total bandwidth higher still, leaving a gap of an order of magnitude versus CPU memory bandwidth. This is the fundamental reason GPU and CPU inference speeds differ so greatly at the same model scale.
5.3 Applicability boundaries
CPU inference isn’t without value. In environments where GPU resources are tight or accelerators can’t be deployed, it can still be used for:
- Offline batch processing;
- Accuracy alignment and result verification.
But be clear-eyed: 1 TB of memory and a dual-socket CPU are themselves a significant investment, and the experience gained falls far short of a GPU plan at the same budget.
As for “using CPUs for fine-tuning and training,” it is essentially infeasible at this parameter scale. CPU-side compute density and interconnect bandwidth can’t support large-model training, and the original text’s judgment holds.
6. From “Running” to “Training”: The Hardware Bar for Fine-Tuning and Training
“Specialized training” usually lands at the fine-tuning level, and fine-tuning’s VRAM demand is on a different scale from inference.
Full-parameter fine-tuning: 6–10× inference VRAM. Take mixed-precision training with an adaptive optimizer: training one parameter typically needs:
- Weights: 2 bytes (half precision);
- Gradients: 2–4 bytes;
- Master weights: 4 bytes (single precision);
- Optimizer states: 8 bytes (single-precision first and second moments).
That totals about 16–18 bytes per parameter. For 671B parameters, just the model states need roughly 10–12 TiB—over ten times Q8 inference VRAM, not counting activation overhead. The “6–10×” mentioned in the original text can be seen as the lower bound after applying memory-optimization techniques. So full-parameter fine-tuning is basically only worth discussing on data-center-class multi-card clusters.
Parameter-efficient fine-tuning: same order of magnitude as inference. Methods represented by low-rank adaptation (LoRA) freeze the original weights and train only the injected low-rank matrices, with optimizer states applying only to the tiny trainable fraction. Its VRAM mainly consists of three parts: the frozen base weights (further reduced if the base is loaded in 4-bit quantization), gradients and optimizer states for the few trainable parameters, and forward activations that grow with sequence length. Combined with gradient checkpointing to trade compute for memory, single-machine multi-card hardware conditions may be enough to complete this kind of fine-tuning.
It is worth adding that low-rank-adaptation-type results depend heavily on task design. When injecting large amounts of new knowledge into a general domain, or doing strong adaptation in a specialized domain, its results still lag behind full-parameter fine-tuning, and trade-offs should be weighed against evaluation results.
7. Selection Advice: Don’t Just Look at Unit Price
The original text mentions that “an 8-card professional-card server costs about ¥350,000–400,000, with per-card compute on par with high-end consumer cards and far better value than an 8-card 80 GiB training-card server (over ¥1,500,000).” Such market prices fluctuate with time and channel, but the direction of the conclusion is worth borrowing: focus on total cost of ownership, not per-card unit price.
- Account by “yuan per GiB of VRAM.” Dividing the total price of the full servers needed to meet the VRAM demand by total VRAM capacity is the only way to compare real value across different VRAM tiers.
- The larger the per-card VRAM, the fewer servers. The 80 GiB tier’s cards are “expensive,” but they need more than half as many servers and have fewer inter-card communication layers, so combined cost and operational burden aren’t necessarily higher.
- Factor in electricity and cooling. Such servers usually draw several kilowatts at full load; long-term electricity cost, rack power, and cooling capacity are all real constraints, and where the data center falls short, an air-cooling-to-liquid-cooling retrofit is another investment.
In addition, hardware selection must match the use case:
| Use case | Key bottleneck | Selection focus |
|---|---|---|
| Daily inference service | VRAM capacity, VRAM bandwidth, intra-node interconnect | The 80 GiB tier suits those after performance and simplicity; the 48 GiB tier stands out on value but requires accepting inter-node communication |
| Parameter-efficient fine-tuning | VRAM capacity, training stability | Prefer single-machine multi-card, balancing inference and light training |
| Full-parameter fine-tuning or continued pre-training | Inter-node communication bandwidth, cluster stability | Use data-center-class cards with high-speed interconnect; consumer and workstation cards are limited in communication bandwidth |
If you don’t need to own the hardware long-term, you can also evaluate cloud GPU instances. Their advantage is avoiding hardware procurement and data center operations, suiting validation, elasticity, and tidal-peak scenarios; the cost of long-term high-load operation needs to be calculated against specific pricing. Baidu AI Cloud offers general-purpose compute products such as GPU cloud servers, which can be included in the comparison.
Building your own versus moving to the cloud also involves data compliance, data residency, and network isolation requirements. Localization needs in finance, healthcare, and government are often more decisive than pure cost considerations.
8. Conclusion
Back to the original question: what configuration can run the “full” 671B model locally? The answer boils down to four points:
- Figure out capacity first, then talk compute. Q8 needs about 805 GiB and Q4 about 403 GiB of VRAM, then round up the card count by per-card VRAM tier.
- Card count determines topology. The 80 GiB tier’s Q8 needs 11 cards to start, making cross-node the norm; the 24 GiB tier’s Q8 needs 34 cards to start, with server and communication costs rising sharply.
- The CPU plan is a last resort. A dual-socket server CPU with 1 TB of memory can run Q8, but memory bandwidth limits keep its speed far below GPU.
- Fine-tuning is a separate calculation. Full-parameter fine-tuning needs several times inference VRAM, while low-rank-adaptation-type parameter-efficient fine-tuning may be the only viable option on single-machine multi-card.
Ultimately, “whether it can run” and “whether it’s worth running” are two different questions. VRAM capacity sets the threshold, bandwidth and interconnect set the speed, and total cost of ownership determines whether a plan is sustainable. Only by clarifying the business’s real requirements for throughput, latency, and accuracy, and then comparing back against these numbers, can you find the right balance between budget and experience.
