Larger Is Not Always Better: Exploring Small Open-source Language Models in Logging Statement Generation
Renyi Zhong, Yichen Li, Guangba Yu, Wenwei Gu, Jinxi Kuang, Yintong Huo, Michael R. Lyu

TL;DR
This study evaluates small open-source language models for automated logging statement generation, demonstrating their effectiveness and privacy advantages over larger models in software maintenance tasks.
Contribution
It provides the first large-scale empirical analysis of SOLMs for logging, comparing prompt strategies and fine-tuning methods like LoRA and RAG, highlighting their practical benefits.
Findings
Fine-tuned SOLMs outperform larger models in logging tasks.
LoRA and RAG improve model performance and generalization.
Qwen2.5-coder-14B achieves top results in predicting logging locations.
Abstract
Developers use logging statements to create logs that document system behavior and aid in software maintenance. As such, high-quality logging is essential for effective maintenance; however, manual logging often leads to errors and inconsistency. Recent methods emphasize using large language models (LLMs) for automated logging statement generation, but these present privacy and resource issues, hindering their suitability for enterprise use. This paper presents the first large-scale empirical study evaluating small open-source language models (SOLMs) for automated logging statement generation. We evaluate four prominent SOLMs using various prompt strategies and parameter-efficient fine-tuning techniques, such as Low-Rank Adaptation (LoRA) and Retrieval-Augmented Generation (RAG). Our results show that fine-tuned SOLMs with LoRA and RAG prompts, particularly Qwen2.5-coder-14B, outperform…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Software Engineering Research · Cloud Computing and Resource Management
