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

语言模型的灵活重校准

Flexible Realignment of Language Models

Shanghai Jiao Tong University(上海交通大学);Shanghai Innovation Institute(上海创新研究院);Large Language Department, Tencent(腾讯大语言部门)

Wenhong Zhu, Ruobing Xie, Weinan Zhang, Rui Wang

AI总结:

本文提出灵活的重校准框架,通过训练和推理时的可控对齐方法,提升语言模型的性能和适应性。

摘要:

当语言模型(LM)无法达到预期性能时,重校准变得必要。我们提出了一种灵活的重校准框架,该框架在训练和推理过程中均支持对齐程度的定量控制。该框架包含训练时重校准(TrRa),通过利用参考模型和已对齐模型的可控融合logits来高效重校准参考模型。例如,TrRa在DeepSeek-R1-Distill-Qwen-1.5B上将token使用量减少了54.63%,而无需性能下降,优于DeepScaleR-1.5B的33.86%。为了补充TrRa在推理过程中的作用,我们引入了一个层适配器,使推理时重校准(InRa)能够平滑进行。该适配器在底层初始化为执行身份转换,并在原始层之前插入。在推理过程中,输入嵌入同时被适配器和原始层处理,随后经过剩余层,并在logit层面可控地插值。我们通过将DeepSeek-R1-Distill-Qwen-7B从慢思考模型升级为支持快思考和慢思考的模型,实现了在推理过程中灵活的对齐控制。通过鼓励更深入的推理,甚至超越了其原始性能。

英文摘要:

Realignment becomes necessary when a language model (LM) fails to meet expected performance. We propose a flexible realignment framework that supports quantitative control of alignment degree during training and inference. This framework incorporates Training-time Realignment (TrRa), which efficiently realigns the reference model by leveraging the controllable fusion of logits from both the reference and already aligned models. For example, TrRa reduces token usage by 54.63% on DeepSeek-R1-Distill-Qwen-1.5B without any performance degradation, outperforming DeepScaleR-1.5B's 33.86%. To complement TrRa during inference, we introduce a layer adapter that enables smooth Inference-time Realignment (InRa). This adapter is initialized to perform an identity transformation at the bottom layer and is inserted preceding the original layers. During inference, input embeddings are simultaneously processed by the adapter and the original layer, followed by the remaining layers, and then controllably interpolated at the logit level. We upgraded DeepSeek-R1-Distill-Qwen-7B from a slow-thinking model to one that supports both fast and slow thinking, allowing flexible alignment control even during inference. By encouraging deeper reasoning, it even surpassed its original performance.

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

↑