Automatic Code Generation using Pre-Trained Language Models

Luis Perez, Lizi Ottens, Sudharshan Viswanathan
2/21/2021
cs.CLcs.LG

Official code: kandluis/code-gen (23 stars, Python, last commit 2023-02-16).

Abstract

Recent advancements in natural language processing \cite{gpt2} \cite{BERT} have led to near-human performance in multiple natural language tasks. In this paper, we seek to understand whether similar techniques can be applied to a highly structured environment with strict syntax rules.

Show full abstract

Specifically, we propose an end-to-end machine learning model for code generation in the Python language built on-top of pre-trained language models. We demonstrate that a fine-tuned model can perform well in code generation tasks, achieving a BLEU score of 0.22, an improvement of 46\% over a reasonable sequence-to-sequence baseline. All results and related code used for training and data processing are available on GitHub.

View on arXivView PDF

Code Implementations(1)

kandluis/code-genOfficial100%

Code Generator

236Python, Jupyter NotebookFeb 21, 20213 years ago

Similar Papers

Cite this paper

@article{perez2021automatic,
  title  = {Automatic Code Generation using Pre-Trained Language Models},
  author = {Luis Perez and Lizi Ottens and Sudharshan Viswanathan},
  year   = {2021},
  eprint = {2102.10535},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.10535}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.10535.svg)](https://codeofpaper.com/paper/2102.10535)

Discussion