8-GPU Local LLM Deployment: Architecture and Resource Planning for Large MoE Models
This article explains how to plan resources for deploying large MoE models locally on 8-GPU servers. It shows why total VRAM alone is not a reliable feasibility check, breaks down four resource categories that must be modeled separately, compares tensor parallelism and expert parallelism, discusses where to place conditional memory parameters, and outlines capacity trade-offs between 8x96GB and 8x72GB platforms along with a validation and tuning workflow.
1. The Starting Problem: Total VRAM Is Not the Only Constraint
When deploying very large Mixture-of-Experts (MoE) models locally, a common mistake is treating the sum of the nominal VRAM across 8 accelerators as the feasibility criterion. Consider two 8-GPU platforms: 8x96GB and 8x72GB. The former offers roughly 768GB of nominal capacity, while the latter offers about 576GB. Both appear large enough to hold a 600GB-class model, but whether a deployment runs stably and meets latency and throughput targets depends on four more specific questions:
- How the backbone weights are partitioned and placed;
- Whether conditional memory parameters (Engram-like structures) reside in VRAM or host memory;
- How MoE experts are distributed across devices and whether routing is balanced;
- Whether inter-GPU and host-to-device communication paths are efficient.
This article uses a reference MoE model with roughly 552B backbone parameters plus 196B conditional memory parameters (with approximately 8B and 16B activated parameters per token during Prefill and Decode, respectively) to discuss resource planning and tuning for an 8-GPU server. The capacity figures here are planning references based on publicly stated configuration scales; actual values vary with quantization, placement strategy, and serving parameters.
2. Model Structure Determines the Resource Profile
2.1 Activated Parameters Do Not Equal VRAM Usage
Activated parameters describe the subset of parameters that a single token’s forward pass actually goes through. They determine compute demand and the distribution of memory access hotspots, but all weights must reside somewhere, whether activated or not. Therefore, “only 8B/16B activated per token” does not imply “only 8B/16B of VRAM is needed.” Planning must treat the full set of weights as a resident resource.
2.2 Four Resource Categories Must Be Modeled Separately
- Backbone weights: Scale linearly with precision and quantization scheme; they are the main VRAM consumer.
- Conditional memory access space: Depends on placement (VRAM or host memory) and access granularity.
- KV Cache: Grows with context length, concurrent requests, layer count, KV head count, and data type.
- Runtime workspace and communication buffers: Include temporary operator tensors, sampling and scheduling overhead, and parallel communication buffers.
Here is an estimation skeleton that is convenient for internal review (illustrative, not measured from a specific product):
# Single-GPU VRAM budget illustrationbudget = gpu_memory_gibplan = {"weights_shard": total_weight_bytes / tp_size / gib,"engram_resident": 0.0, # 0 if placed in host memory"kv_cache": per_token_kv_bytes * max_seq_len * max_batch / gib,"runtime_workspace": 0.10 * budget, # empirical reserve"comm_buffer": 0.05 * budget,}assert sum(plan.values()) <= 0.92 * budget # leave room for fragmentation and safety margin
The per-token KV Cache overhead can be approximated as:
per_token_kv_bytes ≈ 2(K/V) × layers × kv_heads × head_dim × dtype_bytes
When context grows from 8K to 128K and concurrency rises from single digits to dozens of requests, KV Cache can shift from a “rounding error” to the “main bottleneck.” This is the fundamental reason why long-context serving and short Q&A serving require different resource profiles.
3. Parallelism Strategy: Roles and Combinations of TP and EP
3.1 Tensor Parallelism (TP)
TP splits the large matrix operations inside a single layer across multiple GPUs by dimension, reducing per-GPU weight and compute pressure. It suits dense layers and attention projections with concentrated parameters. The cost is that every layer requires cross-GPU reduction, making communication frequent and sensitive to bandwidth and topology. Too high a TP degree introduces synchronization overhead; too low a degree means a single GPU cannot hold the weights. It is typically set to 4 or 8 when matched to inter-GPU interconnect bandwidth.
3.2 Expert Parallelism (EP)
EP targets MoE expert networks by placing different experts on different devices. Because routing is sparse, EP’s VRAM usage is more “on demand,” but it introduces all-to-all style token dispatch and result collection. Load imbalance (popular experts being over-activated) causes long-tail latency. Common mitigations include capacity factor limits, redundant expert replicas, and load-balancing auxiliary losses.
3.3 Combination and Topology Matching
TP and EP can be combined, for example, attention using TP and expert layers using EP. The values must match the inference framework’s execution graph, model implementation details, and server topology: prioritize carrying TP and all-to-all within high-bandwidth inter-GPU domains, and use cross-domain links for parameter loading and low-frequency synchronization.
# Launch parameter illustration (field names are illustrative; naming differs across frameworks)serve --model-path /models/moe-large \--tensor-parallel-size 8 \--expert-parallel-size 4 \--max-model-len 32768 \--gpu-memory-utilization 0.90 \--engram-placement host \--numa-binding auto
4. Conditional Memory Placement: From a VRAM Problem to a Memory Architecture Problem
Placing conditional memory in host memory frees scarce VRAM to serve backbone weights and runtime caches more, but the cost does not disappear; it shifts to CPU memory capacity and bandwidth, NUMA node affinity, PCIe access paths, and caching and prefetch strategies. Cross-NUMA access can further jitter already sparse memory access.
Engineering practice should ensure:
- With dual-socket CPUs, verify that memory module counts and per-node capacity are symmetric to avoid a single node becoming a bottleneck;
- Confirm the connection relationships between accelerators and memory controllers and I/O switch chips, keeping communication within the same high-bandwidth domain as much as possible;
- Set CPU/GPU affinity and memory binding for the inference process to reduce cross-node drift;
- Consider tiered caching for frequently accessed conditional memory segments, keeping hot data closer.
5. Capacity Planning in Practice: Trade-offs Between Two 8-GPU Platforms
- 8x96GB platform: More generous VRAM headroom supports longer context and higher concurrency, or keeps part of the conditional memory in VRAM to reduce access latency.
- 8x72GB platform: Requires more aggressive quantization, stricter KV Cache limits, and greater reliance on host memory for conditional memory. Here, CPU memory and PCIe topology become decisive factors.
A unified configuration checklist should include: GPU model and count, usable VRAM per GPU, CPU and memory distribution, PCIe topology, parallelism values, context and concurrency limits, quantization scheme, and affinity settings. With the same GPU count, measured latency and throughput can diverge significantly depending on topology and data placement.
6. Validation and Tuning Loop
- Baseline load testing: Fix the input/output length distribution and record time-to-first-token, per-token latency, throughput, and peak VRAM.
- Bottleneck identification: Distinguish compute-bound, VRAM-bound, and communication-bound cases, and observe whether expert load is skewed.
- Parameter iteration: Adjust TP/EP combinations, context and concurrency limits, and quantization precision.
- Observability: Integrate general monitoring, alerting, and logging services, and build dashboards for VRAM, temperature, link bandwidth, and request queuing.
- Rollout strategy: First validate with a single replica on a container platform, then scale up gradually and finalize the resource checklist.
7. Conclusion
The essence of 8-GPU local deployment is “resource profile matching”: first model the four resource categories, then choose a TP/EP combination that matches the topology, and finally use affinity and observability to turn theoretical capacity into stable throughput. If an organization wants to avoid the burden of low-level planning and operations, it can also evaluate general-purpose container platforms, monitoring and alerting, and logging services such as those offered by Baidu AI Cloud, focusing its energy on business outcomes themselves.
