Please ensure Javascript is enabled for purposes of website accessibility

Can your GPU cluster serve MoE models better?

MoE is now the standard design for frontier models, including DeepSeek-V3, Kimi K2, Qwen3, Llama 4, Grok and gpt-oss.

Shaked Matar AI Researcher

December 2, 2026

10 min read

  1. Why one expert layout wastes GPU time
  2. Looking beyond the average prompt
  3. Benchmarking workload-aware layouts on MI355X
  4. Results
  5. Picking the right replica before the prompt runs
  6. How DriveNets turns full-stack expertise into better inference performance
  7. Key takeaways

In an earlier blog, we explained how dense and mixture-of-experts (MoE) models differ and what those differences mean for infrastructure.

Model operators now want to squeeze every last bit of performance out of these models. This blog looks at one way to do that, placing experts where the workload needs them so your GPU cluster serves MoE models better. GPUs are expensive and in short supply, so every wasted GPU cycle is capacity you cannot use. In a large fleet, a few percent of waste adds up to entire racks of GPUs.

One source of waste is rarely dealt with. An MoE model is spread across many GPUs, and how you decide to spread it affects efficiency. Today every server gets the same expert layout. Yet the prompts each server receives use the model in very different ways.

Why one expert layout wastes GPU time

An MoE model does not use all of its compute for every token. Every token passes through a sequence of model layers, each with two very different compute sections, attention and MoE. Within each MoE section, a routing function selects a few small neural networks, called experts, to process that token. In Qwen3-30B-A3B, for example, each layer has 128 experts and only 8 are active per token. The other 120 sit idle for that token.

These experts are distributed across GPUs. At each layer, token data travels to the GPUs holding the selected experts, and the results travel back. The GPUs process tokens in batches, and a batch can only advance to the next layer once every participating GPU has finished. Its progress therefore depends on the busiest GPU.

The standard response is to balance the expert layout so that work is distributed more evenly across GPUs. DeepSeek’s Expert Parallelism Load Balancer (EPLB) is commonly used for this. It measures each expert’s workload, redistributes experts across GPUs, and creates additional copies of the busiest experts.

However, when EPLB measures all traffic together, it produces one layout optimized for the overall average. Individual localized workloads can differ substantially from that average, leaving room for further improvement.

Looking beyond the average prompt

Research shows how much these workloads can differ. A Georgia Tech and Meta study collected over 100K expert activation traces from Llama 4 Maverick, DeepSeek-V3 and Qwen3-235B, and found that load imbalance depends heavily on the dataset, with specialized prompts such as math and coding overloading specific experts in some layers.

A second study argues that placement plans derived from globally aggregated routing traces average away the task-specific co-activation patterns of multi-task serving.

Meanwhile, production systems already sort requests. SGLang’s RadixAttention reuses the KV cache across requests, and the llm-d scheduler filters and scores model-server pods before each request, starting with which pods already hold the request’s prefix.

So requests already land in buckets. The open question is simple. If a replica serves a known kind of traffic, why not lay out its experts for that traffic?

Benchmarking workload-aware layouts on MI355X

To test the idea, DriveNets AI Labs researchers ran a proof of concept. They built a separate expert layout for each kind of workload and measured prefill throughput against two baselines.

Test setup

The team sent 100,000 first-turn prompts from WildChat, a public dataset in 68 languages, through Qwen3-30B-A3B on SGLang 0.5.9. The model ran on one node with 8 AMD MI355X GPUs and expert parallelism of 8 (EP8). Each test ran 64 concurrent requests, and every reported number is the mean of 5 runs.

Grouping by routing

For each prompt, the team recorded which experts fired at every layer and how many tokens each one received. This gave every prompt a routing signature. Clustering prompts by signature alone, without reading any text, produced four clear groups.

Group Description
Single prompt One prompt-generator template, repeated.
Non-English Text in other languages and long documents.
Creative writing English prose and fiction prompts.

Layouts benchmarked

The team compared three expert layouts. Default is SGLang’s standard placement, the one you get out of the box. Balanced is a single EPLB layout built from all the traffic together. Specialized is a separate EPLB layout for each prompt group, built from that group’s own routing data.

What was measured

Prefill throughput in input tokens per second, timed from the first request sent to the last response received. Latency was recorded but not analyzed, so this blog makes no latency claim.

Results

Prefill throughput, Qwen3-30B-A3B on 8× MI355X

Group token share Default (k tok/s) Balanced (k tok/s) Specialized (k tok/s) vs Default vs Balanced
Single prompt 22% 205.5 205.2 212.3 +3.4% +3.5%
Non-English 41% 182.1 188.8 190.9 +4.8% +1.1%
Creative writing 22% 179.0 187.5 191.2 +6.9% +2.0%
Code 15% 188.0 192.0 196.2 +4.3% +2.2%
Weighted 100% +4.9% +2.0%


  • Across all traffic, specialized layouts served 4.9% more tokens per second than the default layout and 2.0% more than the balanced layout.
  • Every group gained over the default, between 3.4% and 6.9%. Over the balanced layout the gains were 1.1% to 3.5%, and the non-English gain is within run-to-run noise.
  • Code ran 4.3% faster than the default and 2.2% faster than the balanced layout.
Horizontal bar chart of the prefill throughput gain of the specialized layout over the default layout (gray) and the balanced layout (blue). Code gains 4.3% vs default and 2.2% vs balanced, Creative writing 6.9% and 2.0%, Non-English 4.8% and 1.1%, and all traffic 4.9% and 2.0% more tokens per second.
Specialized layouts gain vs Default and Balanced. Prefill throughput gain of the specialized layout over each baseline. All traffic is weighted by each group’s share. Longer bar = bigger gain | Qwen3-30B-A3B on 8× MI355X. Gray: vs Default layout (SGLang out of the box). Blue: vs Balanced layout (EPLB on all traffic).

Could prompt length explain the gain?

To check, each group was also compared against a control layout built from random outside prompts with the same length mix. For Code and Creative writing, the group’s own layout won 36 of 36 paired sessions. The gain comes from how prompts route through the experts, not from how long they are.

Picking the right replica before the prompt runs

Choosing the right replica creates a timing problem. The system needs to know which experts a prompt will use before deciding where to send it. Yet that information only becomes available once the model processes the prompt. The Georgia Tech and Meta approach identifies the request type by observing which experts activate during prefill, the initial stage in which the model processes the input. This means prefill must happen before the system should choose a replica for decode.

DriveNets makes that decision using only the prompt text. A small classifier uses TF-IDF to identify words that distinguish one request group from another, then applies a simple linear model to predict the group. It achieves 98.6% accuracy on prompts similar to its training data and about 95% on prompt templates it has never seen. Each prediction takes just 0.5 milliseconds on a single CPU thread. The heavy analysis happens once, offline. In a serving system, the classifier would read each incoming prompt and direct it to the appropriate replica.

Which groups deserve their own layout? Not all of them. Code is the clearest case. Its prompts use experts very differently from the other three groups. Routers pick experts largely by token, and code reuses the same few hundred tokens over and over, brackets, operators, keywords and indentation, and those all go to the same few experts, while prose spreads its words across many. A dedicated code layout runs 4.3% faster than the default layout and 2.2% faster than the balanced one. The gain held even against prompts of the same length, so length is not the reason.

Non-English is the opposite case. Its own layout runs 4.8% faster than the default, but the balanced layout already delivers almost all of that. Specializing adds only 1.1%, inside the normal spread between runs. Non-English is well served by the general pool.

Why does code stand out? Across all code prompts, a handful of experts in some layers receive 6 to 7 times their usual share of tokens. In a mixed batch, the GPUs holding those experts become the slowest, and every request in the batch waits for them. Giving Code its own replicas is a double win. Code runs faster on a layout built for it, and Single prompt, Non-English and Creative writing no longer share a batch with Code’s hot experts. In a deployment of 100 replicas, traffic profiling might assign a share of them to code and leave the rest in the general pool, so everyday traffic would run without code’s hot experts slowing it down.

How DriveNets turns full-stack expertise into better inference performance

The results in this study show that GPU efficiency depends on decisions made well beyond the hardware itself. Request routing, expert placement, and GPU data exchange all shape the performance operators get from their infrastructure. Uncovering these gains requires deep expertise across the entire stack, including advanced Ethernet and RoCEv2, NCCL and RCCL collective libraries, KV cache and storage management, and the inference runtime. Few inference operators, neoclouds, or AI service providers have that full range of expertise in house.

DriveNets combines its background in high-performance networking with close collaboration alongside silicon leaders like AMD to optimize how all of these layers work together. Our AI Labs’ work on expert placement is just one example of this out-of-the-box, system-level engineering in practice. By studying how different workloads use the model, the team identified where specialized replica layouts improve performance and where a general pool is sufficient. It is one of many unconventional optimizations that help operators extract more useful work from the GPUs they already own, without changing the model’s weights or the underlying infrastructure.

Key takeaways

  • One layout fits the average, not the workload. A single balanced layout staffs every warehouse for an average order. Real traffic contains groups that use the model very differently.
  • Routing reveals the groups worth separating. Sorting prompts by expert routing revealed four clear workloads. Layouts built for them delivered 4.9% more prefill throughput than the default layout and 2.0% more than the balanced layout. The gain comes from routing, not prompt length.
  • The classifier is cheap. A text classifier sorts prompts into the right group in about half a millisecond. The deep analysis happens once, offline.
  • A few specialized replicas plus a general pool. Not every group earns its own layout. The study shows why code is the preferred group and why the rest should stay on the general layout.

Frequently Asked Questions

Is one balanced expert layout enough for serving mixed MoE inference traffic?

No. A single balanced expert layout, such as one EPLB layout built from all traffic, is optimized for the overall average, while individual workloads route tokens to experts very differently. In a DriveNets AI Labs test on Qwen3-30B-A3B with 8 AMD MI355X GPUs, a separate layout for each prompt group served 4.9% more prefill tokens per second than the SGLang default layout and 2.0% more than the single EPLB layout.

How much time does classifying a prompt add before MoE inference?

Classifying a prompt adds 0.5 milliseconds on a single CPU thread in the DriveNets approach. A small classifier uses TF-IDF and a simple linear model to predict the request group from the prompt text alone, so the system can choose a replica before prefill runs. The classifier reaches 98.6% accuracy on prompts similar to its training data and about 95% on prompt templates it has never seen.

Why do coding prompts overload specific experts in MoE models?

Coding prompts overload specific experts because MoE routers pick experts largely by token, and code reuses the same few hundred tokens, such as brackets, operators, keywords and indentation, which all go to the same few experts. Across all code prompts, a handful of experts in some layers receive 6 to 7 times their usual share of tokens. A dedicated code layout ran 4.3% faster than the default layout and 2.2% faster than the balanced layout.

Contents

Continue reading

Blog

Why is Networking the New Bottleneck for Mixture-of-Experts (MoE) and how to solve it?

For years, the AI industry operated on one rule: compute is king. More parameters, more GPUs, more raw processing power. ...

Read more

White Papers

How to Design an AI Cluster

An AI cluster is one machine, not a collection of servers.Use this guide for design decisions that determine GPU utiliza ...

Read more

White Papers

An uncompromising, end-to-end system-level optimization journey

Extracting maximum value from AI Infrastructure with AMD Instinct GPUs

Read more