mlsanityData to 7 Oct 2026

Can OpenSource beat ChatGPT? -- A Comparative Study of Large Language Models for Text-to-Code Generation

arXiv 2409.04164 ↗First posted 6 Sep 2024cs.CL cs.LG cs.SEcited by 0

Not on the map. Why?

Abstract (arXiv)

In recent years, large language models (LLMs) have emerged as powerful tools with potential applications in various fields, including software engineering. Within the scope of this research, we evaluate five different state-of-the-art LLMs - Bard, BingChat, ChatGPT, Llama2, and Code Llama - concerning their capabilities for text-to-code generation. In an empirical study, we feed prompts with textual descriptions of coding problems sourced from the programming website LeetCode to the models with the task of creating solutions in Python. Subsequently, the quality of the generated outputs is assessed using the testing functionalities of LeetCode. The results indicate large differences in performance between the investigated models. ChatGPT can handle these typical programming challenges by far the most effectively, surpassing even code-specialized models like Code Llama. To gain further insights, we measure the runtime as well as the memory usage of the generated outputs and compared them to the other code submissions on Leetcode. A detailed error analysis, encompassing a comparison of the differences concerning correct indentation and form of the generated code as well as an assignment of the incorrectly solved tasks to certain error categories allows us to obtain a more nuanced picture of the results and potential for improvement. The results also show a clear pattern of increasingly incorrect produced code when the models are facing a lot of context in the form of longer prompts.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 12 of its 25 references that are in the map. First posted on arXiv 6 Sep 2024.

Builds on

12 of 25 references.

References · 12

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2021Program Synthesis with Large Language Modelscited by 3,509
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  7. 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
  8. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  9. 2023A Critical Review of Large Language Model on Software Engineering: An Example from ChatGPT and Automated Program Repaircited by 29
  10. 2023A Comparative Study of Code Generation using ChatGPT 3.5 across 10 Programming Languagescited by 11
  11. 2023Can ChatGPT Pass An Introductory Level Functional Language Programming Course?cited by 9
  12. 2023A Preliminary Analysis on the Code Generation Capabilities of GPT-3.5 and Bard AI Models for Java Functionscited by 8

Built on by

Not cited yet.