CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
Preprint
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 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.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- RoFormer: Enhanced transformer with Rotary Position EmbeddingNeurocomputing, 2023
- Highly accurate protein structure prediction with AlphaFoldNature, 2021
- Task-Oriented Dialogue as Dataflow SynthesisTransactions of the Association for Computational Linguistics, 2020
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2019
- CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databases2019
- SParC: Cross-Domain Semantic Parsing in Context2019
- Mapping Language to Code in Programmatic Context2018
- Automatically improving accuracy for floating point expressionsACM SIGPLAN Notices, 2015
- Stochastic superoptimizationACM SIGARCH Computer Architecture News, 2013
- Toward automatic program synthesisCommunications of the ACM, 1971