跳到正文
arXiv (AI + Vision + Imaging)· Sara Kangaslahti, Jonathan Geuter, Nihal V. Nayak, Marco Fumero, Francesco Locatello, David Alvarez-Melis·· 8 天前AI 评分28

层修补顺序如何影响LLM模型尺寸插值:KLPatch贪心算法研究

Understanding Layer Patching in Model Size Interpolation

AI 导读

研究揭示层修补顺序会显著影响LLM模型尺寸插值的性能与可靠性,并将寻找各尺寸最优层子集建模为无环图上的最短路径问题。实验发现从首层到末层或从末层到首层的简单顺序策略在实践中往往表现意外强劲,且效果随模型家族差异明显。提出的KLPatch基于KL散度的贪心修补算法常优于末层到首层策略,可近似求解该优化问题。

正文 · 原文

arXiv:2607.08170v2 Announce Type: replace Abstract: Layer patching is a key technique for model size interpolation in large language models (LLMs), in which a subset of a distilled student model's layers is replaced with corresponding teacher-model layers to construct intermediate-sized models without additional training. Prior work largely ignores the order in which layers are patched, which we show can dramatically affect the performance and reliability of the resulting models. In this work, we study the role of layer patching in model size interpolation. We cast finding the optimal layer subset for each model size as an optimization problem and prove it can be viewed as a shortest-path problem in a certain acyclic graph. In experiments, we show that patching strongly shapes interpolation behavior, with effects that vary substantially across model families. We find that simple sequential strategies---patching either from the first layer to the last or from the last to the first---often achieve surprisingly strong performance in practice. We further introduce KLPatch, a greedy patching algorithm based on KL divergence, which often improves over last-to-first patching and approximately solves the optimization problem. Together, our results provide a principled understanding of how layer patching affects model size interpolation and offer practical guidance for constructing near-optimal interpolated models. The code and models are available at https://github.com/dcml-lab/boomerang-distillation.

来源:arXiv (AI + Vision + Imaging) · arxiv.org