SERE: 유사성 기반 전문가 재라우팅을 통한 MoE 모델의 효율적인 배치 디코딩
SERE: Similarity-based Expert Re-routing for Efficient Batch Decoding in MoE Models
혼합 전문가(MoE) 아키텍처는 희소 활성화를 사용하여 밀집 LLM보다 빠르고 정확한 학습 및 추론을 제공합니다. 그러나 실제 서비스 환경에서 MoE 모델은 하드웨어 효율성을 최적화하기 위해 배치 추론을 수행해야 하며, 이는 과도한 전문가 활성화를 유발하여 메모리 병목 현상이 발생하는 디코딩 단계를 늦출 수 있습니다. 본 논문에서는 배치 디코딩과 전문가 희소성 간의 근본적인 긴장을 해결하기 위해, MoE 모델에서 효율적인 배치 디코딩을 위한 유사성 기반 전문가 재라우팅 방법인 SERE를 제안합니다. SERE는 입력에 따라 동적으로 활성 전문가의 수를 줄이며, 2차 전문가에서 토큰을 해당 전문가와 가장 유사한 1차 전문가로 재라우팅합니다. 또한, 유사성 패턴을 활용하여 중요한 전문가를 식별하고 유지함으로써 성능 저하를 방지합니다. 주목할 점은 SERE가 정적 전문가 제거 또는 병합을 사용하지 않고, 대신 배치 수준의 전문가 중복성을 기반으로 동적 전문가 건너뛰기를 가능하게 한다는 것입니다. 또한, SERE를 위한 효율적인 사용자 정의 CUDA 커널을 제공하여 vLLM에서 단 한 줄의 코드 변경으로 쉽게 사용할 수 있습니다. 다양한 복잡한 추론 벤치마크에 대한 광범위한 실험 결과, SERE는 최대 2.0배의 속도 향상을 달성하면서도 최소한의 품질 손실을 보여주며, 비용 효율적이고 지연 시간에 민감한 대규모 MoE 배포를 위한 실용적인 솔루션을 제공합니다. SERE의 코드 구현은 https://github.com/JL-Cheng/SERE 에서 확인할 수 있습니다.
Mixture-of-Experts (MoE) architectures employ sparse activation to deliver faster training and inference with higher accuracy than dense LLMs. However, in production serving, MoE models require batch inference to optimize hardware efficiency, which may cause excessive expert activation and thus slow the memory-bound decoding stage. To address the fundamental tension between batch decoding and expert sparsity, we present SERE, a Similarity-based Expert Re-routing method for Efficient batch decoding in MoE models. SERE dynamically reduces the number of active experts in an input-aware manner by re-routing tokens from secondary experts to their most similar primary counterparts. It also leverages similarity patterns to identify and preserve critical experts, thereby preventing capability loss. Notably, SERE avoids static expert pruning or merging, instead enabling dynamic expert skipping based on batch-level expert redundancy. Additionally, we provide an efficient custom CUDA kernel for SERE, enabling plug-and-play use in vLLM with only a single-line code change. Extensive experiments on various complex reasoning benchmarks demonstrate that SERE achieves up to 2.0x speedup with minimal quality loss, providing a practical solution for cost-efficient and latency-sensitive large-scale MoE deployment. Code implementation of SERE can be found in https://github.com/JL-Cheng/SERE.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.