arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.21089cs.LGcs.AI
收藏

MLPMoE:密集LLM架构的零样本架构变形

MLPMoE: Zero-Shot Architectural Metamorphosis of Dense LLM MLPs into Static Mixture-of-Experts

Wallarm Research(Wallarm 研究部)

Ivan Novikov

AI总结:

MLPMoE通过零样本方法将密集LLM的MLP结构转换为静态混合专家,实现参数高效和计算节省。

摘要:

大型语言模型(LLMs)主要被部署为密集的Transformer,其中每个前馈块中的每个参数都为每个token激活。虽然在架构上简单,但这种做法在计算上是低效的,因为推理成本与参数数量成线性关系。最近的升级方法,如MoEfication、CMoE、ToMoE和MoORE,表明在密集的前馈网络中存在大量有用的计算存在于稀疏、半模块化的子结构中,但这些方法通常依赖于聚类、激活配置文件、奇异值分解或自定义路由,需要校准数据。本文介绍了MLPMoE(MLP混合专家),一种无需训练的确定性转换,将Transformer块中的密集MLP重新结构化为静态的高基数混合专家。该转换使用简单的张量切片和求和,将张量并行的代数重新解释为拓扑转换,而不是分布式训练模式。我们进一步引入Fractal Fade(微分分支稀疏)和Compensated Pruning(方差保持分支减少)作为轻量级的结构稀疏机制。在Qwen2.5-0.5B-Instruct和DeepSeek-R1-Distill-Llama-8B上,零样本MLPMoE转换使代理困惑度度量值的变化小于0.05个百分点,同时保持参数数量基本不变。在8B模型中,微分稀疏可移除约20%的MLP参数,同时使困惑度保持在密集基线的约2%范围内。该方法完全在事后操作于现有检查点上,不需要梯度、校准集或路由训练。代码可在https://gist.github.com/iwallarm/fc2ef1eddf226ca7814f9e5e2ae9bad1获取。

英文摘要:

Large Language Models (LLMs) are predominantly deployed as dense transformers, where every parameter in every feed-forward block is activated for every token. While architecturally simple, this is computationally inefficient, since inference costs scale linearly with parameter count. Recent upcycling methods such as MoEfication, CMoE, ToMoE, and MoORE reveal that much of the useful computation lives in sparse, semi-modular substructures inside dense feed-forward networks, but these approaches typically rely on clustering, activation profiling, singular value decomposition, or custom routing that requires calibration data. This paper introduces MLPMoE (MLP Mixture-of-Experts), a training-free, deterministic transformation that restructures the dense MLP in transformer blocks into a static, high-cardinality mixture of experts. The transformation uses simple tensor slicing and summation, reinterpreting the algebra of tensor parallelism as a topological conversion rather than a distributed training pattern. We further introduce Fractal Fade (differential branch sparsity) and Compensated Pruning (variance-preserving branch reduction) as lightweight mechanisms for structured sparsity. On Qwen2.5-0.5B-Instruct and DeepSeek-R1-Distill-Llama-8B, the zero-shot MLPMoE transform changes a proxy perplexity metric by less than 0.05 percent while keeping the parameter count effectively constant. On the 8B model, differential sparsity removes about 20 percent of MLP parameters while keeping perplexity within about 2 percent of the dense baseline. The method operates entirely post hoc on existing checkpoints and does not require gradients, calibration sets, or router training. Code is available at https://gist.github.com/iwallarm/fc2ef1eddf226ca7814f9e5e2ae9bad1

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑