不改权重,用向量引导解码,让大模型更快更准适应新任务。
Distribution-Aligned Decoding for Efficient LLM Task Adaptation
- 通过解码时直接对齐输出分布,无需更新模型参数。
- 在9个基准上提升准确率最高5个百分点,真相度提升2个百分点。
- 轻量无参,兼容现有高效微调方法,适合资源有限场景。
将大模型任务适配视为输出分布对齐问题:在解码阶段直接引导输出分布趋向目标任务分布,而非通过权重更新间接实现。提出轻量级、兼容参数高效微调(PEFT)的导向向量解码(SVDecode)方法。先进行简短热启动微调,从预训练与热启动模型输出分布的KL散度梯度中提取任务感知导向向量,并用于引导解码过程。理论证明其等价于全量微调的一阶梯度步,推导出导向向量强度的全局最优解。在三个任务和九个基准上,结合四种标准PEFT方法,多项选择准确率最高提升5个百分点,开放问答真相度提升2个百分点;在常识类数据集上也取得1-2个百分点增益,且额外参数仅来自PEFT适配器。该方法为大模型任务适配提供了一条轻量、理论严谨的新路径。代码已开源:https://github.com/dl-m9/SVDecode。
原文摘要 · Abstract (English)
Adapting billion-parameter language models to a downstream task is still costly, even with parameter-efficient fine-tuning (PEFT). We re-cast task adaptation as output-distribution alignment: the objective is to steer the output distribution toward the task distribution directly during decoding rather than indirectly through weight updates. Building on this view, we introduce Steering Vector Decoding (SVDecode), a lightweight, PEFT-compatible, and theoretically grounded method. We start with a short warm-start fine-tune and extract a task-aware steering vector from the Kullback-Leibler (KL) divergence gradient between the output distribution of the warm-started and pre-trained models. This steering vector is then used to guide the decoding process to steer the model's output distribution towards the task distribution. We theoretically prove that SVDecode is first-order equivalent to the gradient step of full fine-tuning and derive a globally optimal solution for the strength of the steering vector. Across three tasks and nine benchmarks, SVDecode paired with four standard PEFT methods improves multiple-choice accuracy by up to 5 percentage points and open-ended truthfulness by 2 percentage points, with similar gains (1-2 percentage points) on commonsense datasets without adding trainable parameters beyond the PEFT adapter. SVDecode thus offers a lightweight, theoretically grounded path to stronger task adaptation for large language models. Code is available at https://github.com/dl-m9/SVDecode.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。