Inferensys

Glossary

Dropped Tokens

Dropped tokens are input tokens in a Mixture of Experts (MoE) model that cannot be processed by their assigned expert because that expert has reached its predefined capacity limit.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
MIXTURE OF EXPERTS INFERENCE

What are Dropped Tokens?

Dropped tokens are a critical performance and quality consideration in the inference of Mixture of Experts models.

Dropped tokens are input tokens in a Mixture of Experts (MoE) model that cannot be processed by their assigned expert because that expert has reached its predefined expert capacity limit. To maintain a fixed computational budget and enable efficient batched matrix operations, each expert is allocated a fixed-size buffer; when this buffer is full, excess tokens are "dropped." These tokens are typically handled by being passed directly to the next network layer unchanged or routed through a designated fallback expert, which can degrade model output quality.

The occurrence of dropped tokens is a direct trade-off between computational efficiency and model fidelity. System architects tune the capacity factor—a multiplier on the expert's theoretical minimum capacity—to balance the token dropping rate against GPU memory usage and kernel efficiency. In production systems like vLLM, sophisticated load balancing and continuous batching algorithms are employed to dynamically size batches and minimize token dropping, which is a key metric for inference performance benchmarking and latency reduction.

DROPPED TOKENS

Key Mechanisms and Handling Strategies

Dropped tokens occur when an expert's capacity is exceeded in a Mixture of Experts model. This section details the core mechanisms that cause them and the strategies systems use to handle them efficiently.

01

Capacity Factor & Buffer Overflow

The primary cause of dropped tokens is exceeding an expert's capacity, a fixed limit set for computational batching. The capacity factor (e.g., 1.25) provides a buffer:

  • Capacity = (batch_size * seq_len * k / num_experts) * capacity_factor.
  • If more tokens are routed to an expert than its capacity, the excess tokens are dropped. This is a deliberate engineering trade-off to maintain uniform tensor sizes for efficient GPU computation, accepting a small performance degradation to avoid dynamic, irregular memory allocation.
02

Fallback Expert Routing

A common handling strategy where dropped tokens are not discarded but rerouted. Typically, they are passed to a designated fallback expert (often the most capacious or a shared expert).

  • This ensures all tokens receive some processing, preventing complete information loss.
  • The fallback expert acts as a computational safety net, but its generalized processing may be less optimal than the router's original, specialized choice.
03

Residual Connection Bypass

The most straightforward handling method: a dropped token bypasses the expert layer entirely via its residual connection.

  • The token's hidden state passes to the next transformer layer unchanged.
  • This treats the expert's feed-forward network as a conditional refinement; if unavailable, the base representation persists.
  • While simple, this can degrade model quality if drops are frequent, as specialized transformations are missed.
04

Auxiliary Load Balancing Loss

A preventive strategy applied during training. An auxiliary loss (e.g., load balancing loss) penalizes the router for uneven token distribution.

  • This encourages the gating network to spread tokens more evenly across experts.
  • By promoting balanced utilization, it minimizes the probability that any single expert exceeds its capacity during inference, thereby reducing dropped tokens at their source.
05

Capacity-Aware Routing Algorithms

Advanced routing mechanisms that consider real-time expert load.

  • Algorithms like Capacity-constrained Top-k or Dynamic MoE adjust routing decisions on-the-fly to avoid sending tokens to already-full experts.
  • This moves beyond static capacity limits, enabling more adaptive and efficient token assignment, though it adds complexity to the routing logic and communication pattern.
06

System Impact & Trade-offs

Dropped tokens represent a key system-level trade-off in MoE inference between computational efficiency and model quality.

  • High capacity factor: Fewer drops, higher quality, but increased memory overhead and potential underutilization (experts process padded, empty slots).
  • Low capacity factor: Higher memory efficiency and denser computation, but increased drop rate and potential quality degradation.
  • Tuning this is critical for production latency and cost targets.
MIXTURE OF EXPERTS INFERENCE

Dropped Tokens

A critical failure mode in Mixture of Experts (MoE) models where tokens cannot be processed by their assigned expert due to capacity limits, directly impacting model quality and inference performance.

Dropped tokens are input tokens in a Mixture of Experts model that are discarded from computation because the expert they were routed to has reached its predefined expert capacity. This occurs during the forward pass when the number of tokens assigned to a single expert exceeds a fixed buffer, a trade-off for efficient batched computation. Dropped tokens are typically handled by a fallback mechanism, such as being passed unchanged to the next layer or routed to a shared auxiliary expert, which can degrade output quality and model coherence.

The occurrence of dropped tokens represents a direct system trade-off between computational efficiency and model fidelity. A higher capacity factor reduces drops but increases memory and compute waste from padding, while a lower factor risks more drops. Managing this is crucial for inference latency and throughput, as token dropping can create unpredictable execution paths. Techniques like load balancing during training and dynamic capacity adjustment aim to minimize this issue in production model serving systems like vLLM.

MIXTURE OF EXPERTS INFERENCE

Frequently Asked Questions

Dropped tokens are a critical concept in the efficient inference of Mixture of Experts models, directly impacting throughput, latency, and output quality. These questions address their definition, causes, consequences, and mitigation strategies.

Dropped tokens are input tokens in a Mixture of Experts model that cannot be processed by their assigned expert because that expert has reached its predefined capacity limit. This occurs during the forward pass when the number of tokens routed to a specific expert exceeds the expert capacity, a hardware-efficient buffer size. To maintain a fixed computational budget and enable batched matrix operations, the system must handle these overflow tokens, typically by passing them unchanged to the next layer or routing them to a fallback expert. Dropped tokens represent a trade-off between computational efficiency and model fidelity, as their original expert-specific transformation is skipped.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.