创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

AWS 详解 SageMaker 上的融合 MoE 内核优化

AI 总结

AWS 机器学习博客介绍了其与 vLLM 社区合作、为融合 MoE(Mixture-of-Experts)模型实现并开源的多项内核优化。其中 Swap-AB 通过矩阵转置把庞大的专家维度放到 WGMMA 的首操作数位置,在 H200 上带来 2–4% 端到端吞吐提升,该优化已合入 vLLM 0.24.0 及以上版本。针对 FP8 张量量化模型,把后端路由从 FlashInfer+CUTLASS 切换到 Triton 后吞吐提升约 10%,已在 AWS LMI v28 容器中可用;为变长参数添加 do_not_specialize 以消除 Triton 内核的重复 JIT 编译,则让 H200 在 8 路张量并行下的首 token 时延(TTFT)改善 9%,已合入 vLLM 0.22.0。AWS 称这些优化合计最多带来 10% 吞吐提升和 9% 更快的 TTFT。

深度见解

对自建 MoE 推理服务的团队而言,这些优化多数只需改配置或少量代码,就能直接降低解码阶段的延迟与成本。

Mixture-of-Experts (MoE) is a sparsely-activated architecture that scales large language model (LLM) capacity while keeping per-token compute low. Because its operations account for a large share of total compute time, inefficiencies there directly raise request latency and cost. Therefore, optimizing MoE operations through kernel engineering offers the largest opportunity for performance gains.

Fused MoE is a key optimization technique for the MoE architecture. A fused MoE system merges token routing, data shuffling, and specialized network calculations into a single batched operation on the GPU. This replaces executing those routing and expert computations as separate, sequential loop operations. While this provides latency advantages, it also brings complexity in kernel implementations and debugging capability. High GPU utilization for this architecture requires hardware-specific optimizations.

In this post, we describe the different kernel optimizations we implemented for fused MoE models and show you how you can benefit from this work. We used a representative MoE model as our primary example.

Swap-AB for WGMMA utilization

To maximize tensor processing throughput, the NVIDIA Hopper architecture relies on the Warp Group Matrix Multiply Accumulate (WGMMA) instruction protocol, which executes collectively across a cooperative warpgroup of 128 threads. This operand asymmetry is fundamentally an instruction set architecture (ISA)-level property. In the underlying wgmma.mma_async assembly definition, the hardware fixes the matrix row dimension (M) at a constant scale of 64 to define its parallel thread-mapping topology. The column dimension (N) remains highly variable. Operand A strictly maps across this fixed M dimension (using registers or shared memory), and Operand B maps across the variable N dimension (through a shared memory descriptor). These operand slots are therefore structurally non-interchangeable. Consequently, peak hardware tile utilization is governed by these rigid shape encodings, requiring that the M dimension equals or exceeds 64 to prevent compute execution lanes from sitting idle.

#Amazon Web Services#Amazon SageMaker AI#vLLM#NVIDIA H200#NVIDIA Hopper#Triton#FlashInfer#CUTLASS

原文约 7 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。