Local Deployment of Large MoE Models on 8 GPUs: Memory Planning and Resource Allocation
This article explains why total VRAM capacity alone does not guarantee a successful local deployment of large Mixture-of-Experts (MoE) models on an 8-GPU server. It breaks the memory budget into four parts—backbone weights, conditional memory, KV Cache, and runtime buffers—and shows how tensor parallelism (TP) and expert parallelism (EP) divide the workload and introduce communication costs. You will also find practical guidance on where to place conditional memory, how context length and concurrency affect resource usage, and a step-by-step checklist for sizing and validating an 8-GPU inference deployment.
1. Why “Enough Total VRAM” Does Not Mean “It Will Run”
For internal enterprise AI assistants, developer productivity tools, and model API services, deploying very large Mixture-of-Experts (MoE) models on-premises is becoming a common requirement. When evaluating hardware, many teams start by adding up the nominal VRAM: 8 GPUs at 96 GB each gives 768 GB, which looks like enough to hold a model in the 600-plus GB range. In real deployments, however, whether the system runs stably usually depends not on total capacity but on four questions:
- Where do the backbone weights and the conditional memory modules live?
- How are the MoE experts distributed across devices, and is routing balanced?
- Does inter-device communication match the server topology?
- Do the context length and concurrency exceed what the runtime cache can hold?
The key thing to understand is that multi-GPU VRAM is a set of physically separate memory blocks, not one unified, shared address space. Any cross-GPU access must go over a bus or network. Sufficient capacity only solves the “does it fit” problem; “does it run, and run stably” depends on how balanced the allocation is and how efficient the communication is.
2. How Model Structure Determines the Memory Budget
Take a common class of very large MoE models as an example. A typical configuration has roughly 552B backbone parameters plus about 196B conditional-memory parameters. During the Prefill and Decode stages, the number of activated parameters per token is about 8B and 16B respectively.
The most easily misread point here is that a small number of activated parameters does not mean a small memory requirement. Activated parameters describe the subset of parameters that a single forward pass actually goes through—that is a compute metric. During deployment, all expert weights must either stay resident or be quickly schedulable, which is a capacity metric. The two cannot be derived from each other.
A more rigorous approach is to split resources into four separate budgets and plan each one:
- Backbone weights: Strongly tied to the precision mode. Under a mixed-precision implementation, a public configuration has shown a VRAM budget of about 614 GB as a planning reference for a specific loading method; the actual value varies with the quantization scheme and loading strategy.
- Conditional memory access space: If placed in host memory, VRAM pressure drops but access latency rises; if placed in VRAM, bandwidth is better but it squeezes the runtime cache.
- KV Cache: Grows roughly linearly with context length and concurrency, and is the first killer in long-text scenarios.
- Runtime workspace and communication buffers: Includes temporary operator tensors, routing buffers, and cross-GPU send/receive buffers. Often overlooked, yet they genuinely consume VRAM.
A practical capacity-check approach looks like this (illustrative, not a specific API):
def estimate(weights_gb, engram_on_gpu_gb, ctx_len, concurrency,kv_per_token_mb, runtime_gb=12):kv_gb = ctx_len * concurrency * kv_per_token_mb / 1024total = weights_gb + engram_on_gpu_gb + kv_gb + runtime_gbreturn total
It is a good idea to always keep a 10%–15% margin to handle VRAM fragmentation and bursts of concurrency.
3. TP and EP: The Division of Labor and the Cost of Two Parallelism Strategies
Tensor parallelism (TP) splits the computation tensors of a single large layer across multiple devices, reducing the weight and compute pressure on each GPU. It suits the dense large-matrix operations in the backbone. The cost is that every layer requires cross-device synchronization, so it is sensitive to inter-GPU bandwidth. As a result, the TP degree usually should not exceed what the high-speed interconnect within a single machine can support.
Expert parallelism (EP) targets the expert networks of MoE models by placing different experts on different devices. Since each token activates only a few experts, whether the load is balanced depends heavily on the routing distribution. Once hot experts concentrate on certain devices, some devices become overloaded while others sit idle. At the same time, tokens must be sent to the devices that host their experts, and the volume of cross-GPU data exchange rises with the EP degree.
The two can be combined, but their values must match the inference framework implementation, the model structure, and the server topology. A practical order is: first use TP within a single machine to contain the backbone, then use EP to spread out the experts, and finally fine-tune based on the measured skew in expert load.
4. Where to Place Conditional Memory
The placement of the conditional memory module changes the entire memory architecture. Placing it in host memory lets precious VRAM serve the backbone weights and runtime cache more, at the cost of higher latency because every access must cross the bus. Placing it in VRAM provides ample bandwidth but compresses the space available for the KV Cache.
The deciding factor is not “which is faster” but the access pattern: if the module is accessed frequently during the Decode stage, keeping it resident in VRAM is more worthwhile; if access is sparse and dominated by Prefill, the host-memory approach offers better overall cost-performance. If the enterprise side already has general cloud capabilities such as a container platform, object storage, and log monitoring, it can further link model loading, cache warm-up, and runtime metric collection into an observable deployment pipeline.
5. Context and Concurrency: The Undervalued Variables
Context length and concurrency together determine the size of the KV Cache and indirectly amplify the demand for communication buffers. In practice, it is recommended to:
- Set the context limit based on the real token distribution of the business, rather than always chasing the maximum length;
- Run step-wise stress tests with a fixed concurrency and watch for the inflection points in time-to-first-token and throughput;
- Define separate resource policies for Prefill and Decode so that long requests do not block short ones.
6. Selection Checklist
- Clarify the precision and quantization scheme, and calculate the weight baseline first;
- Decide where to place conditional memory, and reserve a budget for access latency;
- Determine the TP/EP combination, and verify the topology and bandwidth;
- Stress-test the KV Cache with real context lengths and concurrency;
- Reserve a 15% margin and set up monitoring and alerts for VRAM and latency.
Following this order is what allows you, under the common 8-GPU resource spec, to align the model structure, parallelism strategy, and business workload into a stable, operable local inference service.
