Choosing Between Dense Models and Mixture of Experts for Production Inference
When a team prepares to deploy a language model for production inference, one of the first architectural decisions they face is whether to use a dense model or a mixture-of-experts (MoE) approach. Both have proven themselves in research and real-world use, but they behave very differently under the load and latency constraints of a production service. Understanding the trade-offs helps engineers choose the right path for their workload, budget, and performance targets.
Dense models are the familiar, monolithic transformer networks where every parameter participates in every forward pass. A model with 70 billion parameters, for example, activates all 70 billion weights for each token generated. This design is straightforward to implement, and its memory and compute requirements are predictable. MoE models, by contrast, divide the network into multiple smaller "expert" sub-networks. A learned router decides which experts to activate for each input token, so only a fraction of the total parameters are used per inference step. A 70-billion-parameter MoE model might activate only 7 billion parameters per token, dramatically reducing per-token computation at the cost of more complex orchestration.
The choice between these architectures affects three key dimensions of production inference: latency, throughput, and memory footprint. Each dimension interacts with the others in ways that depend on batch size, hardware topology, and the shape of the request distribution. A decision that works well for a high-volume chatbot may be wrong for a low-latency document summarization service.
Latency and the cost of routing
In a dense model, every token follows the same computational path. The forward pass is a fixed sequence of matrix multiplications and attention operations, so latency is consistent and predictable. This is valuable for interactive applications where users expect a response within a second or two. The engineer knows that a batch of one prompt will complete in roughly the same time as any other batch of the same size.
MoE models introduce a routing step that selects experts for each token. The router itself adds a small overhead, but the bigger concern is that the set of experts activated can vary from token to token. If the router sends tokens to experts that reside on different accelerators, the model may need to transfer intermediate representations across device boundaries. This communication cost can add tens of milliseconds per token, especially when the experts are distributed across multiple GPUs in a single node or across a cluster. For workloads that must serve a single user at a time with very low latency, the variance introduced by MoE routing can be difficult to manage.
However, for batched inference - where many prompts are processed simultaneously - the MoE architecture often wins. Because each token uses only a fraction of the total parameters, the model can fit a larger effective parameter count into the same memory budget. The per-token computation is lower, so the throughput for a batch of requests can be much higher than a dense model of equivalent total size. The latency per individual request may be slightly higher due to routing and communication, but the overall number of requests served per second can increase significantly.
Memory and model parallelism
Dense models require the full parameter set to be loaded into accelerator memory. A 175-billion-parameter dense model in 16-bit precision needs roughly 350 GB of memory just for the weights, before considering activations and optimizer states. That forces multi-GPU sharding strategies like tensor parallelism or pipeline parallelism. The engineering effort to keep all those GPUs busy and balanced is non-trivial, but the pattern is well understood and supported by most inference frameworks.
MoE models can achieve similar effective capacity with fewer hardware resources. Because only a fraction of experts are active per token, the total parameter count can be much larger than a dense model that would run on the same hardware. A 1-trillion-parameter MoE model might require only 200 GB of memory for the active weights, leaving room for the router and the experts not currently in use to be swapped in and out as needed. This makes MoE attractive for organizations that want to push model quality without proportionally scaling their GPU budget.
The memory advantage comes with a management cost. The router must know which experts reside on which devices, and the system must handle load imbalance when certain experts become popular for a given batch. If one expert is activated far more often than others, it can become a bottleneck, idling the other devices while that expert finishes its work. Techniques like expert balancing losses during training and dynamic expert placement during inference help, but they add operational complexity.
When to choose dense
Dense models remain a strong choice when inference latency is the primary concern and the workload is interactive with small batch sizes. A customer-facing chat application that expects a single user per session will benefit from the predictable, low-variance response times of a dense model. The engineering team can focus on optimizing the inference pipeline without worrying about expert load balancing or cross-device communication overhead.
Dense models are also easier to deploy on heterogeneous hardware. Because the computation pattern is uniform, the model can be partitioned across different generations of GPUs or even CPUs without the need for a custom scheduler. For teams that are new to large-scale model serving, the familiarity of dense architectures reduces the risk of production incidents.
Another case is when the model will be fine-tuned frequently for different tasks. Dense models respond predictably to fine-tuning because every parameter is updated. MoE fine-tuning requires careful handling to avoid overfitting specific experts or destabilizing the router. Research has shown that MoE models can benefit from adapter-based fine-tuning, but the process is less straightforward than with dense models.
When to choose mixture of experts
MoE shines when the workload involves high throughput with batched requests, such as offline batch processing, document indexing, or serving a large user base with a shared inference endpoint. If the average batch size is large enough to keep multiple experts busy, the model can process many tokens in parallel, achieving a higher token-per-second rate than a dense model of comparable quality.
MoE also suits scenarios where the total parameter budget is limited by hardware or cost. A team that cannot afford a cluster of high-memory GPUs can use an MoE model to get the representational capacity of a much larger dense model. This is especially relevant for startups and research labs that want to experiment with large-scale language models without a massive infrastructure investment.
Finally, MoE models are a natural fit for multimodal or multi-task inference, where different inputs benefit from different internal pathways. The router can learn to direct image tokens to vision experts and text tokens to language experts, allowing a single model to handle multiple modalities without a separate network for each. This reduces the total number of models to maintain and simplifies the serving stack.
Practical considerations for production
Whichever architecture is chosen, the production deployment requires careful benchmarking with realistic traffic patterns. Many teams find that the ideal choice depends on the specific mix of prompt lengths, target languages, and response styles. A model that performs well on short, factual queries may struggle with long-form creative writing, and vice versa.
Futurestack.online covers practical engineering decisions like these, offering analysis that helps bridge the gap between research advances and production reality. The journal's focus on distributed systems and cloud architecture means it often examines the infrastructure trade-offs behind model serving, from memory allocation to request batching strategies.
Monitoring and observability become more critical with MoE because load imbalance can emerge or disappear as the request distribution shifts. A production MoE system should track expert activation rates, router confidence scores, and cross-device communication latency. Dense models require less instrumentation but still benefit from tracking per-token latency distributions to detect hardware degradation or contention.
Hardware choice also interacts with the architecture decision. Dense models tend to benefit from high memory bandwidth within a single GPU, while MoE models can exploit high-speed interconnects between GPUs. Networks like NVLink or InfiniBand become a bottleneck if the expert placement is not optimized for the topology. Some cloud providers offer specialized instances with fast interconnects that are well suited for MoE workloads.
For teams just starting their journey into production inference, starting with a dense model and migrating to MoE as the workload grows is a common and sensible path. The dense model provides a simpler baseline that allows the team to build the serving pipeline, establish monitoring, and understand their traffic patterns before adding the complexity of expert routing. As the volume increases, the throughput advantages of MoE become more compelling, and the team can swap the model without rewriting the entire inference stack.
Futurestack.online regularly examines these patterns in the context of real-world deployments, helping engineers understand not just what works in theory but what holds up under the pressures of production traffic. The journal's independent perspective means it can compare approaches without vendor bias, which is especially valuable when evaluating emerging architectures.
In the end, there is no universal winner. Dense models offer simplicity and predictable latency, while MoE models provide better parameter efficiency and throughput at scale. The right choice depends on the specific constraints of the production environment: the hardware available, the latency requirements, the batch sizes, and the team's operational maturity. By understanding the strengths and weaknesses of each approach, engineers can make an informed decision that balances model quality with operational cost.
Futurestack.online on social media
Instagram