arXiv:2507.08771cs.LGcs.CL2025-07被引 6

提出块级稀疏的MoE架构,让大模型在终端设备上更快更省电。

BlockFFN: Towards End-Side Acceleration-Friendly Mixture-of-Experts with Chunk-Level Activation Sparsity

  • 用带ReLU和RMSNorm的路由器实现可微且灵活的路由
  • 训练目标兼顾令牌与块级稀疏性,8令牌块稀疏率达70%
  • 首次融合稀疏激活与推测解码,终端实测提速3.67倍

为缓解大语言模型的计算负担,采用激活稀疏性的混合专家(MoE)架构受到广泛关注。然而,原始MoE的不可微分和僵化路由损害了模型性能。此外,尽管每个标记仅激活少数参数,但这些稀疏激活架构在块级稀疏性方面表现不佳,即连续多个标记的联合激活会触发大量参数,这种模式不利于低资源环境(如终端设备)下的加速,也不兼容主流加速技术(如推测解码)。为此,我们提出新型MoE架构BlockFFN及其高效的训练与部署技术。具体而言,采用集成ReLU激活和RMSNorm的路由器,实现可微且灵活的路由。为促进令牌级稀疏性(TLS)与块级稀疏性(CLS),设计了面向块级稀疏性的训练目标,使BlockFFN更具加速友好性。最后,首次实现了结合激活稀疏性与推测解码的高效加速内核。实验结果表明,BlockFFN优于其他MoE基线,在真实终端设备上相比密集模型最高获得3.67倍加速,达到超过80%的令牌级稀疏性和70%的8令牌块级稀疏性。所有代码与检查点均已公开(https://github.com/thunlp/BlockFFN)。

原文摘要 · Abstract (English)

To alleviate the computational burden of large language models (LLMs), architectures with activation sparsity, represented by mixture-of-experts (MoE), have attracted increasing attention. However, the non-differentiable and inflexible routing of vanilla MoE hurts model performance. Moreover, while each token activates only a few parameters, these sparsely-activated architectures exhibit low chunk-level sparsity, indicating that the union of multiple consecutive tokens activates a large ratio of parameters. Such a sparsity pattern is unfriendly for acceleration under low-resource conditions (e.g., end-side devices) and incompatible with mainstream acceleration techniques (e.g., speculative decoding). To address these challenges, we introduce a novel MoE architecture, BlockFFN, as well as its efficient training and deployment techniques. Specifically, we use a router integrating ReLU activation and RMSNorm for differentiable and flexible routing. Next, to promote both token-level sparsity (TLS) and chunk-level sparsity (CLS), CLS-aware training objectives are designed, making BlockFFN more acceleration-friendly. Finally, we implement efficient acceleration kernels, combining activation sparsity and speculative decoding for the first time. The experimental results demonstrate the superior performance of BlockFFN over other MoE baselines, achieving over 80% TLS and 70% 8-token CLS. Our kernels achieve up to 3.67$\times$ speedup on real end-side devices than dense models. All codes and checkpoints are available publicly (https://github.com/thunlp/BlockFFN).

MoE稀疏性端侧加速推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。