Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis

About

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 construct an open benchmark, Multi-Turn Programming Benchmark (MTPB), consisting of 115 diverse problem sets that are factorized into multi-turn prompts. Our analysis on MTPB shows that the same intent provided to CODEGEN in multi-turn fashion significantly improves program synthesis over that provided as a single turn. We make the training library JAXFORMER and model checkpoints available as open source contribution: https://github.com/salesforce/CodeGen.

Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, Caiming Xiong• 2022

Related benchmarks

TaskDatasetResultRank
Code GenerationHumanEval
Pass@132.9
850
Code GenerationHumanEval (test)
Pass@129.3
444
Code GenerationMBPP (test)
Pass@135.3
276
Math ReasoningGSM8K (test)
Accuracy22.4
155
Language UnderstandingMMLU 5-shot (test)
Accuracy27.8
149
Code GenerationHumanEval 1.0 (test)
Pass@136.7
145
Language UnderstandingMMLU 5-shot
Accuracy27.8
132
Code GenerationMBPP
Pass@138.6
113
Code GenerationMBPP-ET
Pass@131.6
75
Code GenerationHumanEval-ET
Pass@125
75
Showing 10 of 65 rows

Other info

Follow for update