Local Deployment of Large Models on 8 GPUs: Resource Planning Explained
This article explains why total VRAM capacity alone does not make an 8-GPU server viable for large model deployment. It breaks down the resource profile of large MoE models, compares tensor parallelism and expert parallelism, discusses host-memory placement for conditional memory, and outlines a server integration checklist and a step-by-step validation path for matching weights, cache, and communication to real workloads.
Local Deployment of Large Models on 8 GPUs: Resource Planning Explained
一、Why “Enough Total VRAM” Does Not Mean “Deployable”
Driven by demands such as internal enterprise AI assistants, coding assistants for developers, and model API services, more teams are trying to run very large Mixture-of-Experts (MoE) models on their own 8-GPU servers. The most common mistake during selection is adding up the nominal VRAM of the 8 GPUs and dividing it by the model parameter count to conclude that everything “just fits.”
In a real system, at least five variables determine the deployment shape: how the backbone weights are partitioned and placed, where the access space for conditional memory (Engram-like structures) resides, how MoE experts are distributed across devices, which interconnect links carry inter-device communication, and the cache pressure created by context length and concurrency. If any one of these is unbalanced, a plan that looks sufficient in terms of capacity will expose latency jitter or throughput collapse under load testing.
One concept needs clarification first: the sum of VRAM across 8 cards is not a single shared memory pool. It consists of 8 independent address spaces, and cross-card access must go through explicit communication or host memory as an intermediary. Capacity planning is therefore only the first step; topology and data placement are the real dividing line for efficiency.
二、Model Structure Defines the Resource Profile: Activated Parameters Are Not Weight Footprint
Take a certain class of very large MoE models as an example. Its typical structure is roughly 552B backbone parameters plus about 196B conditional memory parameters, with approximately 8B and 16B activated parameters per token during Prefill and Decode, respectively. These numbers are often misread.
Activated parameters describe the scale of the path that actually flows through a single forward pass. They determine compute demand and part of the bandwidth pressure, but all expert weights and backbone weights must either stay resident or be swappable in quickly. VRAM usage depends on “all weights that need to be addressed,” not “the portion computed this time.” This is why the activated volume during decoding is small while VRAM remains tight.
In engineering terms, resources should be split into four independent budgets:
- Backbone weights: partitioned according to the parallelism strategy, forming the baseline of VRAM usage;
- Conditional memory access space: determines whether it stays resident in VRAM or in host memory, with additional cache and index overhead;
- KV Cache: grows roughly linearly with context length and concurrency, and is the item most easily underestimated;
- Runtime workspace and communication buffers: including temporary activations, operator workspaces, and cross-card send/receive buffers, which usually require a fixed reserve.
For mixed-precision loading implementations, a public configuration has used a VRAM budget of about 614GB as a planning reference for a specific loading method. Such numbers can only serve as order-of-magnitude anchors; actual values drift significantly with quantization method, conditional memory placement, and service parameters, and should not be copied directly into a procurement list.
三、TP and EP: Division of Labor and Cost Between Two Parallelism Paradigms
Tensor Parallelism (TP) splits the large matrix operations within a single layer horizontally across multiple cards, reducing the weight and compute burden per card. It suits dense large layers such as attention and feed-forward. The cost is a cross-card reduction at every layer, with high communication frequency and sensitivity to link bandwidth and latency. TP degree should therefore not be maxed out blindly; it must match inter-card interconnect capability.
Expert Parallelism (EP) targets MoE expert networks by distributing different experts across devices. Since each token activates only a few experts, the actual load depends on routing distribution: cards hosting popular experts may become overloaded while cards with cold experts idle, causing queuing in cross-card data exchange. The benefit of EP is strongly correlated with routing balance.
The two can be combined, but their values must align with the inference framework implementation, the model structure, and the server topology. A practical order of judgment is: first determine the minimum parallelism from the VRAM lower bound, then decide whether to increase it based on interconnect capability, and finally validate routing balance by replaying real business workloads.
# Pseudocode: decision skeleton for parallelism selectionmin_parallel = ceil(total_weight_bytes / usable_vram_per_gpu)if interconnect_bandwidth is high and latency is low:tp = min(min_parallel, 4) # prioritize limiting TP communication layersep = ceil(min_parallel / tp) # assign remaining dimensions to expert parallelismelse:tp = 2 # lower TP when communication is constrainedep = ceil(min_parallel / tp)assert ep * tp <= gpu_count
四、Conditional Memory Placement: Shifting Cost to the Host Side
Some implementations place conditional memory in host memory so that precious VRAM can serve more of the backbone weights and runtime cache. This does not make the cost disappear; it shifts the evaluation focus from GPU VRAM to CPU memory capacity, memory bandwidth, NUMA distribution, PCIe access paths, and cache strategy.
Once the host memory route is taken, memory access latency becomes the critical path during Decode. At this point, attention should be paid to whether memory is evenly populated across NUMA nodes, whether accesses cross nodes, whether page cache and prefetch strategies match the workload’s access pattern, and whether index structures stay resident in memory to avoid repeated construction. A practical approach is to keep the “hot zone” of conditional memory as close as possible to the NUMA node of the GPU initiating the computation.
五、Server Integration Checklist: Verifying Topology Matters More Than the Spec Sheet
For integration and deployment engineers, the configuration list should not stop at GPU models but should also verify:
- Memory channels and capacity distribution under a dual-socket CPU setup, to avoid a single node’s memory becoming the bottleneck;
- The actual connection between PCIe slots and GPUs, confirming whether any cross-CPU “detour” links exist;
- CPU/GPU affinity binding of inference processes to reduce cross-NUMA jitter;
- Inter-card interconnect form and available bandwidth, as a hard constraint on TP/EP values.
With the same 8-GPU count, latency and throughput can differ by several times depending on topology and data placement.
六、Implementation Path and Validation Method
A four-step approach is recommended: first build a static budget for weights and cache; then validate correctness with short context and low concurrency; next gradually scale up context and concurrency while observing the growth curves of KV Cache and communication buffers; finally run long-duration stress tests with the real request distribution of the business, recording P99 latency and throughput inflection points.
If an enterprise lacks the conditions for self-building and tuning, it can also evaluate general capabilities from Baidu AI Cloud, such as using a container platform to host inference services, object storage to distribute model files, and monitoring, alerting, and logging services to observe latency and VRAM levels, allowing effort to focus on model quality and business integration.
Overall, the core of local 8-GPU deployment is not “fitting it in,” but finding a balance among weights, conditional memory, cache, and communication that matches the business workload.
