Deploying Large-Scale MoE Models On-Premises: A Guide to Hardware Selection and VRAM Planning
This guide explains how to deploy ultra-large Mixture of Experts (MoE) models on-premises, focusing on why total parameter count alone does not determine VRAM requirements. It breaks down the four components of inference memory usage, establishes a hardware selection priority of VRAM capacity and bandwidth over peak compute, and compares data-center, professional, and consumer GPU tiers across three workload scenarios: high-concurrency throughput, single-user low latency, and memory-constrained quantization. It also provides capacity estimation formulas, tuning parameters, and practical parallelism and observability recommendations.
1. Background: Parameter Count Is Not VRAM Demand, but It Sets the Deployment Floor
Ultra-large Mixture of Experts (MoE) architectures have become a mainstream choice for open-source large language models. A typical configuration with 671B total parameters that activates only tens of billions of parameters per token excels at long-context understanding, multi-step logical reasoning, and multi-task generation. However, it also raises the bar for private deployment significantly.
A common mistake during hardware selection is treating “total parameters ÷ VRAM per GPU” as the only formula. In reality, inference memory usage consists of four parts:
- Model weights: directly related to parameter count and quantization bit width;
- KV Cache: related to context length, concurrency, layer count, and attention head dimensions, growing linearly with concurrency;
- Runtime activations and temporary buffers: related to batch size and sequence length;
- Framework and communication overhead: including VRAM fragmentation, communication buffers, and CUDA Graph capture.
Therefore, deploying a 671B-class MoE model is not constrained by whether the weights fit, but by whether there is remaining headroom for the KV Cache at the target context length and concurrency.
2. First Principle of Selection: VRAM Capacity and Bandwidth Over Peak Compute
For trillion-parameter-scale MoE inference, the priority order should be: VRAM capacity ≥ VRAM bandwidth > interconnect bandwidth > peak compute (TFLOPS).
The reason is that MoE inference is memory-bound rather than compute-bound:
- Each token activates only a subset of experts, so weights must be repeatedly moved from VRAM to compute units, resulting in low arithmetic intensity;
- During autoregressive decoding, each step generates only one token, limiting intra-batch parallelism and leaving compute units idle much of the time;
- In long-context scenarios, attention computation and KV Cache reads further amplify memory access pressure.
This creates clear tiers among three hardware categories:
| Dimension | Data-Center High-Bandwidth Memory GPU | Professional Large-VRAM GPU | Consumer/High-End Desktop GPU |
|---|---|---|---|
| VRAM capacity | ~141GB per card | ~96GB per card | ~32GB per card |
| Memory type | HBM3e, extremely high bandwidth | GDDR-class, medium bandwidth | GDDR-class, medium bandwidth |
| Multi-GPU interconnect | High-speed interconnect, efficient tensor parallel scaling | General high-speed bus, medium scalability | No high-speed interconnect, poor scalability |
| Engineering stability | Mature long-run stability and error control | Gradually maturing drivers and ecosystem | Sustained full load easily triggers throttling |
| Target use case | High-concurrency production serving | Medium-to-high concurrency + long context | Single user, low concurrency |
Note that the table describes general characteristics of each hardware category. Specific models vary, so selection should be based on actual testing.
3. Observed Patterns and Tuning Tips for Three Workload Scenarios
3.1 High-Concurrency Throughput
In multi-user concurrent access scenarios (inference serving), high-bandwidth memory GPUs remain the most stable platform due to their large capacity and high bandwidth. Compared to the previous generation of data-center cards, throughput on long-context tasks above 16K can improve by approximately 1.8–2.1x, depending on batch configuration and scheduling strategy.
Professional large-VRAM GPUs have shown solid performance in recent engineering practice: they clearly outperform desktop-class cards in high-throughput scenarios and are more stable under medium-to-high concurrency combined with long context, delivering roughly 1.3–1.7x the throughput of desktop-class cards in some workloads. Their advantage comes not from peak compute, but from per-card VRAM headroom, KV Cache capacity, and long-context stability.
Tuning tips:
# Key parameters for serving startup (illustrative; exact names depend on framework version)tensor_parallel_size = number of GPUs (must be divisible by the number of attention heads)max_model_len = target context length limitgpu_memory_utilization = 0.85 ~ 0.92 (reserve room for fragmentation and communication buffers)max_num_seqs = target concurrencyenable_chunked_prefill = True (mitigates long-prompt preemption)kv_cache_dtype = fp8 (significantly reduces KV usage when precision is acceptable)
3.2 Single-User Low-Latency
In low-concurrency scenarios such as coding assistants and personal agents, high-end desktop cards are more competitive in per-token generation efficiency: when a 30B-class model fully resides in VRAM, first-token latency can be about 5%–15% better than professional-class cards.
The reason is that in single-user scenarios, batch parallelism is low and the bottleneck lies in memory latency and scheduling overhead. At this point, “fitting all weights into VRAM and avoiding any cross-GPU communication” matters more than “larger VRAM headroom.”
3.3 VRAM Gaps and Quantization Strategies
Different quantization schemes vary significantly in VRAM demand:
- FP8 inference: weight usage is roughly half of FP16, but total usage under high concurrency and long context can still reach hundreds of GB;
- INT4/AWQ/GPTQ weight quantization: further reduces VRAM usage, but must be validated on a precision evaluation set;
- KV Cache quantization: the most direct benefit, usually with manageable impact on generation quality.
A simplified capacity estimation formula:
Total VRAM ≈ parameters × bytes per parameter+ 2 × layers × KV heads × head dimension × context length × concurrency × bytes per element+ runtime buffers (~10%–15% of total)
4. Parallelism Strategy and Engineering Recommendations
- Prioritize tensor parallelism: for single-node multi-GPU setups, prefer tensor parallelism to reduce cross-node communication; the GPU count must match the number of attention heads.
- Use expert parallelism cautiously: MoE expert distribution introduces additional all-to-all communication, so network latency must be evaluated for cross-node deployment.
- Context tiering: route long-context requests to high-bandwidth memory nodes and short requests to desktop-class nodes, forming a hybrid resource pool.
- Build observability: integrate unified logging, monitoring alerts, and metrics collection, focusing on VRAM fragmentation rate, KV Cache hit rate, queue latency, and first-token latency percentiles.
- Elasticity and cost: on cloud platforms such as Baidu AI Cloud, container platforms can host inference services, object storage can distribute model weights, and message queues can smooth request spikes, enabling on-demand scaling and avoiding large upfront capital investment.
5. Conclusion
On-premises deployment of ultra-large MoE models is essentially a joint optimization problem of “VRAM capacity × bandwidth × concurrency × context.” High-concurrency production workloads should prioritize data-center-class hardware with high bandwidth and large VRAM; medium-to-high concurrency and long context can be handled by professional large-VRAM cards; single-user low-latency scenarios are suited to high-end desktop cards. True cost efficiency comes not from single-card specifications, but from the coordinated design of workload tiering, quantization strategies, and scheduling frameworks.
