The Moment of Truth: Benchmarking Opportunistic Expert Activation on Blackwell GPUs

In the long arc of an optimization campaign, there comes a pivotal moment when a carefully engineered idea meets the cold reality of empirical measurement. Message [msg 1120] captures exactly such a moment. The assistant has just implemented a novel decode-time routing optimization called Opportunistic Expert Activation (OEA) — inspired by the paper "Oncescu, Wu, Chung, Wu, Gopal, Wang, Tri Dao, Athiwaratkun" (arXiv:2511.02237) — and is now running the first meaningful benchmarks to determine whether the idea actually works.

The message is deceptively brief. On its surface, it reports a concurrency-1 benchmark result and launches a concurrency-256 benchmark. But beneath this simple action lies a dense web of reasoning, assumptions, and technical context that makes it a fascinating case study in systematic ML systems optimization.

The Context: A Long Optimization Campaign

To understand this message, one must understand what came before it. The assistant has been engaged in an intensive, multi-session effort to maximize inference throughput for the GLM-5-NVFP4 model — a Mixture-of-Experts (MoE) language model with 256 experts, running on a machine with 8 NVIDIA RTX PRO 6000 Blackwell GPUs. The optimization journey has been methodical: each hypothesis is implemented, benchmarked against a clean baseline, documented, and either adopted or discarded based on real measurements.

The OEA optimization emerged from a specific bottleneck analysis. The model uses 256 experts with top-8 routing, meaning each token activates 8 of the 256 available experts. In a batch of B tokens, the total number of unique experts loaded can be as high as min(B × 8, 256). When B is large (e.g., 256 tokens in flight), nearly all 256 experts may be activated per decode step. Since each expert requires loading its weights into SRAM, activating more unique experts increases memory traffic and reduces the effective compute-to-memory ratio. The OEA idea is to reduce the number of unique experts by steering tokens away from experts that aren't already loaded for other tokens in the same batch — "piggybacking" on the experts that are already in SRAM.

The assistant implemented OEA in the preceding messages ([msg 1106][msg 1107]), patching the topk.py file in SGLang's MoE routing layer. The implementation is gated by an environment variable SGLANG_OEA_K0 (where k0=5 means "keep the top-5 experts per token, then fill remaining 3 slots from experts already selected by other tokens in the batch") and a minimum batch size guard (SGLANG_OEA_MIN_BATCH=2).

What the Message Actually Says

The message begins with a concise summary of the concurrency-1 benchmark:

OK — at concurrency 1, output is 47.74 tok/s (not directly comparable to our baseline since baseline used different num_prompts). The TPOT of 111ms is effectively same as baseline. OEA is correctly being skipped for batch_size=1 (below _OEA_MIN_BATCH).

This is a sanity check. Before investing time in a full benchmark suite, the assistant verifies three things:

  1. The server is running correctly with the patched code.
  2. OEA is being skipped for small batches (batch_size=1 is below the _OEA_MIN_BATCH=2 threshold), so the result should match baseline — and it does (TPOT of 111ms vs ~110ms baseline).
  3. No regressions were introduced by the code patch itself. The assistant then immediately pivots to the real test:
Let me run a proper comparison at medium-high concurrency where OEA should help.

And launches a benchmark at concurrency ~256 (256 prompts, request rate 999, meaning all requests are dispatched simultaneously).

The Reasoning Process

The assistant's thinking reveals a sophisticated understanding of when OEA should and should not help. The reasoning in the preceding message ([msg 1119]) is worth quoting:

At concurrency 10, TPOT is 109.48ms — virtually identical to baseline 109.66ms. This makes sense — at 10 tokens batch, only ~8 unique experts are used anyway (10 × 8/256 ≈ 0.3 tokens/expert, most experts are unique per batch). OEA's benefit should show at medium concurrency where there's overlap.

This is a critical insight. With 10 tokens and top-8 routing, the expected number of unique experts is close to 80 (10 × 8) — but since there are 256 experts total and routing is random (on random data), collisions are rare. Each token activates mostly distinct experts, so there's almost no opportunity for piggybacking. OEA can only help when multiple tokens in the same batch happen to route to the same expert — which becomes statistically more likely as batch size increases.

At concurrency 256, with 256 tokens each selecting 8 experts out of 256, the expected number of unique experts approaches 256 (the total available). This is precisely where OEA could help: by collapsing some of those selections onto already-loaded experts, reducing memory traffic.

Assumptions and Their Validity

The assistant makes several assumptions in this message:

  1. Random data is sufficient for benchmarking OEA. This is a significant assumption. OEA's effectiveness depends on the distribution of expert routing patterns. With random input data, expert selection is approximately uniform across the 256 experts. Real-world data may have non-uniform routing patterns (some experts are "popular" for certain types of tokens), which would create more opportunities for piggybacking. The assistant implicitly acknowledges this limitation later when the results show near-zero average improvement — the conclusion is that OEA's benefit depends on non-uniform expert routing patterns that random data doesn't exhibit.
  2. Concurrency ~256 is the right regime for testing. This is well-reasoned. At low concurrency, there aren't enough tokens to create expert collisions. At very high concurrency (e.g., 1024), the batch is large enough that even with OEA, many unique experts are still needed. The sweet spot is where the batch size is comparable to the number of experts, so that expert collisions are possible but not already saturated.
  3. The baseline is stable and reproducible. The assistant compares against a previous baseline run, assuming that the only difference is the OEA flag. This is reasonable given that the server configuration is otherwise identical.
  4. The benchmark methodology is sound. Using sglang.bench_serving with --request-rate 999 (infinite burst) measures throughput under maximum load, which is the right stress test for a decode-time optimization.

Input Knowledge Required

To fully understand this message, the reader needs:

Output Knowledge Created

This message produces several important pieces of knowledge:

  1. OEA has near-zero effect on random data at low concurrency (confirmed by the concurrency-1 and concurrency-10 results matching baseline).
  2. The implementation is correct (OEA is skipped for small batches as designed).
  3. The benchmark at concurrency 256 will determine OEA's fate — this is the decisive test.
  4. The server infrastructure is stable (the patched server loads and runs without errors). The subsequent results (not shown in this message but reported later in the session) would reveal that OEA showed near-zero average throughput improvement on random data, though peak throughput improved ~5% at high concurrency. This confirms the assistant's implicit assumption that OEA's benefit depends on non-uniform routing patterns.

The Broader Significance

What makes this message remarkable is not the benchmark result itself, but what it represents: a disciplined, hypothesis-driven approach to systems optimization. The assistant doesn't just throw optimizations at the problem and hope something sticks. Each idea is:

  1. Motivated by a clear hypothesis about the bottleneck (unique expert count limiting memory efficiency).
  2. Implemented carefully with proper guards and error handling (the _OEA_MIN_BATCH guard, the try/except around context detection).
  3. Benchmarked against a clean baseline with the same configuration.
  4. Evaluated honestly — when the results don't show improvement, the idea is documented and set aside rather than tuned to death. This stands in stark contrast to the common pattern of "optimization by vibes," where changes are made without rigorous measurement and the system's behavior is poorly understood.

The Technical Craft in the Benchmark

The assistant's benchmark methodology deserves attention. They run the concurrency-1 test first — not because they expect OEA to help there, but as a verification step. The fact that TPOT matches baseline (111ms vs ~110ms) confirms that the code patch didn't break anything and that the OEA guard (_OEA_MIN_BATCH=2) is working correctly. This is the same discipline that a good engineer applies when deploying any change: verify the no-regression case before testing the improvement case.

The choice of --num-prompts 256 with --request-rate 999 is also deliberate. By setting request-rate to 999 (effectively infinite), the benchmark floods the server with all 256 requests simultaneously, creating maximum batch contention. This is the stress test that reveals whether OEA can reduce unique expert count under realistic load.

Conclusion

Message [msg 1120] is a small but crucial node in a larger optimization narrative. It represents the moment when a well-reasoned hypothesis meets experimental evidence. The assistant's calm, methodical approach — verify the no-regression case, then test the improvement case — is a model of how to do systems optimization right. Whether OEA succeeds or fails (and in this case, it largely fails on random data), the process generates reliable knowledge about the system's behavior, which is ultimately more valuable than any single optimization trick.

The message also reveals something about the nature of ML systems research: many good ideas don't work in practice, not because they're wrong in theory, but because the real system's constraints and data distributions differ from the idealized model. The assistant's willingness to accept this and move on to the next hypothesis is what makes the overall campaign successful.