RAM vs VRAM in Mixture of Experts Models: The Hidden Bottleneck in Today's LLMs

Large Language Models (LLMs) are evolving rapidly, and Mixture of Experts (MoE) architectures like Qwen3-Next represent the latest frontier. These models achieve massive parameter counts while keeping compute per token manageable through sparse activation.
But when moving from research papers to production systems, many teams discover that the real bottleneck is not FLOPs: it's memory. In particular, the balance between GPU VRAM and system RAM is now the key determinant of feasibility and performance.
This post explores the role of VRAM vs system RAM in MoE deployments, why memory hierarchy matters, and how to optimize your infrastructure for different workloads.
Why Memory Matters in MoE Architectures
Scaling LLMs is often framed in terms of active parameter counts or innovations like hybrid attention and multi-token prediction. While these reduce compute, they don't solve the more fundamental issue: memory hierarchy.
In dense models, all parameters are active at once. In MoE models, only a small set of experts (e.g., 2-8 out of 80) is active per token. Compute requirements drop, but the overall memory footprint doesn't shrink proportionally. All experts must remain accessible, whether they're active or not.
VRAM: The Performance-Critical Layer
GPU VRAM provides the bandwidth and latency required for real-time inference. It must accommodate:
- Model weights (for at least the active experts, if not the entire model).
- KV cache to handle long context windows.
- Intermediate activations during forward and backward passes.
Even if only ~3B parameters are active at a time, VRAM must be sized for:
- Expert switching overheads, since inactive weights need to be quickly swappable.
- KV cache growth, which scales with sequence length.
- Multi-request batches, which amplify memory pressure.
This is why long context inference can quickly push VRAM to its limits, even when compute requirements remain modest.
System RAM: The Offloading Safety Net
When VRAM capacity is exceeded, system RAM becomes the fallback for storing inactive experts. Modern GPUs support offloading, but performance depends on how efficiently data moves across PCIe or NVLink.
The trade-offs:
- Bandwidth limitations that determine how fast experts can be loaded.
- Latency penalties if prefetching and scheduling are not handled properly.
- Throughput degradation when frequent swapping stalls inference.
If offloading is not carefully optimized, MoE's theoretical efficiency gains can vanish in practice.
VRAM vs System RAM in MoE Models
The memory hierarchy decides how well a MoE deployment runs:
| Dimension | VRAM (GPU Memory) | System RAM (Host Memory) |
|---|---|---|
| Primary Role | Stores active experts, KV cache, activations | Stores inactive experts, offloading target |
| Bandwidth | Extremely high (hundreds of GB/s) | Much lower (tens of GB/s, depends on PCIe/NVLink) |
| Latency | Microseconds | Milliseconds (due to transfer overhead) |
| Capacity | Limited (tens of GBs per GPU) | Larger (hundreds of GBs in modern servers) |
| Impact on Inference | Determines real-time responsiveness | Determines scalability of large MoE deployments |
| Optimization Strategy | Quantization, caching, batching | Prefetching, scheduling, bandwidth-aware loading |
| Cost | High ($/GB) | Lower ($/GB) |
Note: While MoE reduces compute requirements through sparse activation, the memory bottleneck shifts from computation to data movement between VRAM and system RAM.
Throughput, Latency, and Hardware Balance
Techniques like multi-token prediction in Qwen3-Next show how throughput can improve, but hardware balance still determines real-world results:
- For interactive inference (e.g., chatbots, copilots), prioritize VRAM capacity to avoid paging delays.
- For batch workloads (e.g., document analysis, RAG pipelines), system RAM bandwidth and efficient offloading become more critical.
Practical Recommendations
For practitioners deploying MoE models, here are concrete guidelines:
Memory Optimization Example
Here's how to estimate and optimize memory requirements:
def estimate_moe_memory(
num_experts=64,
active_experts=8,
params_per_expert=7e9, # 7B parameters per expert
dtype_bytes=2, # FP16
batch_size=1,
sequence_length=4096,
hidden_size=4096
):
"""
Estimate VRAM and RAM requirements for MoE deployment
"""
# Model weights (all experts must be accessible)
total_params = num_experts * params_per_expert
model_memory_gb = (total_params * dtype_bytes) / 1e9
# KV cache for long context
kv_cache_gb = (
2 * batch_size * sequence_length * hidden_size * dtype_bytes
) / 1e9
# Active expert computation
active_memory_gb = (active_experts * params_per_expert * dtype_bytes) / 1e9
# VRAM requirement (active experts + KV cache + buffer)
vram_required = active_memory_gb + kv_cache_gb + 8 # 8GB buffer
# System RAM requirement (inactive experts)
ram_required = model_memory_gb - active_memory_gb
return {
'total_model_size_gb': model_memory_gb,
'vram_required_gb': vram_required,
'ram_required_gb': ram_required,
'recommendation': 'Use quantization if VRAM exceeds 40GB'
}
# Example: Qwen3-Next style model
memory_estimate = estimate_moe_memory()
print(f"VRAM needed: {memory_estimate['vram_required_gb']:.1f} GB")
print(f"RAM needed: {memory_estimate['ram_required_gb']:.1f} GB")
Optimization Tip: Use 4-bit quantization (GPTQ/AWQ) to reduce memory by 4x while maintaining 95%+ of model quality. This can bring a 64-expert MoE from 896GB to ~224GB total memory footprint.
Deployment Guidelines
- Plan VRAM sizing carefully: account for all experts, not only the active ones, plus overhead from long-context KV caches.
- Treat RAM bandwidth as a bottleneck: if offloading is part of your design, optimize prefetching and scheduling.
- Use quantization wisely: smaller weights reduce not only compute but also memory transfer costs.
- Match hardware to workload: interactive inference and batch processing require different balances between VRAM and RAM.
Takeaways
- MoE reduces compute, but not memory demands.
- VRAM remains the performance-critical layer for weights, caches, and activations.
- System RAM enables scaling but is limited by transfer bandwidth and latency.
- Optimal performance requires matching hardware to workload patterns.
By understanding the VRAM vs RAM trade-offs, practitioners can design infrastructure that gets the full efficiency of Mixture of Experts models while avoiding hidden bottlenecks.
Where this turns into work
More on the same subject.
Generative AIRAG vs Fine-Tuning: Why the Best AI Systems Combine Both
Should you choose Retrieval-Augmented Generation (RAG) or fine-tuning to optimize your LLM? The answer is not either-or. Learn how combining RAG with fine-tuning delivers accuracy, adaptability, and cost efficiency in real-world AI systems.
Frederico VicenteSep 20257 min read
InfrastructureEnabling Private LLM Execution: Trusted Execution Environments and Encrypted Containers
Running LLM inference and fine-tuning on private datasets requires bridging theoretical cryptography with practical high-throughput systems. Learn how TEEs and encrypted containers create compliance-ready, hardware-isolated execution environments for confidential AI workloads.
Frederico VicenteNov 202516 min read
Artificial IntelligenceModel Context Protocol: Standardizing Context and Tool Integration for Agentic AI
As LLMs evolve from stateless prompt responders to stateful, tool-using agents, fragile hand-wired orchestration is breaking down. MCP provides a vendor-neutral protocol for connecting models with structured context, tools, and external systems at runtime.
Frederico VicenteNov 202515 min read
Bring us the problem nobody has cracked yet.
We are a small team of senior specialists. We pick the right model and the right layer, and we build the least machinery that does the job. You get a call with an engineer, not a sales deck.



