HackerPapers

arXiv:2405.15729cs.SE

Optimizing Large Language Models for OpenAPI Code Completion

Bohdan Petryshyn, Mantas Lukoševičius

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

Abstract

Recent advancements in Large Language Models (LLMs) and their utilization in code generation tasks have significantly reshaped the field of software development. Despite the remarkable efficacy of code completion solutions in mainstream programming languages, their performance lags when applied to less ubiquitous formats such as OpenAPI definitions. This study evaluates the OpenAPI completion performance of GitHub Copilot, a prevalent commercial code completion tool, and proposes a set of task-specific optimizations leveraging Meta's open-source model Code Llama. A semantics-aware OpenAPI completion benchmark proposed in this research is used to perform a series of experiments through which the impact of various prompt-engineering and fine-tuning techniques on the Code Llama model's performance is analyzed. The fine-tuned Code Llama model reaches a peak correctness improvement of 55.2% over GitHub Copilot despite utilizing 25 times fewer parameters than the commercial solution's underlying Codex model. Additionally, this research proposes an enhancement to a widely used code infilling training technique, addressing the issue of underperformance when the model is prompted with context sizes smaller than those used during training. The dataset, the benchmark, and the model fine-tuning code are made publicly available.

arXiv comments
Update: a better quality and readability of figures, better explanation of code infilling and document splitting in training, some text polishing, making it more compact
Journal reference
DOI
Subjects
cs.SESoftware Engineering cs.CLComputation and Language cs.LGMachine Learning

On Hacker News

No comments linking this paper were found in the collected sources. Found in 1 HN submission from Jun 2024 to Jun 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

  • Show HN: I reproduced Code Llama fill-in-the-middle code completion training

    As part of my master's thesis on optimizing LLMs for code completion in OpenAPI format, I implemented a script for fine-tuning Code Llama for Copilot-style code completion. Surprisingly, I was not able to find a similar implementation before since most works focus on instruction fine-tuning for chat-like interaction. Related publication: https://arxiv.org/abs/2405.15729 Code Llama fill-in-the-middle fine-tuning: https://github.com/BohdanPetryshyn/code-llama-fim-fine-tunin... OpenAPI completion…

Connected through shared HN threads, not inferred similarity or a recommendation.