Skip to main content
QUICK REVIEW

[논문 리뷰] CodeT5+: Open Code Large Language Models for Code Understanding and Generation

Yue Wang, Hung Lê|arXiv (Cornell University)|2023. 05. 13.
Natural Language Processing Techniques인용 수 27
한 줄 요약

CodeT5+는 다수의 사전 학습 목표를 유연하게 융합하는 인코더-디코더형 오픈 코드 LLM 군을 제시하며, 기존의 오프-더-쉘프(off-the-shelf) LLM에서 초기화할 수 있고, 명령어-조정되는 변형을 포함하여 다양한 코드 이해 및 생성 작업에서 SOTA를 달성한다.

ABSTRACT

Large language models (LLMs) pretrained on vast source code have achieved prominent progress in code intelligence. However, existing code LLMs have two main limitations in terms of architecture and pretraining tasks. First, they often adopt a specific architecture (encoder-only or decoder-only) or rely on a unified encoder-decoder network for different downstream tasks. The former paradigm is limited by inflexibility in applications while in the latter, the model is treated as a single system for all tasks, leading to suboptimal performance on a subset of tasks. Secondly, they often employ a limited set of pretraining objectives which might not be relevant to some downstream tasks and hence result in substantial performance degrade. To address these limitations, we propose ``CodeT5+'', a family of encoder-decoder LLMs for code in which component modules can be flexibly combined to suit a wide range of downstream code tasks. Such flexibility is enabled by our proposed mixture of pretraining objectives to mitigate the pretrain-finetune discrepancy. These objectives cover span denoising, contrastive learning, text-code matching, and causal LM pretraining tasks, on both unimodal and bimodal multilingual code corpora. Furthermore, we propose to initialize CodeT5+ with frozen off-the-shelf LLMs without training from scratch to efficiently scale up our models, and explore instruction-tuning to align with natural language instructions. We extensively evaluate CodeT5+ on over 20 code-related benchmarks in different settings, including zero-shot, finetuning, and instruction-tuning. We observe state-of-the-art (SoTA) model performance on various code-related tasks, such as code generation and completion, math programming, and text-to-code retrieval tasks. Particularly, our instruction-tuned CodeT5+ 16B achieves new SoTA results on HumanEval code generation task against other open code LLMs.

연구 동기 및 목표

  • 고정된 아키텍처(인코더-전용, 디코더-전용, 또는 통합 인코더-디코더) 및 한정된 사전학습 과제의 한계를 코드 LLM에서 해결한다.
  • 제로샷, 미세조정, 지시-조정 등 코드 작업 전반에 걸쳐 지원하는 유연하고 모듈식 인코더-디코더 프레임워크를 개발한다.
  • 전처리-학습과 미세조정의 간극을 잇기 위한 혼합 사전학습 목표 체계(span denoising, CLM, 텍스트-코드 대조 학습, 텍스트-코드 매칭)를 제시한다.
  • 오프더쉘프 LLM으로부터의 계산 효율적 초기화를 활용해 처음부터 재학습 없이 모델을 확장한다.
  • 다수의 언어와 작업에서 20개가 넘는 벤치마크에서 강력한 성능을 입증하며, 지시-조정 성능이 공개 모델 및 일부 비공개 모델을 능가한다.

제안 방법

  • 코드 LLM으로서 인코더-디코더 모드뿐 아니라 인코더-전용, 디코더-전용 모드에서도 작동할 수 있는 CodeT5+를 제시한다.
  • 두 단계 사전학습을 사용: 1단계는 span denoising 및 인과적 LM 목표를 갖는 단일 모드 코드 사전학습; 2단계는 대조 학습, 매칭, 텍스트-코드 인과 LM을 포함한 이중 모드 텍스트-코드 사전학습.
  • 얕은 인코더와 교차 어텐션 연결이 있는 깊은 디코더를 사용하여 고정된 오프더쉘프 LLM에서 구성요소를 초기화해 효율적으로 확장한다.
  • 각 단계에서 다양한 목표 손실의 혼합으로 학습하고, 다운스트림 작업에 맞추기 위해 합성 NL 지시 데이터로 지시-조정을 적용한다.
  • 제로샷, 미세조정, 지시-조정 설정에서 9개 프로그래밍 언어에 걸친 20개 이상 벤치마크를 평가한다.
  • 오픈 소스 및 비공개 모델을 포함한 인코더-전용, 디코더-전용 및 인코더-디코더 기반의 기준선과 비교한다.

실험 결과

연구 질문

  • RQ1유연하고 모듈식인 아키텍처가 코드 이해와 생성 작업에서 고정 아키텍처 LLM을 능가할 수 있는가?
  • RQ2혼합 사전학습 목표가 코드 모델의 과제 간 전이성을 향상시키고 사전학습-미세조정 간의 불일치를 줄이는가?
  • RQ3얕은 인코더와 깊은 디코더를 갖춘 오프더쉘프 LLM으로 초기화하는 것이 전체 사전학습 없이도 확장 가능한 계산 효율적 확장을 가능하게 하는가?
  • RQ4지시-조정된 CodeT5+ 모델이 공개 및 비공개 모델에 비해 인간 평가 벤치마크에서 어떤 이점을 얻었는가?
  • RQ5다양한 언어에서 제로샷, 미세조정 및 검색 증강 생성 설정에서 CodeT5+ 변형의 성능은 어떠한가?

주요 결과

모델모델 크기pass@1pass@10pass@100
CodeT5+220M12.020.731.6
CodeT5+770M15.527.242.7
CodeT5+2B24.238.257.8
CodeT5+6B28.047.269.8
CodeT5+16B30.951.676.7
InstructCodeT5+16B35.054.577.9
CodeT5+ w/ CodeT16B38.563.677.1
InstructCodeT5+ w/ CodeT16B42.967.878.7
  • CodeT5+는 지시-조정을 포함한 제로샷 HumanEval 생성 등 여러 코드 작업에서 SOTA에 준하는 성과를 달성한다.
  • 지시-조정된 CodeT5+ 16B는 HumanEval에서 35.0% pass@1 및 54.5% pass@10를 달성해 공개 LLM을 넘어서는 성능을 보이고, 일부 비공개 모델보다도 우수하다.
  • 소형 CodeT5+ 변형(예: 220M–770M)은 여러 작업에서 더 큰 공개 LLM과 맞먹거나 더 나은 성능을 보인다.
  • 깊은 디코더를 고정하고 얕은 인코더로 계산 효율적인 사전학습은 학습 가능한 매개변수를 제한한 채 16B 매개변수까지 확장 가능하게 한다.
  • CodeT5+를 이용한 검색 증강 생성 설정은 코드 생성을 크게 향상시키며 유사 방법들을 능가한다.
  • CodeT5+는 제로샷, 미세조정 및 지시-조정 전반에서 강력한 성능을 보이며 텍스트-코드 검색, 코드 완성, 수학 프로그래밍 작업에서 주목할 만한 향상을 보인다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.