CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo, Zhou, Silvio Savarese, Caiming Xiong

TL;DR
CodeGen introduces a family of open large language models for code, demonstrating competitive zero-shot Python code generation and showing that multi-turn prompting significantly enhances program synthesis performance.
Contribution
The paper trains and releases large open-source language models for code up to 16.1B parameters and introduces a multi-turn prompting paradigm with an open benchmark.
Findings
CodeGen models are competitive on HumanEval zero-shot Python tasks.
Multi-turn prompts improve program synthesis performance.
Open source library JAXFORMER facilitates training and research.
Abstract
Program synthesis strives to generate a computer program as a solution to a given problem specification, expressed with input-output examples or natural language descriptions. The prevalence of large language models advances the state-of-the-art for program synthesis, though limited training resources and data impede open access to such models. To democratize this, we train and release a family of large language models up to 16.1B parameters, called CODEGEN, on natural language and programming language data, and open source the training library JAXFORMER. We show the utility of the trained model by demonstrating that it is competitive with the previous state-of-the-art on zero-shot Python code generation on HumanEval. We further investigate the multi-step paradigm for program synthesis, where a single program is factorized into multiple prompts specifying subproblems. To this end, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗OpenMOSS-Team/moss-moon-003-sft-pluginmodel· 27 dl· ♡ 7127 dl♡ 71
- 🤗Salesforce/codegen-6B-monomodel· 1.2k dl· ♡ 401.2k dl♡ 40
- 🤗CarperAI/diff-codegen-6b-v2model· 46 dl· ♡ 4046 dl♡ 40
- 🤗OpenMOSS-Team/moss-moon-003-basemodel· 279 dl· ♡ 132279 dl♡ 132
- 🤗OpenMOSS-Team/moss-moon-003-sftmodel· 320 dl· ♡ 128320 dl♡ 128
- 🤗OpenMOSS-Team/moss-moon-003-sft-int4model· 46 dl· ♡ 4146 dl♡ 41
- 🤗Salesforce/codegen-350M-nlmodel· 841 dl· ♡ 5841 dl♡ 5
- 🤗Salesforce/codegen-350M-multimodel· 3.5k dl· ♡ 613.5k dl♡ 61
- 🤗Salesforce/codegen-350M-monomodel· 151k dl· ♡ 101151k dl♡ 101
- 🤗Salesforce/codegen-2B-nlmodel· 309 dl· ♡ 1309 dl♡ 1
Videos
Taxonomy
TopicsSoftware Engineering Research · Software Engineering Techniques and Practices · Software Testing and Debugging Techniques
MethodsCodeGen
