CodeGen2: Lessons for Training LLMs on Programming and Natural Languages

By Erik Nijkamp, Hiroaki Hayashi, Caiming Xiong, Silvio Savarese, Yingbo Zhou. 2023

243 citations recorded by the source corpus.

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.

Subfields: Artificial Intelligence, Electrical and Electronic Engineering, Information Systems, Large Language Models, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Junnan Li
  2. Steven C. H. Hoi
  3. Akhilesh Deepak Gotmare
  4. Lingming Zhang
  5. Chun Xia
  6. Yue Wang
  7. Hung Le
  8. Jiawei Liu

In Electrical and Electronic Engineering

  1. Steven C. H. Hoi

In Information Systems

  1. Chun Xia
  2. Lingming Zhang
  3. Jiawei Liu
  4. Yuyao Wang
  5. Hung Le
  6. Akhilesh Deepak Gotmare
  7. Steven C. H. Hoi
  8. Yue Wang

In Large Language Models

  1. Junnan Li
  2. Steven C. H. Hoi
  3. Akhilesh Deepak Gotmare
  4. Chun Xia
  5. Hung Le
  6. Lingming Zhang
  7. Yue Wang
  8. Ying Shan

In Code Generation & Program Synthesis

  1. Akhilesh Deepak Gotmare
  2. Chun Xia
  3. Steven C. H. Hoi
  4. Hung Le
  5. Jiawei Liu
  6. Lingming Zhang
  7. Yuyao Wang
  8. Yue Wang

Citations in the corpus