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

    This article explains why total VRAM capacity alone does not guarantee smooth deployment of large-scale MoE models on a single 8-GPU server. It breaks down the four components of runtime memory usage, outlines a model-driven planning sequence, compares tensor parallelism and expert parallelism, discusses where to place conditional memory parameters, and provides reference strategies for 96GB and 72GB GPU configurations along with a pre-launch checklist.

    1. Why “Enough Total VRAM” Does Not Mean “It Will Run Well”

    When deploying an ultra-large-scale Mixture-of-Experts (MoE) model on a single 8-GPU machine, the most common mistake is to add up the nominal VRAM of the eight accelerators, subtract the model weight size, and conclude how much headroom remains. This calculation works as a first-order filter, but it is far from sufficient for stable operation.

    Actual runtime VRAM usage is the sum of at least four resource categories:

    1. Backbone weights: the dense parts, including attention layers, normalization layers, embedding and output layers;
    2. Conditional memory / external parameter space: some newer architectures place part of their parameters outside VRAM or in a separately addressed space;
    3. KV Cache: grows linearly with context length and the number of concurrent requests;
    4. Runtime workspace: temporary operator buffers, communication send/receive buffers, VRAM fragmentation, and framework reservations.

    More importantly, the VRAM on eight GPUs consists of eight independent address spaces. Any cross-GPU collaboration incurs communication overhead, so balanced allocation and efficient communication matter just as much as raw capacity.

    2. Working Backward from Model Structure to Resource Planning

    Take a typical ultra-large-scale MoE architecture as an example. Its defining traits are a backbone of several hundred billion parameters plus a separate conditional memory parameter set on the order of a hundred billion. The activated parameter count per token differs noticeably between the Prefill and Decode stages (roughly under ten billion for the former and slightly over ten billion for the latter).

    One frequent misunderstanding must be cleared up here: a small activated parameter count does not mean a small VRAM requirement. Activated parameters describe the path width actually traversed by a single token’s forward pass, which determines compute and memory-access pressure. Meanwhile, all expert weights and backbone weights must either stay resident or be schedulable quickly enough; otherwise, parameters cannot be fetched in time when routing selects a given expert. The planning order should therefore be:

    • Estimate backbone weight size under mixed precision first;
    • Then decide whether conditional memory parameters live in host memory or VRAM;
    • Then estimate KV Cache from “context length × concurrency × number of layers × number of KV heads”;
    • Finally reserve 10%–20% for runtime workspace and fragmentation.

    An illustrative accounting logic (pseudocode that shows only the order, not the parameters of any specific implementation):

    1. total = 0
    2. total += backbone_params * bytes_per_param # Backbone weights
    3. total += engram_in_vram * bytes_per_param # Counted only when placed in VRAM
    4. total += kv_cache( layers, kv_heads, ctx_len, concurrency )
    5. total += runtime_workspace( fragmentation=0.15 )
    6. assert total <= per_gpu_vram * gpu_count * 0.85 # Keep a safety margin

    3. Tensor Parallelism and Expert Parallelism: Two Orthogonal Sharding Axes

    Tensor parallelism (TP) splits a single large matrix operation horizontally into blocks distributed across GPUs. It suits compute-intensive dense layers with huge weights. The cost is a reduction or all-gather synchronization at every layer, which makes it sensitive to inter-GPU interconnect bandwidth; when the TP degree is too high, communication overhead eats into the parallel gains.

    Expert parallelism (EP) targets the expert networks of an MoE model by placing different experts on different devices. Because each token activates only a few experts, the actual load depends on the routing distribution: the GPU hosting popular experts may be overloaded while the one hosting unpopular experts sits idle. EP must therefore be evaluated together with routing-balancing strategies, capacity factors, and cross-GPU data exchange.

    The two can be combined, but their values must match how the inference framework implements them, the model’s layer structure, and the server topology (whether GPUs are linked by high-speed interconnects or go through the host). A practical rule of thumb: carry TP on the highest-bandwidth GPU links, put EP on the relatively more relaxed links, and make the number of experts divisible by the EP degree to reduce tail-block imbalance.

    4. Placement Strategies for Conditional Memory

    Some implementations place conditional memory parameters in host memory, with the host handling addressing and data fetching, freeing precious VRAM for backbone weights and KV Cache. The benefit is a significant drop in VRAM pressure; the cost is a host-to-device data path that may raise per-token latency, with a relatively small impact on Prefill throughput but a more noticeable effect on Decode tail latency.

    Selection guidance:

    • Long context, high concurrency, throughput first: prefer host-side placement plus a more aggressive KV Cache budget;
    • Interactive assistants that emphasize first-token and tail latency: evaluate keeping the most frequently accessed portion in VRAM;
    • Either way, run stress tests with real business distributions rather than theoretical averages.

    5. Two Reference Approaches for 8-GPU Resource Planning

    For two common 8-GPU configurations (around 96GB per GPU and around 72GB per GPU), the planning approach is the same but the headroom strategy differs:

    • 96GB class: VRAM is relatively ample, allowing longer context and higher concurrency; the TP degree can be raised moderately, and conditional memory can be tried in VRAM to reduce latency;
    • 72GB class: VRAM is tighter; place conditional memory in host memory, cap concurrency, adopt chunked or quantized KV Cache, and align the EP degree with the number of experts to avoid fragmentation.

    Both classes should follow the same principle: get a minimal working configuration running first, then gradually relax context and concurrency, observing the VRAM level, inter-GPU communication share, and routing balance at every step.

    6. Pre-Launch Checklist

    1. Does the VRAM level stay stably below the safety line without periodic spikes?
    2. Are weights and experts evenly distributed across GPUs, with no chronically hot GPU?
    3. Has inter-GPU communication become a bottleneck, or is the TP degree too high?
    4. Does KV Cache grow linearly with concurrency and trigger swapping?
    5. Does the conditional memory fetch path introduce unacceptable tail latency?
    6. Are monitoring, alerting, logging, and containerized orchestration in place to support canary releases and rollbacks?

    7. Conclusion

    Deploying an ultra-large-scale MoE model on a single 8-GPU machine is essentially an engineering optimization problem under three constraints: capacity, bandwidth, and routing balance. Account for model structure, parallelism strategy, and memory placement on the same canvas, then combine them with general-purpose cloud capabilities such as those offered by Baidu AI Cloud (container platforms, monitoring and alerting, object storage) for elastic fallback and observability, so that local deployment runs both stably and sustainably.