Local LLM Deployment: A Complete Hardware Configuration Guide

    This guide walks through how to size and configure hardware for deploying large language models locally, using a ~671B-parameter open-source MoE model as a running example. It covers the fundamentals of capacity, bandwidth, and compute, then lays out a practical decision process: estimating VRAM (weights + KV Cache + runtime overhead), quantifying speed limits from memory bandwidth and compute, and choosing parallelism and topology. It also covers the full system beyond the GPU (CPU, memory, storage, power, cooling, network, and stability), compares consumer, workstation, and data-center GPUs, and includes capacity-estimation code, reference configurations, and a pre-launch verification checklist.

    Introduction: What You’re Really Configuring When You Deploy an LLM Locally

    Entering the era of hundred-billion-parameter models, “local LLM deployment” has shifted from a hobbyist’s experiment with GPUs into an infrastructure option for enterprises building closed data loops and meeting compliance requirements. Many teams share the same question before purchasing: high-end accelerator cards deliver strong compute but are hard to procure; consumer GPUs offer great value but limited VRAM; professional workstation GPUs sit in the middle on VRAM and look like they “land right in the sweet spot.” The real question becomes: how do you make these trade-offs in a real engineering environment?

    Take a typical open-source MoE (Mixture of Experts) model as an example. It has a total parameter count of about 671 billion but activates only about 37 billion parameters per token, so inference cost concentrates on VRAM capacity and KV Cache. The selection logic for this kind of model differs from the traditional “bigger model means more compute” thinking, and focuses on three things:

    • Can the VRAM hold it: can it load the full model while leaving room for context and concurrency;
    • Is long context stable: after scaling to 32K or even 128K, are latency and throughput still controllable;
    • Is multi-concurrency throughput predictable: can the service scale reliably according to a capacity model.

    This article does not benchmark any specific model. We abstract the hardware into three general categories — consumer GPUs (typically 16GB–32GB VRAM per card), workstation-grade professional GPUs (48GB–96GB), and data-center accelerators (96GB+ of high-bandwidth VRAM) — and, combined with the VRAM capacity model, bandwidth model, parallel scaling, and full-system configuration, give a reusable decision-making method.

    1. Selection Logic Fundamentals: What Capacity, Bandwidth, and Compute Each Control

    1.1 LLM Inference Has Two Phases With Completely Different Bottlenecks

    Mainstream inference servers split a request into two phases, and their resource bottlenecks are not the same:

    • Prefill: processes the entire input in parallel, has high compute intensity, is mainly limited by compute, and determines TTFT (Time To First Token).
    • Decode: generates tokens one by one, re-reads the model weights for every token, is mainly limited by VRAM bandwidth, and determines TPOT (Time Per Output Token).

    Roughly:

    1. TTFT ≈ input tokens × per-token prefill cost ÷ effective compute + queue wait time
    2. TPOT ≈ bytes of weights and KV to read this step ÷ effective VRAM bandwidth + communication and scheduling overhead
    3. End-to-end latency ≈ TTFT + output tokens × TPOT

    This yields one key conclusion: compute (TFLOPS) mainly affects prefill speed, prefill-heavy offline batch throughput, and the decode compute ceiling under high concurrency; VRAM capacity determines “whether it can run”; VRAM bandwidth determines “how fast a single user runs.” For a 671B-class MoE model, VRAM capacity and bandwidth rank above paper compute.

    1.2 Four Workload Types Have Different Hardware Requirements

    Workload Input/output characteristics Main bottleneck Hardware preference
    Chat assistant, knowledge Q&A Medium input, medium output Single-stream TPOT, TTFT Fits in VRAM, bandwidth as high as possible
    Coding assistant Long input (cross-file context), medium output, bursty requests Long-prefill TTFT, peak concurrency Balance bandwidth and compute; keep inference precision no lower than storage precision
    Customer service, batch ticket processing Medium input, high concurrency Throughput, VRAM capacity (KV Cache) Large VRAM, scalable, multiple replicas
    Long-document analysis, meeting notes Input 32K–128K KV Cache capacity, attention compute, bandwidth Large VRAM first; KV quantization if needed

    2. Preparation: Lock Down Requirements With “Four Parameters”

    Before any hardware discussion, parameterize the requirements. Once these four groups are fixed, every subsequent selection step can be quantified:

    1. Model form: dense or MoE. Dense models read all weights for every token; MoE activates only some experts, but the total weights must stay resident in VRAM.
    2. Weight precision: BF16/FP16 is 2 bytes/parameter, FP8/INT8 is about 1 byte/parameter, and 4-bit quantization is about 0.5–0.6 bytes/parameter (including scale factors and grouping metadata). Compared with BF16, 8-bit quantization usually causes small accuracy loss on mainstream open-source models, while 4-bit requires task-specific evaluation.
    3. Context length: take values by actual business percentiles. Whether the input is a ten-thousand-word document or a single sentence can change hardware requirements several-fold.
    4. Concurrency scale: peak online request count multiplied by average output length, plus offline batch tasks.

    3. Step 1: Will It Fit in VRAM — The Capacity Estimation Model

    3.1 Three VRAM Overheads

    GPU VRAM must hold three parts:

    1. Total VRAM demand ≈ model weights + KV Cache + runtime overhead
    2. Model weights = total parameters × bytes per parameter
    3. KV Cache = KV bytes per token × context length × concurrent requests
    4. = (2 × layers × KV heads × head dim × KV precision bytes) × context length × concurrent requests
    5. Runtime overhead ≈ context length×4 + activation buffers + communication buffers (rule of thumb: 5%–20% of total VRAM)

    Three engineering points need special attention:

    • MoE models: when computing weights, look at “total parameters”; when estimating compute and bandwidth, look at “activated parameters.” The two must not be mixed.
    • The KV Cache coefficient: multi-query attention (MQA) has KV heads = 1; grouped-query attention (GQA) has far fewer KV heads than query heads. KV Cache is counted in bytes, scales linearly with context length and concurrency, and can be stored at FP16, FP8, or INT8 precision.
    • VRAM fragmentation: when long and short requests run mixed, block-allocated KV cache produces fragmentation, and actual usable capacity is typically only 80%–90% of the theoretical value.

    3.2 Quantization Example

    For an open-source MoE model with “about 671B total parameters, 60 layers, 8 KV heads, head dim 128”:

    • Weights: about 1.34TB in BF16, about 671GB in 8-bit.
    • Per-token KV: 2×60×8×128×2 bytes ≈ 240KiB; at 128K context, a single request needs about 30GB.

    Reference “local deployment thresholds”:

    • 256B–671B parameter MoE 8-bit versions: even with low-bit schemes like “W4A8” (4-bit weights, 8-bit compute), the weights are at least about 340GB, so the local single-node deployment threshold is very high;
    • 100B–235B parameter 8-bit models: weights about 100GB–235GB, can be hosted on a single machine with 8 cards of 48GB or 96GB VRAM;
    • 70B parameter BF16 model: weights about 140GB, fit on 4–8 cards of 24GB-class VRAM; after 4-bit, about 35GB, runnable on a single 24GB-class card, but with limited context and concurrency headroom;
    • Below 30B models: a single consumer GPU runs them easily, and VRAM is mainly used for KV Cache and concurrency.

    3.3 Capacity Estimation Script

    1. from math import ceil
    2. def estimate_vram(params_B, bytes_per_param, layers, kv_heads, head_dim, kv_bytes,
    3. ctx_len, concurrency, overhead=0.15, card_gb=96, use_kvcache=True):
    4. """Estimate VRAM demand from weights + KV Cache + runtime overhead
    5. (1GB counts as 10^9 bytes; the result is intentionally conservative)."""
    6. weights_gb = params_B * bytes_per_param
    7. kv_per_token = (2 * layers * kv_heads * head_dim * kv_bytes) if use_kvcache else 0
    8. kv_total_gb = kv_per_token * ctx_len * concurrency / 1e9
    9. total_gb = (weights_gb + kv_total_gb) * (1 + overhead)
    10. return {
    11. "weights_gb": round(weights_gb, 1),
    12. "kv_total_gb": round(kv_total_gb, 1),
    13. "total_gb": round(total_gb, 1),
    14. "min_cards": ceil(total_gb / card_gb),
    15. }
    16. # Example: 670B MoE, 8-bit weights, 60 layers, 8 KV heads, head dim 128, KV in FP16
    17. print(estimate_vram(670, 1, 60, 8, 128, 2, ctx_len=32768, concurrency=16))
    18. # Example output: {'weights_gb': 670.0, 'kv_total_gb': 123.1, 'total_gb': 911.2, 'min_cards': 10}
    19. # Conclusion: at least 10 cards at 96GB each; real deployments should round up to multiples of 8 and reserve headroom.

    Note that the KV Cache occupies the sum of VRAM across all cards. On an 8-card 96GB node, the KV for just 32K context and 16 concurrency already exceeds 120GB, roughly a fifth of the available VRAM. This means that in high-concurrency, long-context scenarios, the VRAM budget must first “reserve space” for KV, then work backward to the concurrency it can support.

    4. Step 2: How Fast — The Quantified Boundaries of Bandwidth and Compute

    4.1 Single-User Generation Speed Is Bounded by Bandwidth

    In the decode phase, each generated token requires reading the participating weights from VRAM once (KV Cache reads are usually an order of magnitude smaller). In theory:

    1. Single-stream TPOT ≈ bytes to read per token ÷ number of cards ÷ effective VRAM bandwidth per card + communication and scheduling overhead
    2. Single-stream speed ≈ 1 / TPOT

    MoE models read only the activated experts each step. Assume 37B activated parameters and 8-bit weights, so about 37GB is read per step. The theoretical ceilings at different per-card bandwidths are as follows (assuming near-linear scaling across cards, ignoring communication overhead):

    Effective VRAM bandwidth per card 4-card theoretical ceiling 8-card theoretical ceiling 16-card theoretical ceiling
    ≈1 TB/s (common for 24GB-class consumer cards) 108 token/s 216 token/s 432 token/s
    ≈1.8 TB/s (common for 48GB-class workstation cards) 194 token/s 389 token/s 778 token/s
    ≈3 TB/s (common for 96GB-class workstation cards) 324 token/s 649 token/s 1297 token/s
    ≈8 TB/s (data-center high-bandwidth cards) 865 token/s 1730 token/s 3459 token/s

    These numbers represent only the theoretical ceiling. Real services are also affected by kernel efficiency, tensor-parallel communication, and MoE routing and scheduling, so actual values are usually 40%–70% of theory. But for horizontal comparison, bandwidth differences have an order-of-magnitude effect on single-stream speed.

    Now look at the VRAM bandwidth required to deploy the ~671GB of weights across different card counts:

    • 4 cards: each card must read at least ~168GB, so reaching 100 token/s would theoretically require 168 TB/s per-card bandwidth — impossible in reality;
    • 8 cards: each card reads at least ~84GB, so 84 TB/s per-card bandwidth gives a theoretical 100 token/s;
    • 16 cards: each card reads at least ~42GB, so 42 TB/s per-card bandwidth gives a theoretical 100 token/s.

    The pattern is clear: the aggregate bandwidth needed to reach a given single-stream speed is roughly proportional to the card count; more cards means a lower per-card bandwidth threshold, but also more communication hops. Therefore, the combination of “high-bandwidth VRAM + high-speed inter-card interconnect” is the dividing line for whether hundred-billion-class MoE models can interact smoothly.

    4.2 Batch Inference: Weights Read Once, Speed Approaches Compute

    In decode, weights are read once per batch; the larger the batch, the less weight-read cost is amortized per token. When the batch is large enough, decode becomes compute-bound, with a throughput ceiling of roughly:

    1. Decode throughput ceiling ≈ effective compute ÷ per-token compute
    2. MoE per-token compute ≈ 2 × activated parameters (forward FLOPs, excluding attention)

    37B activated parameters corresponds to about 74 GFLOPs/token. If effective compute is 1000 TFLOPS (50% utilization), the theoretical throughput ceiling is about 13.5K token/s. This explains three phenomena:

    • Consumer GPUs, in small-model single-stream scenarios where “the model fits in VRAM,” often generate at speeds no lower than more expensive cards, because small models have low bandwidth demand while consumer cards do not have low bandwidth;
    • High-concurrency scenarios compete on the combined strength of compute, VRAM capacity, and interconnect bandwidth, and the advantage of high-bandwidth, large-VRAM cards grows with batch size;
    • MoE expert parallelism requires frequent cross-card All-to-All communication. The larger the batch and the longer the sequence, the greater the communication pressure — especially noticeable in multi-machine deployment.

    4.3 TTFT and Long Context: Prefill Is a “Compute Tax”

    • Attention compute grows quadratically with context length: going from 4K to 128K input (32×) increases the attention portion of prefill compute by about 1000×, while the linear-layer portion grows only 32×.
    • Real attention kernels usually compute in a streaming fashion by “sequence chunking”; VRAM usage grows linearly with length, and speed remains mainly compute-limited.
    • In multi-card deployment, long-sequence prefill often produces large amounts of KV on only some cards, causing VRAM imbalance and requiring sensible scheduling.

    Engineering countermeasures include:

    • Chunked Prefill: split long inputs into chunks and mix-schedule them with decode requests, so long requests don’t monopolize compute and push up other requests’ TTFT;
    • Prefix Cache: coding tools have many requests sharing system prompts and code-repository context, so cache hits save repeated prefill;
    • Prefill/decode (PD) disaggregation: the two workloads have different demands for compute and bandwidth, so they can be deployed on separate nodes;
    • Configure context length on demand: a model supporting 128K does not mean the business needs 128K. KV usage grows directly with length, so setting a reasonable context ceiling is the most direct “money-saving” measure.

    4.4 How VRAM Capacity Translates Into Concurrency

    Average online concurrency can be estimated as: average concurrency ≈ QPS × (TTFT + output tokens × TPOT).

    Assume a single-user TPOT target of 50ms (20 token/s) and an output of 500 tokens, so a single request occupies an inference slot for about 25 seconds. If the target QPS is 1, average concurrency is about 25, requiring 25 KV slots to be reserved. Working backward from the capacity estimate:

    1. Supportable concurrency ≈ (total VRAM − weights × safety factor − reserved fragmentation) ÷ per-request KV size
    2. Example: deploying a 671B model (8-bit) on 8 cards of 96GB:
    3. total VRAM 768GB − weights 671GB × 1.05 ≈ 63GB
    4. at 240KiB/token, per-request KV at 32K context ≈ 7.7GB
    5. after deducting fragmentation and activation reservations, it theoretically supports only a few concurrent streams (actual deployment needs further relaxation)

    To support dozens of concurrent streams, you usually have to choose one of:

    • Reduce context length or KV precision (e.g., KV in FP8);
    • Scale by power-of-two card counts (e.g., 16 or 32 cards);
    • Add replicas to scale horizontally.

    So between “can fit” and “can serve” lies an entire capacity-planning gap.

    5. Step 3: Are More Cards Always Better — Parallel Strategy and Topology

    5.1 Trade-offs Among the Four Parallelism Methods

    Parallelism Partition target Communication characteristics Applicable scenarios
    Tensor Parallelism (TP) Weight matrices within a single layer At least two collective communications per layer, extremely sensitive to interconnect bandwidth Within one machine, up to 8 cards, high-speed interconnect
    Pipeline Parallelism (PP) Layers split across nodes Only transmits activations at stage boundaries, low communication volume Cross-node scaling
    Expert Parallelism (EP) MoE experts spread across cards One All-to-All dispatch plus one aggregation per MoE layer MoE cluster deployment
    Data Parallelism (DP) Full model replicas No cross-replica communication during inference Horizontal throughput scaling

    Pipeline parallelism has “pipeline bubbles”: the more cards, the higher the proportion of waiting time, so it is better suited to offline scenarios with synchronous batching; online low-latency scenarios rely mainly on combinations of TP and EP. A common engineering practice is “intra-node TP + inter-node PP/EP,” keeping high-frequency communication inside the machine’s high-speed interconnect.

    5.2 Interconnect Topology Is a Hidden Variable

    • Inter-card interconnect: dedicated high-speed interconnect (can reach hundreds of GB/s up to about 900 GB/s) versus ordinary PCIe links (about 64 GB/s one-way per card) differ by an order of magnitude. In multi-card tensor parallelism, this gap shows up directly in TPOT.
    • Intra-machine path: whether cards communicate through a PCIe Switch or cross NUMA via the CPU (UPI/Infinity Fabric-class links) — different paths give markedly different communication efficiency.
    • Inter-machine network: use an RDMA network (InfiniBand or RoCEv2) between nodes, starting at 200Gbps. When intra-node TP has to cross nodes, the network becomes the bottleneck.
    • Topology awareness: placing tensor-parallel groups under the same NUMA node and the same PCIe Switch significantly reduces cross-node transfers.

    5.3 Why “8” Becomes the Common Unit

    Mainstream inference engines and model weights are usually partitioned and released in power-of-two card counts, and a single machine with 8 cards has become the most standard form factor for rack servers. When the card count is not a multiple of 8 (e.g., 3, 5, or 6 cards), tensor-parallel partitioning often cannot divide evenly, or requires extra communication layers, and both efficiency and stability drop. Unless there is a strong reason, plan the configuration with 8 cards as one scaling unit.

    6. Full-System Configuration: Seven Key Points Beyond the GPU

    6.1 CPU: Adequate Is Enough, but Verify the PCIe Lane Count

    Prefill and the draft model used for speculative decoding may consume CPU compute, and tokenization and request scheduling also use CPU resources. Each GPU node generally recommends 32+ cores, with priority on clock speed.

    Even more critical is the lane count:

    • Consumer desktop platforms usually have only 20–28 PCIe lanes. After installing 4 GPUs, the lanes often cannot maintain full-speed x16 and drop to x8 or even x4;
    • Server-grade platforms usually provide 128+ lanes, stably supporting 8–10 full-speed GPUs;
    • Avoid GPU cross-NUMA access, and prefer platforms that support PCIe 5.0, reserving about 64 GB/s of bidirectional link bandwidth per card.

    6.2 Memory: Match VRAM, and Use It for KV Offloading When Needed

    Memory capacity is recommended at 1–2× total system VRAM. The 8-bit weights of a 671B model are about 671GB; with CPU-GPU hybrid offloading, memory must hold the resident weights and the KV overflow, needing at least 1TB+, with bandwidth recommended at 8-channel or higher DDR5.

    Note that over a PCIe 5.0 link transferring across channels within a single machine, offloading moves tens to hundreds of GB of weights for every token, an order of magnitude slower than a full-VRAM deployment. Offloading only suits latency-insensitive offline batch processing, and is not a shortcut for “trading memory for VRAM.”

    6.3 Storage: Determines Cold-Start and Scaling Speed

    At effective sequential read speeds of 1GB/s, 6GB/s, and 14GB/s, loading 671GB of weights takes about 11 minutes, 2 minutes, and 50 seconds respectively. Rolling restarts, failure recovery, and elastic scaling all repeatedly trigger loading, so a scheme with multiple parallel PCIe 4.0/5.0 NVMe SSDs is recommended; environments with resources can use an in-memory filesystem to cache hot models.

    6.4 Power: Leave Headroom for Peaks

    8 cards at the 350W–600W class have a full-load power of about 2.8–4.8kW; adding the CPU, memory, fans, and storage, a single node usually needs 6–10kW of supply capacity. Plan at 1.3–1.5× the cards’ rated power and reserve redundancy for cards with high transient power. For rack deployment, use 1+1 redundant power supplies with dual mains, and plan cabinets for 8–15kW of power and cooling capacity.

    6.5 Cooling and Chassis: Card Form Factor Determines System Form Factor

    • Blower (centrifugal-fan) cooled cards and fanless passive modules suit high-density racks; three-fan consumer cards struggle to maintain airflow inside an 8-card chassis;
    • When single-node power exceeds 10kW, consider cold-plate liquid cooling, and confirm in advance whether the cabinet supports it;
    • Card spacing, airflow, and cable management should all be confirmed with the vendor before purchase.

    6.6 Network: The “Second PCIe” for Multi-Machine Inference

    The RDMA network, business network, and storage network should be physically or logically separated; multi-machine deployment needs low-latency switches and correct switch configuration (e.g., PFC, ECN). Network latency jitter directly manifests as TPOT jitter.

    6.7 Engineering Stability: The Baseline for 24/7 Operation

    • ECC VRAM: data-center accelerators and some professional cards support ECC, reducing the risk of bit flips under long-term high load;
    • Drivers and firmware: enterprise products usually offer long-maintained driver branches with a controllable update cadence;
    • Virtualization: virtualization partitioning facilitates multi-tenant isolation, while consumer GPUs usually lack official virtualization support;
    • Power and temperature: throttling after sustained full load erodes measured performance, so acceptance testing should include a continuous burn-in.

    7. Applicable Boundaries of the Three Hardware Form Factors

    Dimension Consumer GPU Workstation Professional Card Data-Center Accelerator
    Typical per-card VRAM 16–32GB 48GB–96GB 96GB–192GB and above
    VRAM type GDDR, some with ECC support GDDR (with ECC) or high-bandwidth VRAM High-bandwidth VRAM (HBM)
    Per-card bandwidth magnitude ~1 TB/s ~1.8–4 TB/s ~3–8 TB/s
    Inter-card interconnect Generally PCIe-dependent, limited dedicated-interconnect coverage Some support high-speed interconnect High-speed interconnect, can build a unified VRAM domain
    Virtualization/partitioning Usually unsupported Supported Supported
    Suitable model scale Below-30B models; 70B-class 4-bit quantization 70B–300B class; with multiple cards can host hundred-billion-class 8-bit models Hundred-billion-class MoE at 8-bit and higher precision
    Suitable scenarios Single user, R&D validation, edge Mid-size enterprise private deployment, long context, moderate concurrency High-concurrency online services, PD disaggregation, clusters
    Main weakness Small capacity, high power draw and large transient fluctuations, limited multi-card efficiency High per-card cost, long procurement cycle Highest procurement cost and threshold

    Core judgments:

    • If the goal is to “get the model running,” consumer GPUs stand out for cost-effectiveness in below-30B models and quantization scenarios;
    • If the goal is “to support real business concurrency and long context,” VRAM capacity, bandwidth, and interconnect capability jointly determine service capability, and workstation-grade professional cards are the pivotal tier in between;
    • If the goal is “to provide stable-SLA high-concurrency services,” data-center accelerators and large-VRAM configurations are usually a necessary investment.

    8. From Requirements to Configuration: The Four-Step Decision Method

    1. Measure requirements: evaluate whether model capability meets the standard using a real corpus, and determine the weight precision and the context-length distribution;
    2. Calculate VRAM: use the capacity formula to compute weight and KV usage separately, yielding the minimum card count and the card capacity tier;
    3. Determine the form: for online low-latency scenarios, choose “single-machine multi-card + high-speed interconnect”; for offline batch processing, choose “multi-node pipeline parallelism + RDMA network”;
    4. Verify the full system: check PCIe lanes, power, cooling, storage, and network, then run full-load stress tests.

    Typical reference configurations:

    • Single-user coding tool: 1–2 cards of 24GB class + a below-30B model or 70B-class 4-bit quantization;
    • Mid-size enterprise knowledge base: 4–8 cards of 48GB class + a 70B–235B class model in 8-bit quantization, with prefix cache enabled;
    • High-concurrency long-document analysis: 8 cards of 96GB-class workstation cards to start, or data-center accelerators, with PD disaggregation and KV quantization enabled;
    • Hundred-billion-class MoE online service: a cluster of high-bandwidth nodes in power-of-two card counts, with intra-node tensor parallelism and inter-node expert parallelism or data parallelism.

    9. Pre-Launch Verification Checklist

    • VRAM: after full load, per-card VRAM utilization is recommended not to exceed 90%, leaving room for fragmentation and burst concurrency;
    • Latency: measure TTFT P95 and TPOT P95 separately, and run continuous stress tests with long context (≥32K);
    • Throughput: gradually increase concurrency and observe the inflection point of the throughput-latency curve to determine the maximum stable concurrency;
    • Stability: run a 48-hour continuous burn-in and observe temperature, throttling, ECC errors, and memory leaks;
    • Accuracy: compare output quality across quantization precisions using a business evaluation set; MoE models especially need attention to routing-related output differences;
    • Cost: measure the unit inference cost per “million tokens,” including electricity, depreciation, and operations labor.

    Conclusion

    Configuring hardware for local LLM deployment is essentially a joint-constraint problem of “VRAM capacity × bandwidth × interconnect × full system.” Consumer GPUs suit “small models, single user, quantizable”; workstation-grade professional cards suit “medium scale, long context, needing engineering stability”; data-center accelerators suit “hundred-billion-class MoE, high concurrency, external services.” First quantify the requirements, then estimate with the VRAM formula, and finally backstop with topology and full-system details — and you can avoid the common “can afford it but can’t run it” pitfall.