Politecnico di Torino (logo)

Large Language Models for Code Generation: A Comparative Analysis and Practical Applications in the Corporate Context

Andrea Parolin

Large Language Models for Code Generation: A Comparative Analysis and Practical Applications in the Corporate Context.

Rel. Luca Cagliero. Politecnico di Torino, Corso di laurea magistrale in Data Science And Engineering, 2023

[img] PDF (Tesi_di_laurea) - Tesi
Restricted to: Repository staff only until 15 December 2026 (embargo date).
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (11MB)

The proliferation of Large Language Models (LLMs) in recent years has pushed the boundaries of what’s possible in terms of automated code completion and generation. As organisations continue to seek improvements in software development productivity, and as LLMs become increasingly integrated into development ecosystems, understanding their code generation capabilities is essential. In particular, the thesis develops code generation and completion for a Swift-based project, used specifically for iOS application development. The research delves into the creation of an ad hoc model tailored for Swift code generation by fine-tuning existing LLMs. The primary objective is to determine the effectiveness of such models in a corporate environment, thereby providing companies with a clearer perspective on the viability and benefits of adopting such systems. Initially, an extensive data collection process was conducted by scraping GitHub for data to create a specialised Swift dataset. The use of Google’s BigQuery facilitated this large scale data extraction and pre-processing. In addition, a methodology based on OpenAI’s API was proposed for instruction generation. The second facet was the fine-tuning of selected LLMs for both tasks, including the LLaMa series, StarCoder and CodeGen-2.5, using these custom datasets. The fine-tuned models showed a discernible ability to generate Swift code, with certain models demonstrating superiority over others in certain use cases. The evaluation was carried out using mxeval, a specialised version of typical HumanEval tailored for Swift code. Furthermore, an integrated system architecture was designed to allow developers to take advantage of this code generation capability, complete with a user-friendly interface and API access for IDE integration.

Relators: Luca Cagliero
Academic year: 2023/24
Publication type: Electronic
Number of Pages: 104
Corso di laurea: Corso di laurea magistrale in Data Science And Engineering
Classe di laurea: New organization > Master science > LM-32 - COMPUTER SYSTEMS ENGINEERING
Aziende collaboratrici: IRISCUBE Reply S.r.l. con Unico Socio
URI: http://webthesis.biblio.polito.it/id/eprint/29364
Modify record (reserved for operators) Modify record (reserved for operators)