PTMO:在低成本下为弹性套娃式推理启用神经网络
PTMO: Enable Neural Network for Elastic Matryoshka Inference at Low-Cost
AI总结:
PTMO是一种无需额外训练的框架,可将预训练神经网络转为套娃友好型表示,适配不同服务预算,经多类模型与任务验证,通用性与有效性良好。
摘要:
弹性套娃式推理允许单个深度神经网络以嵌套方式激活不同宽度的子网络,以适配不同的服务预算。然而,构建此类嵌套网络通常需要成本高昂的专门训练。我们提出后训练套娃式优化(Post-Training Matryoshka Optimization,PTMO),这一框架可在无需额外训练的情况下,将预训练神经网络重新参数化为套娃友好型表示。PTMO包含三个专用算法组件:(i)识别网络变量并将其划分为可接受函数保持置换或正交变换的组(MPIGs);(ii)对MPIGs应用基于重要性的组合变换;(iii)通过预算编排在MPIGs间分配异构宽度,以构建适配多个服务预算的嵌套子网络。PTMO支持两种互补用例:当生成的子网络达到预期质量目标时,可直接用于嵌套宽度推理;当需要进一步适配时,PTMO可提供良好的初始化,以加速套娃感知训练(Matryoshka-aware training,MAT)的收敛。我们在卷积网络、视觉语言模型、大语言模型及扩散语言模型上,针对生成式推荐、图像分类、常识推理等多种应用开展评估,结果证明了PTMO的通用性与有效性。
英文摘要:
Elastic Matryoshka inference allows a single deep neural network to activate subnetworks of different widths in a nested manner to accommodate varying serving budgets. However, constructing such nested networks typically requires costly specialized training. We introduce Post-Training Matryoshka Optimization (PTMO), a framework that reparameterizes pretrained neural networks into Matryoshka-friendly representations without additional training. PTMO comprises three dedicated algorithmic components: (i) identifying and partitioning the network variables into groups that admit function-preserving permutations or orthogonal transformations (MPIGs); (ii) applying composed importance-based transformation to MPIGs; and (iii) allocating heterogeneous widths across MPIGs via budget orchestration to construct nested subnetworks for multiple serving budgets. PTMO supports two complementary use cases. When the resulting subnetworks have meet the desired quality targets, they can be used directly for nested-width inference. When further adaptation is needed, PTMO provides a favorable initialization to accelerate the convergence of Matryoshka-aware training (MAT). Evaluations of convolutional networks, vision-language models, large language models, and diffusion language models across diverse applications, including generative recommendation, image classification, and common-sense reasoning, demonstrate the generality and efficacy of PTMO.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。