[논문 리뷰] CodeGen2: Lessons for Training LLMs on Programming and Natural Languages
CodeGen2 실험은 코드와 자연어를 위한 LLM을 학습시키기 위해 아키텍처, 학습 목표, 인필 샘플링, 데이터 분포를 통합; prefix-LM 이점은 불명확하고, 인필은 무료가 아니며, 혼합 데이터가 유망하고, 다중 에포크 학습이 효과적이며, 오픈소스 레시피가 제시된다.
Large language models (LLMs) have demonstrated remarkable abilities in representation learning for program synthesis and understanding tasks. The quality of the learned representations appears to be dictated by the neural scaling laws as a function of the number of model parameters and observations, while imposing upper bounds on the model performance by the amount of available data and compute, which is costly. In this study, we attempt to render the training of LLMs for program synthesis more efficient by unifying four key components: (1) model architectures, (2) learning methods, (3) infill sampling, and, (4) data distributions. Specifically, for the model architecture, we attempt to unify encoder and decoder-based models into a single prefix-LM. For learning methods, (i) causal language modeling, (ii) span corruption, (iii) infilling are unified into a simple learning algorithm. For infill sampling, we explore the claim of a "free lunch" hypothesis. For data distributions, the effect of a mixture distribution and multi-epoch training of programming and natural languages on model performance is explored. We conduct a comprehensive series of empirical experiments on 1B LLMs, for which failures and successes of this exploration are distilled into five lessons. We will provide a final recipe for training and release CodeGen2 models in size 1B, 3.7B, 7B, and, 16B parameters, along with the training framework as open-source: https://github.com/salesforce/CodeGen.
연구 동기 및 목표
- 설계 선택의 통일화를 통해 프로그래밍 및 자연어 작업용 LLM 학습 비용을 줄이는 것을 동기 부여한다.
- Prefix-LM 아키텍처가 성능 저하 없이 인코더 유사 기능과 디코더 유사 기능을 통합할 수 있는지 평가한다.
- 인필 샘플링이 추가 컴퓨트 비용이 없거나 거의 무시할 만큼의 비용을 제공하는지 평가한다(“free lunch”).
- 자연어 데이터와 프로그래밍 언어 데이터를 혼합하고 다중 에포크 학습이 모델 성능에 미치는 영향을 조사한다.
- 다양한 크기의 CodeGen2 모델과 함께 오픈소스의 실용적인 학습 레시피를 제공하고 공개한다.
제안 방법
- 아키텍처, 학습 목표, 좌에서 우로 학습 및 인필 샘플링, 데이터 분포를 단일 레시피로 통합한다.
- Prefix-LM을 잠재적 인코더-디코더 통합으로 연구하고 프로그래밍 및 언어 벤치마크에서 평가한다.
- 학습 목표로 인과적 언어 모델링과 스팬 손상을 혼합하여 사용한다.
- 인필 샘플링을 실험하고 ‘free lunch’ 가설을 테스트한다.
- 혼합 도메인 데이터(natural+programming)와 다중 에포크 학습을 실험하여 성능 향상을 평가한다.
실험 결과
연구 질문
- RQ1Prefix-LM이 평가 설정 전반에서 코드 및 언어 작업에 대해 인과 디코더보다 측정 가능한 이점을 제공하는가?
- RQ2인필 샘플링이 계산 비용 및 성능 면에서 실제로 비용이 없나요(“free lunch” 가설)?
- RQ3인과 언어 모델링과 스팬 손상의 단순한 혼합이 생성 및 이해 작업 모두에 대해 잘 작동할 수 있는가?
- RQ4자연어와 프로그래밍 언어를 혼합하고 다중 에포크 학습이 교차 도메인 성능에 미치는 영향은 무엇인가?
주요 결과
- Prefix-LM 이점은 작업 전반에 걸쳐 명확하게 입증되지 않으며; 성능은 작업에 따라 다르고 인과 디코더보다 일관되게 우수하지 않다.
- 인필 샘플링은 명확한 free-lunch 이점을 제공하지 않았고; 인필을 추가했을 때 일부 설정에서 HumanEval pass@1이 다소 하락하는 현상이 관찰되었다.
- 단순한 혼합 목적어(인과 언어 모델링과 span corruption)는 left-to-right 및 infill 샘플링에 대해 경쟁력이 있을 수 있으며, UL2 스타일의 목표는 본 연구에서 인과 기반선보다 우수하지 않았다.
- 자연어와 프로그래밍 언어 데이터를 혼합하는 것이 유망한 결과를 보이며 다중 에포크 학습이 큰 향상을 가져온다, 특히 CodeGen2.5에서 뚜렷하게 나타난다.
- 저자들은 오픈소스 학습 코드를 제공하고 훈련이 수렴함에 따라 CodeGen2 모델(1B, 3.7B, 7B, 16B)을 공개할 계획이다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.