RLHF에서의 정책 필터링을 통해 코드 생성을 위한 LLM을 세밀하게 조정합니다.
Policy Filtration in RLHF to Fine-Tune LLM for Code Generation
September 11, 2024
저자: Wei Shen, Chuheng Zhang
cs.AI
초록
인간 피드백으로부터의 강화 학습 (RLHF)은 대형 언어 모델 (LLM)이 지시를 따르고 도움이 되며 해를 끼치지 않는 응답을 제공하는 데 도움이 되는 주요 기술 중 하나입니다. 직접 정책 최적화 방법이 존재하지만, 최신 LLM은 RL 기반 방법(일반적으로 PPO)을 채택하여 RLHF에서 보상 데이터로부터 학습된 보상 모델에 따라 좋은 응답을 생성하도록 정책을 훈련시킵니다. 이러한 방법의 주요 도전 과제는 특히 응답을 점수 매기기 위해 긴 및 복잡한 추론이 필요한 코드 생성 작업에서 중간 보상 모델의 부정확성입니다. 우리는 서로 다른 보상으로 할당된 응답 간에 보상 모델의 신뢰성이 다양하게 변하는 것을 발견했습니다. 이로 인해 정책 학습 중 신호 대 잡음 비율을 개선하기 위해 신뢰할 수 없을 수 있는 보상을 가진 샘플을 걸러내는 것을 동기로 하는 Policy Filtration for Proximal Policy Optimization (PF-PPO)가 나왔습니다. 주어진 보상 모델에 적합한 정책 필터링 전략을 선택하기 위해 필터링된 샘플에서 보상과 실제 점수 간의 결정 계수 (R^2)가 좋은 지표 역할을 하며 우리가 몇 가지 유망한 전략을 찾는 데 도움이 됩니다. 우리는 PF-PPO의 효과를 코드 생성 작업에서 확인하기 위해 포괄적인 실험을 제공하며, PF-PPO의 일부 변형이 HumanEval, MBPP 및 새로운 더 어려운 LeetCode Contest 벤치마크에서 70억 파라미터 모델 전반에 걸쳐 새로운 최첨단 성능을 달성하는 것을 발견했습니다.
English
Reinforcement learning from human feedback (RLHF) is one of the key
techniques that helps large language models (LLMs) to follow instructions and
provide helpful and harmless responses. While direct policy optimization
methods exist, state-of-the-art LLMs adopt RL-based methods (usually PPO) in
RLHF to train the policy to generate good responses guided by a reward model
learned from preference data. The main challenge of these methods is the
inaccuracy of the intermediate reward model, especially in code generation
tasks that require long and complex reasoning to score a response. We find that
the reliability of the reward model varies across responses assigned with
different rewards. This motivates us to filter the samples whose rewards may be
unreliable to improve signal-to-noise ratio during policy learning, resulting
in Policy Filtration for Proximal Policy Optimization (PF-PPO). To choose a
proper policy filtration strategy for a given reward model, the coefficient of
determination (R^2) between rewards and actual scores on filtered samples
serves as a good metrics and helps us find several promising strategies. We
provide extensive experiments to validate the effectiveness of PF-PPO in code
generation tasks, and find that some variants of PF-PPO are highly effective
and achieve new state-of-the-art performance across 7-billion-parameter models
on HumanEval, MBPP, and a new and more challenging LeetCode Contest benchmark.Summary
AI-Generated Summary