Deploying Large-Scale MoE Models on 8 GPUs: Architecture, Parallelism, and Resource Planning
Eight-GPU deployments of large mixture-of-experts models cannot be planned from total VRAM alone. This article explains how backbone weights, Engram placement, tensor and expert parallelism, prefill vs. decode, and KV cache interact, and how to budget, test, and balance capacity, throughput, and latency.
Deploying Large-Scale MoE Models on 8 GPUs: Architecture, Parallelism, and Resource Planning
Deployment planning is more than total VRAM
When hosting large models locally, many teams first ask whether the combined GPU memory is enough. That check is too coarse. For mixture-of-experts (MoE) models, memory depends on parameter count plus weight format, how experts are sharded, context length, concurrency, and the runtime.
On an eight-GPU high-memory server, hundreds of gigabytes of VRAM still do not guarantee a stable run. You need answers to:
- Whether backbone weights stay resident in GPU memory
- Where Engram or conditional-memory modules live
- How expert layers are split across devices
- How compute paths differ between prefill and decode
- How much KV cache to reserve for context and concurrency
- Whether GPU interconnects can carry expert routing and tensor sync
- Whether the runtime needs extra workspace, scratch buffers, and fragmentation headroom
Eight-GPU deployment is a joint design of model structure, parallelism, and serving parameters—not a simple capacity match.
How MoE structure relates to parameter scale
These models use MoE: a shared backbone, many expert modules, and a gating network. Each token does not visit every expert; routing selects a small subset.
Activated parameter count and total weight size are different. Suppose the model has about 552B backbone parameters and about 196B Engram conditional-memory parameters. In prefill, each token may activate about 8B parameters; in decode, about 16B. A narrow compute path does not mean you only store 8B or 16B weights. Anything that must be accessed quickly may still sit in GPU memory, host memory, or another tier.
Resource needs fall into four buckets:
- Backbone weights: shared layers, attention, normalization, and expert parameters
- Engram access space: indexes, reads, and caches for conditional memory
- KV cache: key/value states for history tokens
- Runtime: communication buffers, temporary tensors, operator workspaces, and allocator overhead
Their mix changes with quantization, batching, and context length. One loading plan might use about 614GB of GPU memory as a planning reference; that number is not a fixed bar for every setup. Different precision, layered offload, or Engram placement change the real requirement.
Weight precision and memory budget
A simplified estimate is:
Weight memory ≈ parameter count × bytes per parameter × quantization and runtime factor
Bytes per parameter depend on format. FP16 is often about 2 bytes; low-bit formats use less, but scales, grouping, alignment, and dequant caches still add cost.
Do not treat “parameters times theoretical bytes” as the final number. Add headroom for:
- Temporary space during load and conversion
- Token-reorder buffers from expert routing
- Send/receive buffers for collective communication
- Operator-library workspaces
- Fragmentation and dynamic allocation
If you size only to the theoretical minimum, the model may load and then OOM when context or concurrency grows. A safer practice is 10–20% extra runtime reserve, then correct the budget with load tests.
Where to place Engram
Engram is a conditional-memory or external-parameter access structure. Access is typically index-, route-, and context-driven, so placement affects latency and VRAM pressure.
Common options:
All in GPU memory
Lowest access latency for strict SLAs, but it squeezes backbone weights and KV cache—especially under high concurrency and long context.Sharded across GPUs
Split by index range or tensor dim to cut per-card pressure. You need a cross-GPU access path; frequent remote hits can wipe out compute gains.GPU plus host hierarchy
Hot data on GPU, cold data in host RAM or fast storage. More capacity, with movement latency that must be tuned against locality, hit rate, and traffic mix.Cache-first
Keep a hot cache and evict infrequent entries. Fits skewed access, but cache thrash can hurt throughput.
Choose by Engram hit rate, cross-device traffic, per-request latency, and memory use—not only whether the model loads.
Tensor parallelism and expert parallelism
Eight-GPU setups usually combine tensor parallelism (TP) and expert parallelism (EP).
TP splits a layer’s matrix math across GPUs. It lowers per-card weight size but can add sync every layer, so interconnect bandwidth and latency matter.
EP places different experts on different GPUs. After routing, tokens go to the owning device and results come back. EP improves capacity use for large MoE models but can cause token exchange, imbalance, and congestion.
In short:
- TP is about per-layer matmul and sync efficiency
- EP is about token routing, expert load, and data movement
- Mixing them requires planning both weight splits and communication topology
- Larger parallel degrees make communication harder to ignore
Too much TP on every layer can flood the interconnect; too concentrated experts create hot GPUs. Tune against expert count, layer layout, interconnect, and target batch size.
Prefill vs. decode
Prefill processes the prompt with high compute parallelism and batched matmuls. Decode generates token by token: less work per step, but frequent weight and KV reads, so memory latency and scheduling dominate.
- Prefill is sensitive to input length and matmul throughput
- Decode is sensitive to KV capacity, memory bandwidth, and step latency
- Long inputs inflate prefill compute
- Long outputs and high concurrency grow KV cache
- One parallel layout may not fit both stages
For serving, you can isolate prefill and decode logically or use different schedulers: separate queues for long prompts, reserved cache for generation, and a max context cap so a few long jobs cannot fill the cluster.
KV cache drives concurrency
KV cache typically scales as:
KV cache ≈ layers × tokens × KV dim × dtype bytes × concurrent requests
Tokens include input plus generated tokens. Longer context and higher concurrency mean more cache.
Watch:
- Max context length
- Average input and output lengths
- Simultaneous active requests
- KV precision
- Paged or blocked cache management
- Prompt reclaim after requests finish
If weights already fill most VRAM, there is little room for KV, so concurrency stays low even after a successful load. For internal assistants and R&D tools, measure real request distributions and set a realistic context cap instead of chasing the longest window.
A four-tier layout for eight-GPU servers
Tier 1 — Resident model: shared backbone and hot experts. Keep this region stable; avoid frequent migration.
Tier 2 — Experts and Engram: place by access heat. Hot content stays on GPU; cold content can sit in host memory with a cache.
Tier 3 — KV cache: budget from max concurrency and max context. Those two limits cannot both grow without bound.
Tier 4 — Runtime reserve: communication buffers, temps, workspaces, and fragmentation. Serving traffic must not consume this entirely.
If you have two eight-GPU SKUs with different per-card memory, plans differ: more VRAM can favor larger KV and higher concurrency; smaller VRAM needs more aggressive quantization, hierarchical storage, expert offload, and admission control.
Validation and load testing
Suggested order:
- Verify weight format and model integrity on one GPU or a small cluster
- Verify multi-GPU load, expert placement, and communication topology
- Measure prefill throughput at fixed input length
- Measure decode latency at fixed output length
- Raise concurrency and watch KV growth
- Add long-context jobs and check peak memory
- Simulate expert hotspots and look for imbalance
- Record memory, interconnect traffic, token throughput, and tail latency
Minimum metrics: per-GPU memory, compute utilization, cross-GPU bandwidth, expert hit distribution, KV usage, queue time, time to first token, time per output token, timeouts, and OOM counts.
Summary
Eight-GPU MoE serving is not “sum the VRAM.” You need a capacity model for weights, Engram, KV cache, and communication. Activated parameters describe the compute path, not total storage. Engram placement trades memory for latency. TP and EP define interconnect patterns. Context and concurrency set KV pressure.
A practical path: measure request mix, then lock weight precision and Engram strategy, then design parallelism, then prove limits with prefill, decode, long-context, and high-concurrency tests. Only when model structure, hardware, topology, and serving knobs are designed together can an eight-GPU local deployment balance availability, throughput, and latency.
