Article

Parameter-Efficient Fine-Tuning of Small Language Models for Code Generation: A Comparative Study of Gemma, Qwen 2.5, and Llama 3.2

Year 2026 Journal / Conference International Journal of Electrical and Computer Engineering (IJECE) Vol 16, No 1, pp. 278-287 DOI / Link https://doi.org/10.11591/ijece.v16i1.pp278-287 ↗

Authors

Abstract

Large language models (LLMs) have demonstrated impressive capabilities in code generation; however, their high computational demands, privacy limitations, and challenges in edge deployment restrict their practical use in domain-specific applications. This study explores the effectiveness of parameter efficient fine-tuning for small language models (SLMs) with fewer than 3 billion parameters. We adopt a hybrid approach that combines low-rank adaptation (LoRA) and 4-bit quantization (QLoRA) to reduce fine-tuning costs while preserving semantic consistency. Experiments on the CodeAlpaca-20k dataset reveal that SLMs fine-tuned with this method outperform larger baseline models, including Phi-3 Mini 4K base, in ROUGE-L. Notably, applying our approach to the LLaMA 3 3B and Qwen2.5 3B models yielded performance improvements of 54% and 55%, respectively, over untuned counterparts. We evaluate models developed by major artificial intelligence (AI) providers Google (Gemma 2B), Meta (LLaMA 3 1B/3B), and Alibaba (Qwen2.5 1.5B/3B) and show that parameter-efficient fine-tuning enables them to serve as cost-effective, high-performing alternatives to larger LLMs. These findings highlight the potential of SLMs as scalable solutions for domain-specific software engineering tasks, supporting broader adoption and democratization of neural code synthesis.

Suggested keywords

parameter-efficient fine-tuning small language models code generation low-rank adaptation LoRa 4-bit quantization

BibTeX

@article{ICTU2026_3001,
  author = {Van-Viet Nguyen and The-Vinh Nguyen and Huu-Khanh Nguyen and Duc-Quang Vu},
  title = {{Parameter-Efficient Fine-Tuning of Small Language Models for Code Generation: A Comparative Study of Gemma, Qwen 2.5, and Llama 3.2}},
  journal = {International Journal of Electrical and Computer Engineering (IJECE)},
  year = {2026},
  month = {2},
  volume = {16},
  number = {1},
  pages = {278-287},
  doi = {10.11591/ijece.v16i1.pp278-287},
  url = {https://doi.org/10.11591/ijece.v16i1.pp278-287}
}