polito.it
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
Accesso riservato a: Solo utenti staff fino al 15 Dicembre 2026 (data di embargo).
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (11MB)
Abstract:

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.

Relatori: Luca Cagliero
Anno accademico: 2023/24
Tipo di pubblicazione: Elettronica
Numero di pagine: 104
Soggetti:
Corso di laurea: Corso di laurea magistrale in Data Science And Engineering
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Aziende collaboratrici: IRISCUBE Reply S.r.l. con Unico Socio
URI: http://webthesis.biblio.polito.it/id/eprint/29364
Modifica (riservato agli operatori) Modifica (riservato agli operatori)