Hardware Selection for Local LLM Deployment: Why Compute-First No Longer Works

    A practical guide to choosing hardware for local large language model deployment, especially large-scale MoE models. It explains why peak compute is no longer the deciding metric, breaks down four decision criteria (VRAM capacity, memory bandwidth, scaling, and engineering stability), and covers configuration priorities for high-concurrency online serving and single-user low-latency coding assistants. It also includes a capacity estimation formula, trade-offs around quantization, KV cache, and parallelism, a hybrid cloud option, and a deployment checklist.

    1. Why the “Compute First” Approach Fails

    Once ultra-large-scale Mixture-of-Experts (MoE) architectures entered production, the bottleneck in local deployment shifted. In the era of dense models, hardware selection was essentially a comparison of peak compute. But when total parameter counts reach the hundreds of billions and a single inference pass activates only a small subset of expert networks, stable service delivery depends on three constraints instead: whether weights and cache can stay fully resident, whether memory bandwidth can sustain the token-by-token reads of the decode phase, and whether inter-GPU bandwidth can handle frequent expert routing and cache synchronization.

    An often-overlooked fact is that autoregressive decoding is a memory-bound workload. Every generated token requires moving the activated weights from VRAM into the compute units once, so arithmetic intensity is low. As a result, measured throughput correlates far more strongly with memory bandwidth than with peak floating-point compute. This explains a common phenomenon: two cards with similar on-paper compute can differ severalfold in throughput under long-context, high-concurrency stress tests.

    This article therefore uses four metrics as the decision backbone:

    • VRAM capacity: determines the model size, context length, and concurrency batch ceiling you can support;
    • Memory bandwidth: determines single-stream decode speed and the overall throughput ceiling;
    • Scaling capability: determines whether you can close capacity gaps horizontally across multiple GPUs and machines;
    • Engineering stability: determines latency jitter, long-context degradation, and operational cost under sustained stress testing.

    2. Scenario 1: High-Concurrency Online Serving

    For inference services shared by many users (for example, enterprise knowledge base Q&A or batch document processing), the key metrics are throughput per unit cost and stability under long contexts.

    Prioritize VRAM headroom. “Just fits” is not enough; you need room to grow for the KV cache. Cache usage grows roughly linearly with concurrency and context length. If you push VRAM to a critical level, the scheduler is forced to preempt, recompute, or even reject requests, which shows up as severe P99 latency jitter. A practical rule is to keep weight usage at around 60% of available VRAM, leaving the rest for cache and runtime overhead.

    Match bandwidth to capacity. High-bandwidth memory clearly benefits the decode phase, but if capacity is insufficient and you are forced to split across too many GPUs, cross-GPU communication overhead will eat up the bandwidth advantage. So in multi-GPU setups, prefer a high-bandwidth interconnect topology within a single machine, and avoid stretching tensor parallelism beyond the physical machine boundary.

    Tune the batching strategy explicitly. Continuous batching can significantly improve utilization, but larger batches raise time-to-first-token. It is better to stress-test and determine “max batch size” and “cache usage ceiling” as configurable items rather than relying on defaults:

    1. # Illustrative: key service-side configuration dimensions (not product-specific values)
    2. max_num_seqs = concurrency sequence limit, derived from VRAM headroom
    3. max_model_len = context limit, coupled with the cache budget
    4. gpu_memory_utilization = 0.85 ~ 0.92, leaving room for fragmentation and temporary buffers
    5. enable_chunked_prefill = enable for long prompts to smooth time-to-first-token

    3. Scenario 2: Single-User Low Latency and Coding Assistants

    For individual developers or AI coding tools, concurrency is typically 1 and context length is moderate, so the hardware goal is time-to-first-token and per-token generation speed.

    The key prerequisite for this workload is that the model stays fully resident in VRAM. Any weight swapping or cross-GPU splitting will multiply latency. A more pragmatic path is to choose a mid-sized model or use low-bit quantization, treating “it fits” as the first constraint before talking about speed. Consumer-grade GPUs often perform better at single-stream decoding, because their memory bandwidth and single-card exclusivity happen to match memory-bound decoding. High-memory professional cards, under the same conditions, carry more runtime management overhead, so their single-stream advantage is not obvious.

    Note that a single-stream latency advantage does not extend to concurrency. Once concurrency rises, small VRAM is quickly filled by cache, and throughput drops off a cliff.

    4. Capacity Estimation: Do the Math Before Choosing Cards

    Start with a coarse-grained formula for initial screening, then calibrate with real measurements:

    1. Weight VRAM ≈ parameters × bytes per parameter
    2. FP16 ≈ 2B/param, INT8 ≈ 1B/param, INT4 ≈ 0.5B/param
    3. Cache VRAM ≈ 2 × layers × KV heads × head dim × context length × concurrency × bytes
    4. Available VRAM = VRAM per card × number of cards × target utilization (0.85~0.9)
    5. Constraint: weight VRAM + cache VRAM + runtime overhead ≤ available VRAM

    Take a model with hundreds of billions of parameters as an example. Even with 4-bit quantization, the weights still require hundreds of GB of VRAM, which means a single-card approach is basically infeasible and you must go the route of multi-GPU tensor parallelism or expert parallelism. In this case, the meaning of “single-card capacity” declines, while the meaning of “total single-machine capacity + inter-card interconnect” rises.

    5. Trade-offs in Quantization, Cache, and Parallelism

    Quantization is the most direct capacity lever, but it has a quality boundary. Weight and activation quantization usually has a manageable impact on perplexity. However, long-context inference and numerically strict tasks are more sensitive to error, so you must run a regression on your own evaluation set before going live, rather than relying on generic leaderboard conclusions.

    The KV cache is the part with the most room for tuning. Options include: storing the cache at lower precision, limiting the maximum context per request, reusing prefixes for very long sessions (sharing cache for identical system prompts and document prefixes), and trimming history in multi-turn conversations. Prefix reuse has a high hit rate in enterprise knowledge base scenarios and is often the most cost-effective optimization for improving throughput.

    On parallelism, tensor parallelism communicates frequently and suits high-bandwidth interconnect within a single machine; expert parallelism is better suited to ultra-large-scale MoE but requires a network with high bandwidth and low latency; pipeline parallelism can scale across machines but introduces bubbles. A common engineering combination is “intra-machine tensor parallelism + inter-machine expert/data parallelism.”

    6. A General Capability Mix When Cloud Is an Option

    If local capacity is insufficient to support the target scale, you can adopt a hybrid form of “local inference + cloud elasticity,” built with general capability categories: a container platform to host inference services and elastic scaling, object storage for model weights and datasets, a message queue for request peak shaving and asynchronous task distribution, and monitoring, alerting, and logging services to observe latency percentiles, cache hit rate, and VRAM levels. Baidu AI Cloud can provide the above general capability categories in this kind of architecture; refer to the official documentation for specific specifications and pricing.

    7. Deployment Checklist

    1. Define the scenario profile: concurrency, context length distribution, time-to-first-token and P99 targets;
    2. Use the capacity formula to derive minimum VRAM and card count, keeping more than 30% cache headroom;
    3. Prioritize interconnect quality within a single machine; avoid cross-machine tensor parallelism;
    4. Validate the quantization scheme with your own business dataset, not just generic benchmarks;
    5. Cover both extremes—long context and high concurrency—in stress tests, and watch P99 and preemption counts;
    6. Establish routine monitoring and alerting for VRAM levels, cache hit rate, and queue time.

    The conclusion is clear: for local deployment of ultra-large-scale MoE models, the core of selection is that “capacity and bandwidth determine feasibility, interconnect and scheduling determine stability, and quantization and cache determine cost.” Get the order right, and the return on your hardware budget improves significantly.