{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/automatic-code-generation-using-pre-trained","title":"Automatic Code Generation using Pre-Trained Language Models","arxiv_id":"2102.10535","date":"2021-02-21","proceeding":null,"authors":["Luis Perez","Lizi Ottens","Sudharshan Viswanathan"],"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. 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.","url_abs":"https://arxiv.org/abs/2102.10535v1","url_pdf":"https://arxiv.org/pdf/2102.10535v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"automatic-code-generation-using-pre-trained","repo_url":"https://github.com/kandluis/code-gen","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2102.10535","atlas_url":"https://app.syntology.ai/?focus=2102.10535","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}