ChatGLM-RLHF:基于人类反馈对齐大型语言模型的实践
ChatGLM-RLHF: Practices of Aligning Large Language Models with Human Feedback
AI总结:
本文介绍面向生产的 ChatGLM-RLHF 流程,通过偏好数据、奖励模型和策略优化提升人类偏好对齐,并用稳定训练、模型并行与抗遗忘策略取得显著效果。
摘要:
ChatGLM 是一项由 ChatGLM 系列大型语言模型(LLM)驱动、可免费使用的 AI 服务。本文提出 ChatGLM-RLHF 流程——一个基于人类反馈的强化学习(RLHF)系统——旨在增强 ChatGLM 与人类偏好的对齐。ChatGLM-RLHF 包含三个主要组成部分:人类偏好数据收集、奖励模型训练和策略优化。在将 ChatGLM-RLHF 集成到生产环境的整个过程中,我们遇到并解决了若干前所未有的挑战。我们介绍了用于缓解奖励方差以稳定大规模训练的策略,采用融合梯度下降实现模型并行,并设计正则化约束以避免 LLM 的灾难性遗忘。实验表明,与 ChatGLM 的监督微调(SFT)版本相比,ChatGLM-RLHF 在对齐任务上带来显著提升。例如,在中文对齐任务中,它相对 ChatGLM-SFT 平均多获得 15% 的胜率。本工作展示了我们在使 LLM 与人类偏好对齐方面的实践,为 RLHF 实现中的挑战和解决方案提供了洞见。
英文摘要:
ChatGLM is a free-to-use AI service powered by the ChatGLM family of large language models (LLMs). In this paper, we present the ChatGLM-RLHF pipeline -- a reinforcement learning from human feedback (RLHF) system -- designed to enhance ChatGLM's alignment with human preferences. ChatGLM-RLHF encompasses three major components: the collection of human preference data, the training of the reward model, and the optimization of policies. Throughout the process of integrating ChatGLM-RLHF into production, we encountered and addressed several unprecedented challenges. We introduce the strategies to mitigate reward variance for stabilized large-scale training, implement model parallelism with fused gradient-descent, and design regularization constraints to avoid catastrophic forgetting in LLMs. Experiments show that ChatGLM-RLHF brings significant improvements in alignment tasks compared to the supervised fine-tuned (SFT) version of ChatGLM. For instance, it achieves on average 15\% more wins against ChatGLM-SFT in Chinese alignment tasks. The work presents our practices of aligning LLMs with human preferences, offering insights into the challenges and solutions in RLHF implementations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。