针对Go语言单元测试生成数据不足问题,构建了5264对代码-测试数据集。
Go-UT-Bench: A Fine-Tuning Dataset for LLM-Based Unit Test Generation in Go
- 从10个Go开源项目收集代码与对应单元测试对
- 微调后模型在超75%任务上优于基础模型
- 专为低资源语言开发者工作流设计,适合测试生成研究
训练数据失衡严重制约代码大模型发展。现有数据多集中于开源代码,而忽视软件工程中关键任务,尤其在低资源语言如Go中更为明显。这导致模型擅长代码补全,却难以应对真实开发中的单元测试生成。为此,我们提出Go-UT-Bench,一个包含5264对代码与单元测试的数据集,源自10个宽松许可的Go语言仓库,覆盖多样化领域。我们在两种LLM架构(专家混合模型与密集解码器)上评估其作为微调数据集的效果。结果表明,微调模型在超过75%的基准任务上表现优于基线模型。
原文摘要 · Abstract (English)
Training data imbalance poses a major challenge for code LLMs. Most available data heavily over represents raw opensource code while underrepresenting broader software engineering tasks, especially in low resource languages like Golang. As a result, models excel at code autocompletion but struggle with real world developer workflows such as unit test generation. To address this gap, we introduce GO UT Bench, a benchmark dataset of 5264 pairs of code and unit tests, drawn from 10 permissively licensed Golang repositories spanning diverse domain. We evaluate its effectiveness as a fine tuning dataset across two LLM families i.e. mixture of experts and dense decoders. Our results show that finetuned models outperform their base counterparts on more than 75% of benchmark tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。