步进式MoE:具有可配置推理复杂度的段级路由
研究论文 · 2026/10/08
训练大型语言模型(LLM)资源密集,而将其适配到计算约束各异的部署场景仍具挑战。弹性架构支持灵活部署,稀疏激活模型支持输入自适应计算,但现有方法将这两个维度独立处理。此外,面向设备端边缘推理的模型需符合服务设备的内存与计算限制。本文提出一个统一框架,将弹性结构与稀疏门控架构结合,使模型能同时适配部署约束与任务需求。该方法采用一个模型主干,其条件依赖于上下文和目标效率规格,从而在推理时对精度-效率权衡进行细粒度控制。模型学习在弹性嵌套子网络中激活任务相关参数,使单一模型覆盖多个容量点,同时保持输入自适应路由。实验表明,我们能创建一个模型,灵活使用1、2、3、4亿参数,在知识密集型基准上比稠密对应模型更准确(2-5%),与静态版本相当,同时延迟指标与稠密模型相似。总体而言,我们通过共享模型参数节省设备磁盘空间,允许根据可用DRAM和计算灵活服务,同时提供更准确的结果。
该研究为在资源受限设备上部署大型语言模型提供了新思路,通过统一弹性与稀疏架构,在单一模型中实现精度与效率的灵活权衡,具有实际应用价值。
Training large language models (LLMs) is resource-intensive, and adapting them for diverse deployment scenarios with varying computational constraints remains challenging. While elastic architectures enable flexible model deployment and sparsely activated models allow input-adaptive computation, existing approaches treat these dimensions independently. Moreover, models catered towards on-device edge inference need to conform to the memory and compute limitations of the serving devices. In this paper, we introduce a unified framework that combines elastic structures with sparsely gated architectures to create models that adapt simultaneously to both deployment constraints and task requirements. Our approach employs a model backbone that conditions on both the context and target efficiency specifications, enabling fine-grained control over the accuracy-efficiency trade-off at inference time. The model learns to activate task-relevant parameters within elastically-nested sub-networks, allowing a single model to span multiple capacity points while maintaining input-adaptive routing. Through experiments we demonstrate that we can create a model that allows the flexibility to use 1,2,3,4 billion parameters while being more accurate than their dense counter-parts (2-5\% on knowledge-intensive benchmarks) and at par with their static versions while delivering similar latency metrics as dense models. Overall, we save on device disk space by sharing the model parameters, allow flexibility of serving based on DRAM and compute available while delivering more accurate results.