Proceedings

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

Year 2026 Journal / Conference Lecture Notes on Data Engineering and Communications Technologies Vol. 282, pp. 247-257 DOI / Link https://doi.org/10.1007/978-3-032-13254-3_20 ↗

Authors

Abstract

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. © The Author(s), under exclusive license to Springer Nature Switzerland AG 2026.

Keywords

Fine-tuning Phi-3-Code QLoRA Small device Small language models Software engineering

BibTeX

@inproceedings{W7160413600,
  author = {Van-Viet Nguyen and Huu-Khanh Nguyen and The-Vinh Nguyen and Duc-Quang Vu},
  title = {{Phi-3-Code: Fine Tuning a Small Size Language Model for Coding Generation}},
  booktitle = {Lecture notes on data engineering and communications technologies},
  year = {2026},
  month = {5},
  pages = {247--257},
  volume = {282},
  doi = {10.1007/978-3-032-13254-3_20},
  url = {https://doi.org/10.1007/978-3-032-13254-3_20}
}