vllm-project/vllm

[Feature]: Unify MoE "Oracles" with Class Structure

Open

#37.753 geöffnet am 21. März 2026

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (16.816 Forks)batch import
feature requestgood first issuehelp wanted

Repository-Metriken

Stars
 (80.034 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 9T 2h) (921 gemergte PRs in 30 T)

Beschreibung

🚀 The feature, motivation and pitch

We currently have the following MoE "oracles", which select the right MoE kernel for each model

  • model_executor/layers/fused_moe/oracle

We have:

  • fp8
  • nvfp4
  • mxfp8
  • unquantized

and will soon have mxfp4

Each of these has the following functions:

  • select_XX_moe_backend - called by the quantization integration to get the backend
  • convert_to_XX_moe_kernel_format - called by the quantization integration to shuffle the weights
  • make_XX_moe_quant_config - called by the quantization integration to make the quant config
  • make_fp8_moe_kernel - called by the quantization integration to construct the kernel

Now that we have the structure standardized, we need to create a generic class that implements this logic. Then, each oracle can inherit from this.

So, we would have the following:

class MoEKernelOracle(ABC)
 ...

class Fp8MoEKernelOracle(MoEOracle):
 ...

and so on and so forth

Alternatives

just use conventions. this is a bad idea due to drift and duplicated code

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Contributor Guide