8-GPU Local LLM Deployment and Resource Planning for Large MoE Models

    This article breaks down the resource planning required to deploy a large MoE model locally on 8-GPU servers. It explains why total VRAM alone does not determine feasibility, how model structure splits the memory budget into four parts, and how tensor parallelism and expert parallelism divide the workload. It also covers conditional memory placement, NUMA and PCIe topology checks, and planning guidance for three common use cases. Readers will find a reusable framework for sizing KV Cache, setting context and concurrency limits, and reserving enough headroom to move from a server that boots to a service that can be operated.

    1. Background: Why “Enough Total VRAM” Does Not Mean “Deployable”

    For internal enterprise AI assistants, coding assistants, and model API services, deploying a very large Mixture-of-Experts (MoE) model locally is often reduced to a simple addition problem: sum the nominal VRAM of several accelerators and check whether the total exceeds the model weight size. In practice, this check is only a first filter, and it is still far from a deliverable service level.

    Take a typical large MoE model as an example: the backbone has roughly 500 billion parameters, plus a set of “conditional memory (Engram)” parameters on the order of 200 billion. During the prefill stage, about 8 billion parameters are activated per token; during the decode stage, about 16 billion. The first correction these numbers force is that activated parameters describe the subset of parameters a single forward pass goes through, not the weight size that stays resident in VRAM. Sparse activation reduces compute and bandwidth pressure; it does not make inactive experts disappear from VRAM.

    The second correction is that the sum of VRAM across 8 accelerators is not a shared memory with a unified address space. Each card is an independent device, and cross-card access requires explicit communication. Whether weight sharding is balanced, whether expert distribution is skewed, and whether communication overlaps with computation all directly determine end-to-end performance.

    This article uses two common configurations as examples: 8×96GB and 8×72GB servers, with 768GB and 576GB of total VRAM respectively. It presents a reusable analysis framework across three layers: model structure, parallelism strategy, and resource planning.

    2. How Model Structure Determines Memory Planning

    2.1 Four Resource Categories Must Be Accounted for Separately

    The VRAM budget for a complete deployment should be split into at least four parts:

    1. Backbone weights: resident in VRAM, directly tied to total parameter count and numerical precision;
    2. Conditional memory access space: depends on placement strategy, and may land in VRAM or host memory;
    3. KV Cache: grows linearly with context length, batch size, number of layers, and number of key/value heads, and is the most easily underestimated part;
    4. Runtime workspace and communication buffers: includes intermediate activation tensors, temporary operator buffers, send/receive buffers for parallel communication, and the framework’s own context overhead.

    A simplified illustration (showing budget structure only, not measured values from any specific implementation):

    1. Per-GPU VRAM budget ≈ backbone weight shard
    2. + conditional memory shard (if resident in VRAM)
    3. + KV Cache (context × concurrency)
    4. + activations and temporary buffers
    5. + communication buffers and safety margin (10%~15% recommended)

    With mixed-precision loading, the industry has used roughly 614GB as a planning reference for a certain loading path, but this is only an anchor under specific conditions. Once the quantization method, conditional memory placement, or service parameters change, actual demand will drift noticeably. The more reliable engineering approach is to get a minimal viable configuration running first, then work backward from load test results to set the margin.

    2.2 Context and Concurrency Are Multipliers on VRAM

    KV Cache capacity can be approximated as “cached bytes per token × context length × number of concurrent requests.” This means that expanding context from a few thousand to the hundred-thousand range, or increasing concurrency from single digits to dozens, can multiply VRAM demand several times over. Planning should clearly separate two goals: long-context capability for a single request, and high-concurrency throughput across many requests. The two compete for resources in different ways and usually require separate limits and degradation strategies.

    3. Parallelism Strategy: The Division of Labor Between Tensor and Expert Parallelism

    3.1 Tensor Parallelism (TP)

    Tensor parallelism splits a single large matrix operation across multiple devices, reducing the weight and compute burden per GPU. It suits structures with few layers but very large per-layer size. The cost is that each layer may require cross-device reduction (such as all-reduce), making it sensitive to inter-card bandwidth and latency. In practice, the TP degree should be kept within the high-speed interconnect inside a single machine, avoiding fine-grained synchronization across nodes.

    3.2 Expert Parallelism (EP)

    Expert parallelism targets the expert layers of MoE models, placing different experts on different devices. Since each token is routed to only a few experts, actual load depends on whether routing is balanced. If hot experts are concentrated, some devices become overloaded while others sit idle. Common mitigations include capacity factor constraints, load balancing loss, and redundant expert replicas.

    3.3 Combining Them and Matching the Topology

    TP and EP can be stacked, but their values must match the inference framework, model implementation, and server topology. A practical order of decisions is:

    1. 1) First determine whether the weights fit (sets the minimum parallelism)
    2. 2) Then determine the inter-card interconnect form (sets the TP upper bound)
    3. 3) Then set EP based on expert count and routing heat
    4. 4) Finally fine-tune with load tests and watch for communication bubbles

    4. Conditional Memory Placement: From a VRAM Problem to a System Problem

    Some implementations place conditional memory in host memory, leaving more of the valuable VRAM for backbone weights and runtime cache. This does not make the cost disappear; it shifts the evaluation focus to the host side: memory capacity, memory bandwidth, NUMA topology, PCIe lane assignment, and cache and prefetch policies.

    For server integration and deployment engineers, the configuration checklist should verify more than the accelerator model: whether memory is symmetrically distributed under a dual-socket CPU, which PCIe root complex each card is attached to, and whether the inference process’s CPU/GPU affinity matches the device topology. A common performance trap is a process being scheduled to a remote NUMA node, so every access crosses sockets and latency rises sharply.

    1. # Example: inspect device and NUMA/accelerator topology
    2. lscpu | grep -i numa
    3. numactl --hardware
    4. # Example: start the inference process with explicit affinity (adjust parameters to the actual framework)
    5. numactl --cpunodebind=0 --membind=0 <inference launch command>

    5. Planning Recommendations for Three Use Cases

    • Internal enterprise AI assistant: moderate concurrency and longer contexts; prioritize KV Cache headroom and stable latency, and consider moderate quantization of backbone weights;
    • Coding assistant: bursty requests with large per-request context; set a hard limit on context length and pair it with request queuing and truncation policies;
    • Model API service: throughput and SLA focused; build batching, concurrency limits, timeouts, and degradation paths into the capacity model, and continuously monitor VRAM levels and queue latency with alerting.

    For a cloud-based form, container platforms can handle orchestration and elastic scaling, object storage can hold model files, and logging plus monitoring and alerting can close the observability loop, turning capacity planning from a one-time estimate into continuous calibration.

    6. Common Pitfalls and a Pre-Deployment Checklist

    1. Treating activated parameters as the VRAM requirement;
    2. Treating multi-GPU VRAM as shared memory;
    3. Ignoring runtime and communication buffers, causing overflow as soon as load testing starts;
    4. Looking only at GPU specs while ignoring CPU memory and PCIe topology;
    5. Setting no context or concurrency limits, which distorts the capacity model.

    Before going live, confirm each item: whether weight shards are balanced, whether expert routing is skewed, whether inter-card communication overlaps with computation, whether host-side bandwidth is a bottleneck, and whether the margin is at least 10%. Once these checks are done, 8-GPU local deployment can move from “it boots” to “it can be operated.”