[feat] FlashInfer CuteDSL MegaMoE integration
The Issue & Context
Large batch size inference, especially prefill phases, can be slow in models using mixture-of-experts (MoE) architectures, limiting throughput and efficiency on GPU clusters.
Root Cause Analysis
Existing inference backends lacked optimized kernels for MoE models that could fully leverage batch parallelism and GPU resources, causing performance bottlenecks during prefill operations.
Solution Strategy & Architectural Pattern
This PR generalizes prior DeepSeekV4-specific FlashInfer CuteDSL MegaMoE kernel integration to multiple models, enabling a new MoE backend that accelerates large batch inference by using these optimized kernels. The change was validated for correctness on GSM8K and benchmarked on various models using simulated prefill workloads.
Key Takeaway for Contributors
Specialized kernel integrations like FlashInfer's CuteDSL MegaMoE can significantly boost inference performance for MoE models at scale without sacrificing accuracy, highlighting the value of backend optimizations tailored to model architecture.