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

利用重要性采样将对齐模块从大语言模型中分离出来

Leveraging Importance Sampling to Detach Alignment Modules from Large Language Models

State Key Laboratory of Communication Content Cognition, People’s Daily Online(通信内容认知国家重点实验室,人民在线);University of Science and Technology of China(中国科学技术大学)

Yi Liu, Dianqing Liu, Mingye Zhu, Junbo Guo, Yongdong Zhang, Zhendong Mao

AI总结:

本文提出残差对齐模型(RAM),通过重要性采样将对齐模块与大语言模型分离,提升灵活性和可扩展性,并在多种任务上优于基线模型。

摘要:

大语言模型(LLMs)在各行业的广泛应用增加了对高质量和可定制化输出的需求。然而,传统对齐方法通常需要重新训练大型预训练模型,这使得难以快速适应和优化LLMs以适应多样化的应用。为了解决这一限制,我们提出了一种新的残差对齐模型(RAM),将对齐过程形式化为一种重要性采样。在此框架中,未对齐的上游模型充当提案分布,而对齐过程则基于一个自回归对齐模块,该模块充当重要性权重的估计器,通过二次采样。这种设计使对齐模块能够自然地从目标对齐模型中分离出来,提高了灵活性和可扩展性。基于此模型,我们推导出一种高效的序列级训练策略,该策略独立于提案模块运作。此外,我们开发了一种具有迭代token级解码的重采样算法,以解决可比方法中常见的首token延迟问题。在两个领先的开源LLMs上进行的实验评估,涵盖指令遵循、领域适应和偏好优化等多样化任务,证明了我们的方法在各方面均优于基线模型。

英文摘要:

The widespread adoption of large language models (LLMs) across industries has increased the demand for high-quality and customizable outputs. However, traditional alignment methods often require retraining large pretrained models, making it difficult to quickly adapt and optimize LLMs for diverse applications. To address this limitation, we propose a novel \textit{Residual Alignment Model} (\textit{RAM}) that formalizes the alignment process as a type of importance sampling. In this framework, the unaligned upstream model serves as the proposal distribution, while the alignment process is framed as secondary sampling based on an autoregressive alignment module that acts as an estimator of the importance weights. This design enables a natural detachment of the alignment module from the target aligned model, improving flexibility and scalability. Based on this model, we derive an efficient sequence-level training strategy for the alignment module, which operates independently of the proposal module. Additionally, we develop a resampling algorithm with iterative token-level decoding to address the common first-token latency issue in comparable methods. Experimental evaluations on two leading open-source LLMs across diverse tasks, including instruction following, domain adaptation, and preference optimization, demonstrate that our approach consistently outperforms baseline models.

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

↑