arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.04019cs.LGcs.AI
收藏

理解并指导大语言模型参数高效微调中的层放置

Understanding and Guiding Layer Placement in Parameter-Efficient Fine-Tuning of Large Language Models

University of California, Berkeley(加州大学伯克利分校);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen University(深圳大学)

Yichen Xu, Yuyang Liang, Shan Dai, Tianyang Hu, Tsz Nam Chan, Chenhao Ma

AI总结:

本文提出Layer Card工具,通过分析层的残差信号强度、计算成本和性能,指导大语言模型参数高效微调中的层选择,以实现性能与成本的平衡。

摘要:

随着大语言模型(LLMs)的持续增长,全参数微调的成本使得参数高效微调(PEFT)成为下游适应的默认策略。在可扩展服务和边缘或快速部署设置中,推理延迟和微调成本的约束使得选择哪些层进行微调变得不可避免。然而,当前实践通常在所有层上统一应用PEFT,对层选择的理解或利用有限。本文在冻结的基础模型之上开发了一种统一的投影残差视图,用于PEFT。在局部二次近似下,逐层适应由三个量决定:(i)投影残差范数(resnorm),它衡量一个层能捕捉多少可纠正的偏差;(ii)激活能量,它决定特征条件;(iii)层耦合,它量化残差在不同层之间的相互作用强度。我们展示,对于平方损失和线性适配器,resnorm等于归一化梯度范数,激活能量控制病态和噪声放大,弱耦合导致近似加性的逐层贡献。基于这些见解,我们引入了Layer Card,一个可重用的诊断工具,总结了每个给定模型的层的残差信号强度、计算成本和性能。在相同的模型和LoRA配置下,Layer Card指导的放置细化了适应层的选择,以灵活优先考虑不同的目标,如最大化性能或减少微调成本。此外,在Qwen3-8B上,我们展示,选择性地适应部分层可以实现接近全层LoRA的性能,同时显著减少微调成本和推理过程中适配器增强层的数量,提供了一种更关注成本-性能的替代方案。

英文摘要:

As large language models (LLMs) continue to grow, the cost of full-parameter fine-tuning has made parameter-efficient fine-tuning (PEFT) the default strategy for downstream adaptation. Constraints from inference latency in scalable serving and fine-tuning cost in edge or rapid-deployment settings make the choice of which layers to fine-tune unavoidable. Yet current practice typically applies PEFT uniformly across all layers, with limited understanding or leverage of layer selection. This paper develops a unified projected residual view of PEFT on top of a frozen base model. Under a local quadratic approximation, layerwise adaptation is governed by three quantities: (i) the projected residual norm (resnorm), which measures how much correctable bias a layer can capture; (ii) the activation energy, which determines feature conditioning; and (iii) layer coupling, which quantifies how strongly residuals interact across layers. We show that, for squared loss and linear adapters, the resnorm equals a normalized gradient norm, activation energy controls ill-conditioning and noise amplification, and weak coupling yields approximately additive layerwise contributions. Building on these insights, we introduce the Layer Card, a reusable diagnostic that summarizes residual signal strength, compute cost, and performance for each layer of a given model. With an identical model and LoRA configuration, Layer Card-guided placement refines the choice of adapted layers to flexibly prioritize different objectives, such as maximizing performance or reducing fine-tuning cost. Moreover, on Qwen3-8B, we show that selectively adapting a subset of layers can achieve performance close to full-layer LoRA while substantially reducing fine-tuning cost and the number of adapter-augmented layers during inference, offering a more cost-performance-aware alternative to full-layer insertion.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑