Local Deployment of Large MoE Models on 8 GPUs: Memory Planning and Resource Allocation
Deploying a large MoE model on a local 8-GPU server requires more than checking whether total VRAM exceeds the parameter count. This article explains why aggregate VRAM is not a unified shared memory pool, breaks down the four coupled variables that determine feasibility—weight partitioning, conditional memory access paths, cross-GPU communication, and dynamic overhead from context length and concurrency—and shows how to budget VRAM, choose between tensor and expert parallelism, and tier conditional memory across VRAM and host memory. A practical planning checklist is included for teams building private AI assistants, coding assistants, and model API services.
1. Why “Enough Total VRAM” Does Not Mean “Deployable”
For internal AI assistants, coding assistants, and model API services, running a very large Mixture-of-Experts (MoE) model on a local 8-GPU server has become a common private deployment approach. However, many teams make a single subtraction during selection: they add up the nominal VRAM of the 8 cards, compare it against the model’s parameter count, conclude that “it fits,” and then run into throughput collapse, jittery time-to-first-token, or even terminated inference processes during load testing.
The root cause is that the combined VRAM of 8 accelerators is not a single, uniformly addressed shared memory pool. It consists of 8 isolated address spaces that can only exchange data over interconnect links with limited bandwidth. What actually determines deployment feasibility is four coupled variables: how weights are partitioned and placed, the access path to the conditional memory modules, the efficiency of cross-GPU communication, and the dynamic overhead introduced by context length and concurrency.
1.1 Activated Parameters Are Not the Same as VRAM Requirements
Take the model scale discussed in this article as an example: the backbone has roughly 552B parameters, with an additional ~196B conditional memory (Engram) parameters; during Prefill, about 8B parameters are activated per token, and during Decode, about 16B parameters are activated per token. These numbers are easy to misread—“if only 8B parameters are activated per token, isn’t 8B of VRAM enough?”
Activated parameters describe the subset of parameters that actually participate in matrix multiplications during a single forward pass. They determine compute and the computation path, not residency requirements. MoE routing is sparse, but all expert weights must reside somewhere; otherwise every token would have to be reloaded from host memory or storage, and latency would be unacceptable. VRAM planning must therefore cover four types of resources at once:
- Backbone weights: the resident portion determined by precision and partitioning scheme;
- Access space for conditional memory: depends on whether it sits in VRAM, host memory, or tiered storage;
- KV Cache: grows linearly with context length and concurrency;
- Runtime workspace and communication buffers: temporary operator tensors, intermediate attention results, and cross-GPU send/receive buffers.
For implementations that load with mixed precision, a public configuration has shown a VRAM budget of about 614GB as a planning reference for a specific loading scheme. This number should be understood as “a starting point under a certain placement strategy,” not a universal standard—it varies significantly with quantization method, where conditional memory is placed, and service parameters.
1.2 A Reusable Budget Estimation Example
The pseudocode below shows the recommended planning order: subtract runtime overhead first, then place weights, and finally allocate the remaining space to KV Cache to work backward to the concurrency that can be supported.
# Single-GPU VRAM budget breakdown (illustrative, unit: GB)TOTAL = 96.0runtime_reserve = 6.0 # workspace + communication buffers + VRAM fragmentationcomm_buffer = 4.0 # cross-GPU send/receive and synchronization buffersdef plan(weights_per_gpu, engram_in_vram, ctx_len, layers, kv_heads, head_dim, bytes_per_elem):free = TOTAL - runtime_reserve - comm_buffer - weights_per_gpu - engram_in_vramkv_per_token = 2 * layers * kv_heads * head_dim * bytes_per_elem # one copy each for K and Vmax_tokens = int(free / kv_per_token)return {"free_gb": free, "max_concurrent_tokens": max_tokens}# If conditional memory is placed in host memory, engram_in_vram can be set to 0print(plan(weights_per_gpu=72, engram_in_vram=0,ctx_len=32768, layers=61, kv_heads=8, head_dim=128, bytes_per_elem=2))
This example illustrates a key conclusion: moving conditional memory out of VRAM is equivalent to giving that budget to KV Cache, trading the same hardware for a longer context or higher concurrency.
2. Tensor Parallelism and Expert Parallelism: Two Partitioning Logics with Different Roles
2.1 Tensor Parallelism: Splits Compute and Synchronization Overhead
Tensor Parallelism (TP) splits the weight matrices inside a single operator across multiple GPUs by row or column. Each GPU holds a portion of the weights and computes a partial result, which is then merged through all-reduce-style communication. Its advantage is that it flattens very large dense layers so that a single GPU does not have to hold the full matrix; the cost is that every Transformer layer introduces at least one cross-GPU synchronization. Communication is frequent and extremely sensitive to link bandwidth and latency.
The practical rule of thumb is that the TP degree should not be maxed out blindly. When a TP group spans a lower-bandwidth link (for example, an interconnect path that has to go through a host-side relay), communication time can exceed computation time, producing “more GPUs, no speedup.” TP groups should therefore be kept within the highest-bandwidth GPU domain whenever possible.
2.2 Expert Parallelism: Splits Routing and Load Balancing
Expert Parallelism (EP) targets the MoE structure by distributing different experts across different GPUs, with each GPU storing only the expert weights it is responsible for. Because each token activates only a few experts, EP is very cost-effective in terms of VRAM efficiency, but it introduces a new variable: routing results determine where data goes, and the volume of cross-GPU all-to-all communication depends on the expert distribution of tokens.
Load imbalance is the most typical performance killer for EP. If routing hotspots concentrate on a few experts, the GPUs holding those experts become bottlenecks while the rest spin idle. In engineering practice, mechanisms such as capacity factor, auxiliary balancing loss, and expert replication are commonly used to mitigate this, but each of them in turn affects VRAM usage and throughput and must be weighed against business SLAs.
2.3 Combining Them and Matching the Topology
TP and EP can be stacked: first use TP to partition the dense backbone and attention, then use EP to distribute the expert layers. The chosen values must match the inference framework’s implementation constraints, the model structure, and the server’s actual topology. A practical decision process looks like this:
- Measure the actual bandwidth matrix of the GPU interconnects and delineate the high-bandwidth domains;
- Lock TP groups inside the high-bandwidth domains to avoid cross-domain synchronization;
- Place EP across the remaining dimensions and reserve VRAM for replicas of expert hotspots;
- Replay real business traffic and observe the variance in per-GPU utilization; if the variance is too large, adjust the EP or replica strategy.
3. Conditional Memory Placement: The Dividing Line in the Memory Architecture
The parameter count of the conditional memory module (Engram) can even exceed the scale of backbone activation, and its placement strategy directly changes the entire memory architecture. If all of it goes into VRAM, the space available for KV Cache and concurrency is severely compressed; if it sits in host memory, GPU VRAM can serve the backbone weights and runtime cache more, but every access has to cross the data path between host and device.
A more reasonable approach is therefore tiering: keep the frequently accessed portion in VRAM and push the rest down to host memory, combined with prefetching and cache reuse to reduce round trips. Three metrics matter when evaluating this: hit rate, per-access latency, and the degree to which prefetching interferes with the compute stream. It is worth noting that the host memory approach is not free—it places higher demands on memory capacity, memory bandwidth, and host-side scheduling, and capacity planning must include headroom for this part.
4. Context and Concurrency: The Dynamic Variables That Are Easy to Overlook
Static weights are only the starting point; what really consumes VRAM is the KV Cache. It grows roughly linearly with context length and the number of concurrent requests, and the coefficient differs markedly across precisions. The recommendations for planning are:
- Define the context limit explicitly, and distinguish the allocation between input length and generation length;
- Use “maximum total concurrent tokens” rather than “number of concurrent requests” as the capacity metric;
- Reserve a buffer for burst traffic to avoid triggering cache eviction at peak times and creating a long latency tail;
- For long-context scenarios, evaluate the payoff of common optimizations such as paged caching and prefix reuse.
5. Deployment Checklist
- Resource breakdown: account separately for backbone weights, conditional memory, KV Cache, runtime, and communication buffers; do not do a rough “total VRAM vs. parameter count” calculation;
- Precision strategy: define the precision for weights and cache separately; quantization has a dual impact on accuracy and throughput, and the acceptable range must be confirmed on the business side;
- Parallel configuration: bind TP groups to the high-bandwidth domain, watch load variance for EP, and adjust values according to topology and framework constraints;
- Memory tiering: prefer tiered placement for conditional memory, with prefetching and hit-rate monitoring in place;
- Capacity metric: define the concurrency limit by total tokens rather than by request count;
- Observability: deploy monitoring, alerting, and logging services to continuously track VRAM levels, cross-GPU communication time, routing distribution, and tail latency;
- Elastic path: when a private cluster is not economical for handling peaks, overflow traffic can be routed to comparable general-purpose inference resources in the public cloud, forming a hybrid elastic architecture.
In summary, the core of a local 8-GPU deployment is not “it fits,” but making weight partitioning, communication paths, memory tiering, and service parameters match one another. Shifting the planning metric from total VRAM to resource breakdown and communication efficiency is the key to reliably supporting enterprise AI assistants, coding assistance, and model API services.
