Code-Optimise: Optimising Code Language Models for Functional Correctness and Efficiency

ACL ARR 2024 April Submission760 Authors

16 Apr 2024 (modified: 21 May 2024)ACL ARR 2024 April SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: Code Language Models are capable of generating solutions that are fairly functionally correct and efficient. However, previous work has focused on improving either functional correctness or efficiency, usually at the expense of the other. To this end, we introduce Code-Optimise, a lightweight optimisation for Code Language Models that incorporates learning signals for correctness (pass, fail) as well as code efficiency (fast, slow). During training, Code-Optimise dynamically selects solutions from our self-generated code preference data to reduce overfitting. Code-Optimise achieves significant improvements in $pass@k$ while decreasing average runtime by up to 6\% for cheaper code execution. It also reduces the average length of generated solutions by up to 23\% for HumanEval and up to 48\% for MBPP for faster response / inference times while demonstrating the fastest overall (single) solutions ($best@k$).
Paper Type: Long
Research Area: NLP Applications
Research Area Keywords: code language models, dpo, sft, language models, optimisation, python
Contribution Types: NLP engineering experiment, Approaches low compute settings-efficiency, Publicly available software and/or pre-trained models, Data resources
Languages Studied: English
Submission Number: 760
Loading