Scopus

Phi-3-Code: Fine Tuning a Small Size Language Model for Coding Generation

Năm XB 2026 Tạp chí / Hội thảo Intelligence of Things: Technologies and Applications (ICIT 2025) Vol 2, 282, 247–257 Đơn vị CNTT DOI / Link https://doi.org/10.1007/978-3-032-13254-3_20 ↗

Tác giả

Van-Viet Nguyen ; Huu-Khanh Nguyen ; The-Vinh Nguyen ; Duc-Quang Vu

Tóm tắt

Previous language models were often prohibitively large, creating significant barriers for researchers in developing countries with limited storage and computing resources. This study aims to assess the performance of a compact natural language model in source code generation. We trained the base model (Phi-3 mini 4K) on the sahil2801/CodeAlpaca-20k dataset, optimizing the training process with techniques such as LoRA, QLoRA, SFTTrainer, 4-bit quantization, and FlashAttention. The evaluation involved comparing the trained Phi-3-Code model with the base model and other prominent models. Experimental results indicate that the Phi-3-Code model outperforms the alternatives, achieving a ROUGE-L score of 59%, compared to CodeBERT’s 36%, NeutralCodeSum’s 34%, Code2seq’s 33%, and the Phi-3 Mini 4K base model’s 17%. These findings provide a valuable reference for researchers seeking to utilize compact models in source code generation, as well as for developers aiming to implement models on devices constrained by processing and storage capabilities, such as personal devices.