# RaMP: Runtime-Aware Megakernel Polymorphism for Mixture-of-Experts

Source: [RaMP: Runtime-Aware Megakernel Polymorphism for Mixture-of-Experts](<https://www.sota2.com/research/paper/69f2e1e755a3c32af89fc4e3>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-05-01T05:00:04.847Z

Authors: Vyom Sharma, Debajyoti Datta

Published: 2026-04-28T18:20:12.000Z

## Abstract

The optimal kernel configuration for Mixture-of-Experts (MoE) inference depends on both batch size and the expert routing distribution, yet production systems dispatch from batch size alone, leaving 10-70% of kernel throughput unrealized. We present RaMP, a routing-aware dispatch framework. A performance-region analysis derives, from hardware constants alone, when each optimization helps, correctly predicting all 8 tested architectures, including 3 unseen. A four-parameter wave cost model selects the fastest configuration from the runtime expert histogram, achieving 0.93% mean regret versus exhaustive search, fitted from just 10-24 minutes of one-time profiling per model. Because the model depends only on CTA grid geometry, it is kernel-agnostic: applied to Alpha-MoE, it delivers 1.14x with no source modification. Paired with a co-designed CuTe DSL kernel exposing 134-268 polymorphic configurations, RaMP delivers 1.22x kernel speedup over static dispatch and 1.30x end-to-end speedup in vLLM serving over Triton, 1.41x over DeepGEMM, and 1.13x over FlashInfer CUTLASS.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Kernel Throughput Evaluation on MoE Models (OLMoE, Qwen3, DSv3, Mixtral) beta=0.5](<https://www.sota2.com/research/sota/kernel-throughput-evaluation-on-moe-models-olmoe-qwen3-dsv3-mixtral-beta-0-5.md>): Kernel Throughput Evaluation; MoE Models (OLMoE, Qwen3, DSv3, Mixtral) beta=0.5; Latency: 67.

- [LLM Inference Serving Performance on 1024 Input / 32 Output Context](<https://www.sota2.com/research/sota/llm-inference-serving-performance-on-1024-input-32-output-context.md>): End-to-end LLM Inference Serving; Long-context 1024-token input, 32-token output; TPOT Speedup vs DeepGEMM: 1.48.

- [End-to-end LLM Inference Serving on ShareGPT](<https://www.sota2.com/research/sota/end-to-end-llm-inference-serving-on-sharegpt.md>): End-to-end LLM Inference Serving; ShareGPT; TPOT Speedup vs DeepGEMM: 1.5.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2604.26039>)

[PDF](<https://arxiv.org/pdf/2604.26039.pdf>)
