mlsanityData to 7 Oct 2026

Parameter-Efficient Fine-Tuning of Large Language Models for Unit Test Generation: An Empirical Study

arXiv 2411.02462 ↗First posted 4 Nov 2024cs.SE cs.AI cs.LGcited by 3

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

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  4. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
  5. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  6. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  7. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  9. 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
  10. 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,234
  11. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  12. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
30 more
  1. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  2. 2021Towards a Unified View of Parameter-Efficient Transfer Learningcited by 863
  3. 2023StarCoder: may the source be with you!cited by 790
  4. 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 622
  5. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  6. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  7. 2022DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scalecited by 403
  8. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  9. 2021ZeRO-Offload: Democratizing Billion-Scale Model Trainingcited by 339
  10. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  11. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  12. 2023Scaling Down to Scale Up: A Guide to Parameter-Efficient Fine-Tuningcited by 171
  13. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  14. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  15. 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
  16. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  17. 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
  18. 2023Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generationcited by 49
  19. 2023Empirical Analysis of the Strengths and Weaknesses of PEFT Techniques for LLMscited by 38
  20. 2023MFTCoder: Boosting Code LLMs with Multitask Fine-Tuningcited by 34
  21. 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
  22. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  23. 2024Parameter Efficient Fine Tuning: A Comprehensive Analysis Across Applicationscited by 25
  24. 2019EPIC: An Energy-Efficient, High-Performance GPGPU Computing Research Infrastructurecited by 22
  25. 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
  26. 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
  27. 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
  28. 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
  29. 2022On The Cross-Modal Transfer from Natural Language to Code through Adapter Modulescited by 6
  30. 2022Parameter-Efficient Finetuning of Transformers for Source Codecited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.