Parameter-Efficient Fine-Tuning of Large Language Models for Unit Test Generation: An Empirical Study
Not on the map. Why?
Abstract (arXiv)
Parameter-efficient fine-tuning (PEFT) methods, which fine-tune only a subset of model parameters, offer a promising solution by reducing the computational costs of tuning large language models (LLMs) while maintaining their performance. Existing studies have explored using PEFT and LLMs for various code-related tasks and found that the effectiveness of PEFT techniques is task-dependent. The state-of-the-art is limited to using LLMs with full fine-tuning to generate unit tests. The application of PEFT techniques in unit test generation remains underexplored. This paper investigates both full fine-tuning and various PEFT methods, including LoRA, (IA)^3, and prompt tuning, across thirteen models of different architectures and sizes. We use well-established benchmark datasets to evaluate their effectiveness in unit test generation and measure syntax correctness, CodeBLEU, pass@1, instruction coverage, branch coverage, and mutation score of the generated tests. Our findings show that LoRA can deliver performance comparable to full fine-tuning for unit test generation in several cases. If training costs are valued, prompt tuning is the most cost-effective approach, particularly for large models. However, the models tuned with full fine-tuning or PEFT may generate fewer executable test cases than the baseline model because they generate more tests calling nonexistent methods or having type mismatches. For the generated ones that are executable, the ones from the tuned models show better test coverage than those from the baseline model.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 42 of its 62 references that are in the map. First posted on arXiv 4 Nov 2024.
Builds on
42 of 62 references.
References · 42
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
- 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,234
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
30 more
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021Towards a Unified View of Parameter-Efficient Transfer Learningcited by 863
- 2023StarCoder: may the source be with you!cited by 790
- 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 622
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2022DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scalecited by 403
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 339
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023Scaling Down to Scale Up: A Guide to Parameter-Efficient Fine-Tuningcited by 171
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 49
- 2023Empirical Analysis of the Strengths and Weaknesses of PEFT Techniques for LLMscited by 38
- 2023MFTCoder: Boosting Code LLMs with Multitask Fine-Tuningcited by 34
- 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
- 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
- 2024Parameter Efficient Fine Tuning: A Comprehensive Analysis Across Applicationscited by 25
- 2019EPIC: An Energy-Efficient, High-Performance GPGPU Computing Research Infrastructurecited by 22
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
- 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
- 2017A Large-Scale Study on the Usage of Testing Patterns that Address Maintainability Attributes (Patterns for Ease of Modification, Diagnoses, and Comprehension)cited by 7
- 2022On The Cross-Modal Transfer from Natural Language to Code through Adapter Modulescited by 6
- 2022Parameter-Efficient Finetuning of Transformers for Source Codecited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
- 2025Benchmarking Foundation Models and Parameter-Efficient Fine-Tuning for Prognosis Prediction in Medical Imagingcited by 3
- 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challengescited by 2
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challenges5 Feb 2026
- 2025Benchmarking Foundation Models and Parameter-Efficient Fine-Tuning for Prognosis Prediction in Medical Imaging23 Jun 2025