Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translation
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2025
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866909941291286528 |
|---|---|
| author | Chen, Le Xu, Nuo Chen, Winson Lei, Bin Lin, Pei-Hung Zhou, Dunzhi Thakur, Rajeev Ding, Caiwen Jannesari, Ali Liao, Chunhua |
| author_facet | Chen, Le Xu, Nuo Chen, Winson Lei, Bin Lin, Pei-Hung Zhou, Dunzhi Thakur, Rajeev Ding, Caiwen Jannesari, Ali Liao, Chunhua |
| contents | Large language models (LLMs) have shown remarkable capabilities in code translation, yet their performance deteriorates in low-resource programming domains such as Fortran and emerging frameworks like CUDA, where high-quality parallel data are scarce. We present an automated dataset generation pipeline featuring a dual-LLM Questioner-Solver design that incorporates external knowledge from compilers and runtime feedback. Beyond traditional source-target code pair datasets, our approach additionally generates (1) verified translations with unit tests for assessing functional consistency, and (2) multi-turn dialogues that capture the reasoning process behind translation refinement. Applied to Fortran -> C++ and C++ -> CUDA, the pipeline yields 3.64k and 3.93k dialogues, respectively. Fine-tuning on this data yields dramatic improvements in functional correctness, boosting unit test success rates by over 56% on the challenging C++-to-CUDA task. We show this data enables a 7B open-weight model to significantly outperform larger proprietary systems on key metrics like compilation success. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2512_03086 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translation Chen, Le Xu, Nuo Chen, Winson Lei, Bin Lin, Pei-Hung Zhou, Dunzhi Thakur, Rajeev Ding, Caiwen Jannesari, Ali Liao, Chunhua Programming Languages Artificial Intelligence Software Engineering Large language models (LLMs) have shown remarkable capabilities in code translation, yet their performance deteriorates in low-resource programming domains such as Fortran and emerging frameworks like CUDA, where high-quality parallel data are scarce. We present an automated dataset generation pipeline featuring a dual-LLM Questioner-Solver design that incorporates external knowledge from compilers and runtime feedback. Beyond traditional source-target code pair datasets, our approach additionally generates (1) verified translations with unit tests for assessing functional consistency, and (2) multi-turn dialogues that capture the reasoning process behind translation refinement. Applied to Fortran -> C++ and C++ -> CUDA, the pipeline yields 3.64k and 3.93k dialogues, respectively. Fine-tuning on this data yields dramatic improvements in functional correctness, boosting unit test success rates by over 56% on the challenging C++-to-CUDA task. We show this data enables a 7B open-weight model to significantly outperform larger proprietary systems on key metrics like compilation success. |
| title | Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translation |
| topic | Programming Languages Artificial Intelligence Software Engineering |
| url | https://arxiv.org/abs/2512.03086 |