通过任务特定专家剪枝评估低效性以重新审视SMoE语言模型
Revisiting SMoE Language Models by Evaluating Inefficiencies with Task Specific Expert Pruning
AI总结:
本文提出任务感知剪枝技术UNCURL,通过离线减少SMoE模型每层专家数量,揭示剪枝阈值与预训练专家数的关系,为任务特定推理优化和SMoE架构设计提供指导。
摘要:
稀疏专家混合(SMoE)模型已成为语言建模中稠密模型的一种可扩展替代方案。这些模型在Transformer块中使用条件激活的前馈子网络,从而实现了总模型参数与逐示例计算之间的分离。然而,大规模基于令牌路由的SMoE模型面临一个重大挑战:在推理过程中,整个模型必须用于一个序列或一个批次,导致分布式环境中出现高延迟,抵消了逐令牌稀疏激活的优势。我们的研究探索了任务特定的模型剪枝,以便为设计SMoE架构提供决策依据,主要是调节预训练中专家数量的选择。我们研究在单个任务上评估和比较时,此类剪枝后的模型是否比从头训练的小型SMoE模型更具优势。为此,我们引入了一种自适应任务感知剪枝技术UNCURL,在训练后以离线方式减少每个MoE层的专家数量。我们的发现揭示了一个取决于预训练中所用专家数量的剪枝因子阈值,超过该阈值后,缩减开始降低模型性能。这些见解有助于我们理解在使用SMoE架构进行预训练时的模型设计选择,在考虑后续阶段针对特定任务的推理优化时尤其有用。
英文摘要:
Sparse Mixture of Expert (SMoE) models have emerged as a scalable alternative to dense models in language modeling. These models use conditionally activated feedforward subnetworks in transformer blocks, allowing for a separation between total model parameters and per-example computation. However, large token-routed SMoE models face a significant challenge: during inference, the entire model must be used for a sequence or a batch, resulting in high latencies in a distributed setting that offsets the advantages of per-token sparse activation. Our research explores task-specific model pruning to inform decisions about designing SMoE architectures, mainly modulating the choice of expert counts in pretraining. We investigate whether such pruned models offer advantages over smaller SMoE models trained from scratch, when evaluating and comparing them individually on tasks. To that end, we introduce an adaptive task-aware pruning technique UNCURL to reduce the number of experts per MoE layer in an offline manner post-training. Our findings reveal a threshold pruning factor for the reduction that depends on the number of experts used in pretraining, above which, the reduction starts to degrade model performance. These insights contribute to our understanding of model design choices when pretraining with SMoE architectures, particularly useful when considering task-specific inference optimization for later stages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。