Local LLM Deployment: Hardware Selection and Performance Trade-offs in Practice

    This article explains how to deploy large language models locally and make practical hardware trade-offs. It covers the real inference bottleneck, discrete GPU versus unified memory designs, model selection across parameters, quantization, and context length, storage and I/O considerations, and workload-specific configuration guidance. It also includes a deployment checklist and common pitfalls.

    Local LLM Deployment: Hardware Selection and Performance Trade-offs in Practice

    Driven by requirements such as private deployment, keeping data inside the intranet, and offline operation, more developers and teams are trying to deploy large language models locally. However, once the work actually begins, many people encounter a counterintuitive fact: what determines whether a model can run is often not processor compute power, but available memory capacity.

    This article breaks local deployment into five areas: hardware architecture, model selection, quantization strategy, storage I/O, and workload matching, and explains the trade-off logic behind them.

    1. First, understand the real bottleneck in local inference

    Large-model inference can be divided into two stages: prefill and decode.

    The prefill stage processes all input tokens at once and is more sensitive to compute power, especially matrix multiplication throughput.

    The decode stage generates tokens one by one. For each token, the model weights must be moved from VRAM into the compute units. This makes decode a typical memory-bandwidth-bound task.

    This explains a common phenomenon: even when two models can both run, their decode speeds can differ significantly. The root cause is often the bandwidth used to read weights.

    An even more fundamental issue is that model weights must be fully or mostly resident in VRAM or unified memory. If capacity is insufficient, the model may not even start. Therefore, the first principles of local deployment are:

    1. Estimate the size of the quantized model weights.
    2. Check whether available memory can hold the weights, the KV cache, which depends strongly on context length, and runtime overhead.
    3. Only then evaluate whether decode speed meets the expected experience.

    2. The hardware route debate: unified memory vs. discrete GPUs

    Discrete GPUs: strong bandwidth, limited capacity

    Consumer discrete GPUs usually come with high-speed VRAM, such as GDDR, with bandwidth ranging from hundreds of GB/s to around 1 TB/s. This provides fast decoding and low latency, making them well suited for interactive scenarios that need dozens of tokens per second, such as coding assistants.

    Their main limitation is limited VRAM capacity. Mainstream cards commonly offer around 16 GB to 32 GB. As a rough 4-bit estimate, after accounting for runtime overhead, a 32 GB card can comfortably support models around the 30B parameter level and below. Running larger, higher-quality models becomes quite difficult.

    Unified memory: trading bandwidth for capacity

    A newer class of platforms integrates CPUs, GPUs, and memory into a unified memory architecture. In this design, the GPU can directly access system memory rather than being limited to a separate VRAM pool.

    These platforms typically provide large shared memory, such as 64 GB, 128 GB, or more, and allow a substantial portion of it to be used by the GPU.

    The value of this approach is that it directly addresses two questions: whether a model can run, and how large a context window can be used.

    • Capacity: A pool of more than 100 GB makes it possible to try quantized versions of 70B-class models or even larger models, or to open a very wide context window with a smaller model.
    • Trade-off: The physical bandwidth of unified memory is usually lower than that of high-end discrete GPUs. As a result, decode speed is noticeably slower, often measured at around 20–40 tokens per second.

    The trade-off chain of this route can be summarized as follows: trade bandwidth for capacity, trade capacity for context, and then trade context for the feasibility of more complex tasks such as AI agents.

    3. Model selection: balancing parameters, quantization, and context

    When selecting a model, do not simply assume that a larger parameter count is better. Instead, treat model selection as a three-way trade-off constrained by hardware.

    Quantization determines weight size

    The same model can require very different amounts of VRAM at different precisions. Quantization reduces size by using fewer bits per weight:

    1. Rough VRAM estimate for weights only (GB) ≈ parameter count (B) × bytes per parameter
    2. FP16: 2 bytes per parameter → 70B model ≈ 140GB
    3. INT8: 1 byte per parameter → 70B model ≈ 70GB
    4. INT4: 0.5 bytes per parameter → 70B model ≈ 35GB

    Quantization usually comes with some accuracy loss. 4-bit quantization is currently a common choice with a relatively good balance between size and quality, but lower precision is not always better. Validation with the target task is still required.

    Context window is a hidden memory consumer

    In addition to weights, the KV cache grows linearly with context length. Expanding context from 4K to 32K or 128K can consume substantial memory beyond the model weights themselves.

    This is where unified memory has a clear advantage: sufficient capacity makes it possible to enable long context. Long context is fundamental for document analysis, long conversational memory, and multi-turn tool use in AI agents.

    Architecture differences: dense models vs. sparse activation

    Some models use sparse activation architectures, such as mixture-of-experts (MoE). These models activate only a small subset of their parameters for each generated token.

    For such models, memory usage is determined by total parameter count, while compute usage is determined by activated parameter count. This means that under memory constraints, they can combine a relatively large total capacity with lower compute overhead per step.

    When selecting models, you can use this principle to judge fit: on platforms with limited bandwidth and moderate compute, sparse architectures can often be more cost-effective than dense models with similar task performance.

    Selection advice: First calculate weight size at the target precision and confirm that it fits within available memory. Then leave at least 20%–30% margin for KV cache and runtime overhead. When capacity allows, prioritize preserving enough quantization precision to avoid damaging task performance.

    4. Storage and I/O: the underestimated loading stage

    Running fast and loading slowly are two different problems. Weights of tens of gigabytes must be read from storage into memory during a cold start, and storage read bandwidth directly determines startup wait time.

    Several practical points are often overlooked:

    • Put weights on high-bandwidth lanes. Different M.2 slots on a motherboard may use different lanes. For example, one may use ×4 while another uses only ×1, which can create a several-times difference in performance. Place model weights on a high-bandwidth slot. Sequential read speeds can reach about 5–6 GB/s, reducing the load time for tens of gigabytes of weights from tens of seconds to about ten seconds.
    • Distinguish sequential reads from random reads. Model weight loading is mainly sequential, which is suitable for high-speed SSDs. However, some runtimes use mmap-style random mapped reads for files, which are more sensitive to random-read performance. Those weights should not be placed on low-speed disks.
    • Use hot/cold tiering. Low-speed or older disks can be used as a cold backup layer for archived data, while quantized weight files that require frequent access should be placed on high-speed primary drives.

    5. Match configuration to workload: define the use case first

    Different workloads have very different hardware requirements. Before choosing components, clarify the target use case:

    • Interactive completion / coding assistants: Require low latency and high decode speed. Prioritize bandwidth, making discrete GPUs more suitable. Smaller models and shorter contexts may be acceptable.
    • AI agent brain / long document analysis: More concerned with long-context capability and the ability to fit larger models. Unified memory has a clear advantage due to its large capacity. Around 20–40 tokens per second is often enough to support multi-step reasoning and tool calls.
    • Offline / private knowledge base: Latency is less sensitive, while throughput and capacity matter more. It may be acceptable to trade slower decoding for a larger model.

    6. Implementation checklist and common pitfalls

    Checklist before deployment:

    1. Identify the task type → decide whether capacity or bandwidth is the priority.
    2. Calculate weight size at the target precision + KV cache + runtime overhead, and leave 20%–30% margin.
    3. Confirm storage lane bandwidth and place weights on high-speed slots.
    4. Validate quantized model performance with real tasks, not just benchmarks.

    Common pitfalls:

    • ❌ “More compute means better performance” — decode is bandwidth-bound, not compute-bound.
    • ❌ “Bigger parameter count is always better” — ignoring quantization precision and context requirements may mean the model cannot even start.
    • ❌ “Larger context is always better” — long context consumes a large amount of memory and should be enabled as needed.
    • ❌ “Only look at decode speed, not loading time” — cold-start experience is also important and is affected by storage I/O.

    Summary: Local large-model deployment is essentially a constrained optimization problem that balances capacity, bandwidth, precision, and context. Unified memory trades bandwidth for capacity and the possibility of long context, making larger models and AI agent scenarios more feasible on local hardware. Discrete GPUs remain advantageous in interactive low-latency scenarios. Professional hardware selection is not about copying the most powerful configuration, but about starting from the task and calculating each trade-off clearly.