ShellElastic:同时最大化更新与超参数迁移的可扩展弹性预训练

·

研究论文 · 2026/10/14

基础模型需要支持多样的推理预算,但为每个预算单独训练模型会重复预训练工作。弹性模型在一个权重共享的超网中训练多个嵌套子网络,但现有方法面临三个障碍:每步工作负载可变阻碍分布式扩展,超参数(HP)跨模型尺寸迁移有限,且无法保证所有子网络同时获得最大更新。我们提出\Ours,一种弹性Transformer,将隐藏维度组织为密集核心和连续外壳,使每个隐藏矩阵为块下三角。一次全宽前向传播包含每个子网络的精确隐藏状态作为前缀,因此联合训练保持固定计算图,每步成本与单独训练最宽子网络相当。我们进一步引入\muE,将最大更新参数化(\mup)扩展到\Ours和其他弹性架构。其缩放规则可证明地保持超网所有子网络同时获得最大更新(\muI),并在超网加宽或增加外壳时持续有效;扫描证实,在小规模非弹性代理上调优的HP对弹性家族和更大超网保持接近最优(\muT)。单次\Ours运行产生的子网络在匹配参数量下优于MatFormer和完全弹性基线,并接近单独训练模型(这些模型合计需要数倍步数)。

该工作解决了弹性模型训练中的关键扩展性和超参数迁移问题,通过创新架构和参数化方法,显著提升了训练效率和子网络性能,对基础模型的高效部署具有重要意义。

Foundation models need to support diverse inference budgets, yet training a separate model for each budget duplicates pretraining effort. Elastic models train several nested sub-networks inside one weight-shared supernet, but existing recipes face three obstacles: variable per-step workloads that hinder distributed scaling, limited hyperparameter (HP) transfer across model sizes, and no guarantee that all sub-networks are maximally updated at once. We present \Ours, an elastic transformer that organizes hidden dimensions into a dense core and successive shells, so that every hidden matrix is block lower triangular. One full-width forward pass contains every sub-network's exact hidden states as prefixes, so joint training keeps a fixed computation graph and costs about as much per step as training the widest sub-network alone. We further introduce \muE, an extension of maximal update parameterization (\mup) to \Ours and other elastic architectures. Its scaling rules provably keep all sub-networks of a supernet maximally updated simultaneously (\muI), and keep doing so when the supernet is widened or given more shells; sweeps confirm that HPs tuned on a small non-elastic proxy stay near-optimal for elastic families and larger supernets (\muT). A single \Ours run produces sub-networks that outperform MatFormer and fully elastic baselines at matched parameter counts, and approach separately trained models that together take several times the steps.

阅读原文

参与讨论