How to Choose Memory and Compute for Local Deployment of 100B-Scale MoE Models
This guide explains why VRAM capacity is the first constraint when deploying large Mixture-of-Experts models locally. It covers weight and KV cache estimation, compares data center, professional, and consumer GPUs, and provides deployment checks, benchmarking metrics, and risk controls for multi-GPU inference.
1. Why VRAM Comes First for 100B-Scale MoE Models
Mixture-of-Experts (MoE) architectures activate only a subset of their parameters for each token, so their per-token compute can be much lower than that of a dense model with the same total parameter count. However, the hardware requirements do not decrease by the same proportion.
During inference, the weights of all experts must remain resident in GPU memory because the router may select any expert for any token. Therefore, the first deployment question is whether the hardware can hold the complete model. Only after that should you evaluate whether the available compute is sufficient.
Three factors have the greatest impact on hardware selection.
Long Contexts
The longer the context, the more KV cache the model must store. KV cache capacity can be estimated as:
layers × KV heads × head dimension × 2 (K and V) × context length × concurrent requests × bytes per element
With other variables unchanged, KV cache usage grows approximately linearly with context length and concurrency. This formula describes memory consumption only; it does not mean that inference time increases at exactly the same rate.
Multi-User Concurrency
Each concurrent request requires its own KV cache. As the number of simultaneous requests increases, VRAM pressure rises accordingly.
Resident Expert Weights
MoE layers reduce the amount of computation performed for each token, but they do not reduce the memory required for the model weights. Regardless of how many experts are activated for a particular token, all expert weights must remain available in memory.
When selecting hardware, teams should focus on four metrics:
- VRAM capacity
- Memory bandwidth
- Intra-node and inter-node interconnect performance
- Long-term operational stability
2. Comparing Three Hardware Categories
Enterprise deployments commonly use three broad classes of GPUs: data center GPUs, high-memory professional GPUs, and flagship consumer GPUs. The table below summarizes their typical characteristics. Exact results depend on the model, GPU model, drivers, and framework version, so hardware should be validated with workload-specific benchmarks.
| Dimension | Data Center GPUs | High-Memory Professional GPUs | Flagship Consumer GPUs |
|---|---|---|---|
| Memory and bandwidth | Large capacity with high-bandwidth HBM | Large capacity with moderate bandwidth | Smaller capacity with relatively high bandwidth |
| Multi-GPU interconnect | High-speed links such as NVLink, with better scaling efficiency | Often relies on PCIe, resulting in higher multi-GPU communication latency | Usually relies on PCIe |
| Suitable concurrency | High-concurrency production services | Moderate concurrency and long-context workloads | Low concurrency and single-user interaction |
| Single-user time to first token | Generally good | Generally moderate | Often advantageous when the model fits entirely in VRAM |
| Operational requirements | High demands on facility power and cooling; high acquisition cost | Mid-range cost and lower deployment barrier | Lower cost and suitable for workstation deployments |
The throughput advantage of data center GPUs mainly comes from high-bandwidth memory and high-speed interconnects. They are more stable for long-context and high-concurrency workloads.
The main value of high-memory professional GPUs is their large per-card capacity and the additional room they provide for KV cache. They are suitable for workloads with relatively low concurrency but long contexts.
Flagship consumer GPUs can deliver competitive generation speed in small-scale, low-concurrency scenarios. However, their multi-GPU scaling and concurrency scheduling capabilities are generally weaker.
The performance gap between these hardware categories must be measured using the target model, quantization method, input and output lengths, and concurrency settings. There is no universal performance multiplier.
3. Estimating VRAM Requirements
Weight memory is straightforward to estimate:
total parameters in billions × bytes per parameter ≈ memory in GB
For a model with 671 billion total parameters, the weights require approximately 671 GB in FP8 and approximately 336 GB with 4-bit quantization.
The following code illustrates the estimation process. Replace the parameters with the actual values from the model configuration.
def estimate_weight_gb(total_params_b: float, bytes_per_param: float) -> float:"""Estimate weight memory in GB, excluding KV cache and framework overhead."""return total_params_b * bytes_per_param # Billion parameters × bytes ≈ GBdef estimate_kv_cache_gb(layers: int, kv_heads: int, head_dim: int,seq_len: int, batch: int, bytes_per_elem: float) -> float:"""Estimate KV cache memory in GB. Multiply by 2 for K and V."""total_bytes = 2 * layers * kv_heads * head_dim * seq_len * batch * bytes_per_elemreturn total_bytes / 1e9def estimate_total_gb(weight_gb: float, kv_gb: float, overhead_ratio: float = 0.15) -> float:"""Reserve space for activations, fragmentation, and communication buffers.Calibrate overhead_ratio against actual measurements."""return (weight_gb + kv_gb) * (1 + overhead_ratio)
This calculation highlights an important constraint. In FP8, a 671 GB model distributed across eight GPUs requires approximately 84 GB of weight memory per GPU under tensor parallelism. That exceeds the capacity of an 80 GB GPU, so eight 80 GB GPUs cannot hold the FP8 weights.
Eight 96 GB GPUs provide 768 GB of total memory. After placing the weights, only about 97 GB remains for the KV cache and framework overhead, leaving a narrow margin. Long contexts or high concurrency can consume this remaining capacity quickly.
The requirements are even more demanding for consumer GPUs. With 4-bit quantization, the 336 GB of weights alone would require at least fourteen 24 GB GPUs, without accounting for KV cache or other overhead. Such a configuration also depends heavily on PCIe communication.
4. Pre-Deployment Checklist
- Confirm the total parameter count, active parameter count, number of layers, number of KV heads, and maximum supported context length from the model configuration.
- Use the formulas above to estimate weight memory, KV cache usage, and overhead under the target concurrency and context length. Reserve an additional 10% to 20% where possible, and validate the estimate with benchmarks.
- Select the parallelism strategy. If a single node can hold the sharded weights, prioritize tensor parallelism within the node. When cross-node bandwidth is limited, minimize cross-node partitioning and evaluate the communication overhead of pipeline parallelism or expert parallelism.
- Define benchmark metrics. Under the target input length, output length, and concurrency, measure time to first token (TTFT), time per output token (TPOT), and throughput in tokens per second or QPS.
- Monitor GPU utilization, VRAM usage and fragmentation, KV cache usage, the percentage of communication bandwidth consumed, out-of-memory events, and request error rates.
- Record the versions of the inference framework, driver, CUDA, and model. Keep the previous container image and configuration so the deployment can be rolled back quickly if problems occur.
5. Frequently Asked Questions
How much VRAM is required to deploy a 100B-scale MoE model locally?
Start with the weights. In FP8, the weight memory in GB is approximately equal to the model’s total parameter count in billions. A 671B model therefore requires about 671 GB for its weights. KV cache and framework overhead must then be added.
Can consumer GPUs run a 671B model?
Not on a single card. Even with 4-bit quantization, the weights require approximately 336 GB, which means at least fourteen 24 GB GPUs before accounting for KV cache and overhead. The resulting setup depends on PCIe communication and is unsuitable for most production workloads. Consumer GPUs are better suited to smaller models or single-user experiments.
Is FP8 quantization sufficient?
FP8 can significantly reduce VRAM usage, but the impact on accuracy depends on the model and task. Compare it with the original-precision model on your own evaluation set before adopting it.
Can multiple GPUs be connected through PCIe?
PCIe can be used for small-scale validation or low-concurrency workloads. Once inter-GPU communication becomes the bottleneck, throughput can decline significantly. Production deployments should prioritize high-speed interconnects where available.
6. Main Risks
- Out-of-memory errors: Insufficient VRAM headroom can cause long requests or high concurrency to crash the service. Set maximum context length and maximum concurrency limits.
- Quantization-related quality degradation: Low-bit quantization can reduce inference quality, especially for mathematical and coding tasks. Validate it with business-relevant data.
- Multi-GPU communication bottlenecks: Insufficient PCIe or cross-node network bandwidth can reduce throughput. During benchmarking, monitor the proportion of time spent on communication.
- Framework compatibility issues: The inference framework, CUDA version, and GPU driver must be compatible. Test upgrades in a staging environment first.
- Lack of a rollback plan: Before every upgrade, preserve the previous container image and configuration so the service can return to a stable version if necessary.
