Skip to main content
QUICK REVIEW

[論文レビュー] CodeGen2: Lessons for Training LLMs on Programming and Natural Languages

Erik Nijkamp, Hiroaki Hayashi|arXiv (Cornell University)|May 3, 2023
Software Engineering Research被引用数 35
ひとこと要約

CodeGen2 の実験は、コードと自然言語のための LLM を訓練するために、アーキテクチャ、学習目的、インフィルサンプリング、およびデータ分布を統合することを目的とし、プレフィックス-LM の利点は不明瞭で、インフィルは無料ではなく、混合データが有望で、マルチエポック訓練が有効であることを示し、オープンソースのレシピを提供する。

ABSTRACT

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’仮説を検証する。
  • 混合ドメインデータ(自然言語+プログラミング)とマルチエポック訓練を用いた実験を行い、性能向上を評価する。

実験結果

リサーチクエスチョン

  • RQ1Prefix-LM は評価設定全体で、コードと言語タスクに対して因果デコーダーより測定可能な利点を提供しますか?
  • RQ2インフィルサンプリングは計算量および性能の観点で本当にコストゼロですか(“free lunch”仮説)?
  • RQ3因果言語モデリングとスパン破損の単純な混合が、生成と理解の両方のタスクでうまく機能しますか?
  • RQ4自然言語とプログラミング言語の混合およびマルチエポック訓練が、クロスドメインの性能に与える影響は何ですか?

主な発見

  • Prefix-LM の利点は、タスクを横断して明確には示されていない;性能はタスク依存で、因果デコーダーより一貫して優れているとは限らない。
  • インフィルサンプリングは明確な free-lunch の利点を生まなかった;インフィルを追加した場合、いくつかの設定で HumanEval pass@1 がわずかに低下した。
  • 単純な混合目的語(因果言語モデリングとスパンの破損)は left-to-right および infill sampling に対して競争力を持つ一方で、本研究では UL2 風の目的語は因果ベースラインを上回らなかった。
  • 自然言語とプログラミング言語データの混合は有望な結果を示し、マルチエポック訓練は強い改善をもたらす、特に CodeGen2.5 に顕著。
  • 著者らはオープンソースの訓練コードを提供し、訓練が収束するにつれて CodeGen2 モデル(1B、3.7B、7B、16B)のリリースを予定している。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。