用合成数据提升低资源编程语言的生成能力
Synthetic Function Demonstrations Improve Generation in Low-Resource Programming Languages
- 通过文档生成高质量合成函数演示数据
- 在Excel公式任务上显著提升模型表现
- 适合缺乏真实代码数据的编程语言研究
训练大语言模型时,目标编程语言的资源丰富程度至关重要,如英文与威尔士语、Python与Excel的对比。现有编程语言训练数据通常由真实程序示例和人工注释组成。本文提出一种新方法,为缺乏自然数据的低资源编程语言生成教材级的合成函数演示数据。我们首先收集语言文档,再用其增强强大教师模型以生成合成训练数据,最后在这些数据上微调学生模型。实验显示,该方法在两个问答数据集(WikiTQ 和 TAT-QA)上均取得性能提升。相比标准RAG方法,微调策略更具优势,因后者受限于学生模型对陌生领域的不熟悉。
原文摘要 · Abstract (English)
A key consideration when training an LLM is whether the target language is more or less resourced, for example English compared to Welsh, or Python compared to Excel. Typical training data for programming languages consists of real program demonstrations coupled with explanatory human-written comments. In this work we present a novel approach to the creation of such data for low resource programming languages, which lack naturally occurring data. Our process generates synthetic, textbook-quality demonstrations of how to use library functions, which we show makes for good model finetuning data. We demonstrate in an example domain of Excel Formulas. First, we collate language documentation, then we use this to augment a powerful teacher model which generates synthetic training data, and finally finetune student models on the demonstrations. Our technique improves student performance on 2 question-answering datasets: WikiTQ and TAT-QA. We also show advantages of finetuning over standard RAG approaches, which can offer only modest improvement due to the unfamiliarity of the target domain to student models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。