代码翻译是软件开发和迁移项目中的关键过程,可实现不同编程语言之间的互操作,并增强软件的适应性,从而延长软件寿命。传统的自动化翻译方法严重依赖手工编写的转换规则,这些规则往往缺乏灵活性和可扩展性。与此同时,先进的语言模型提供了有前景的替代方案,但通常受限于专有的、基于 API 的实现,这引发了对数据安全和依赖性的担忧。本文提出 Auto-Train for Code Translation(ACT),这是一个创新框架,旨在通过支持对开源大型语言模型(LLM)进行内部微调来提升代码翻译能力。ACT 的自动化流水线显著提升了这些模型的性能,缩小了开源可访问性与闭源解决方案高性能之间的差距。ACT 的核心是其合成数据生成模块,该模块从初始代码样本构建大规模、高质量数据集,并纳入单元测试以确保功能准确性和多样性。ACT 的评估框架包含执行级检查,可对翻译质量进行全面评估。ACT 的一个关键特性是其控制器模块,它通过动态调整超参数、编排迭代数据生成以及基于实时评估进行微调来管理整个流水线。这使 ACT 能够智能地优化何时继续训练、生成额外的针对性训练数据,或停止该过程。我们的结果表明,ACT 持续提升了开源模型的有效性,为企业和开发者提供了安全可靠的替代方案。此外,将我们的数据生成流水线应用于行业规模的迁移项目,已显著提升开发者加速效果。
英文摘要:
Code translation is a crucial process in software development and migration projects, enabling interoperability between different programming languages and enhancing software adaptability and thus longevity. Traditional automated translation methods rely heavily on handcrafted transformation rules, which often lack flexibility and scalability. Meanwhile, advanced language models present promising alternatives but are often limited by proprietary, API-based implementations that raise concerns over data security and reliance. In this paper, we present Auto-Train for Code Translation (ACT), an innovative framework that aims to improve code translation capabilities by enabling in-house finetuning of open-source Large Language Models (LLMs). ACT's automated pipeline significantly boosts the performance of these models, narrowing the gap between open-source accessibility and the high performance of closed-source solutions. Central to ACT is its synthetic data generation module, which builds extensive, high-quality datasets from initial code samples, incorporating unit tests to ensure functional accuracy and diversity. ACT's evaluation framework incorporates execution-level checks, offering a comprehensive assessment of translation quality. A key feature in ACT is its controller module, which manages the entire pipeline by dynamically adjusting hyperparameters, orchestrating iterative data generation, and finetuning based on real-time evaluations. This enables ACT to intelligently optimize when to continue training, generate additional targeted training data, or stop the process. Our results demonstrate that ACT consistently enhances the effectiveness of open-source models, offering businesses and developers a secure and reliable alternative. Additionally, applying our data generation pipeline to industry-scale migration projects has led to a notable increase in developer acceleration.
Tower+: Bridging Generality and Translation Specialization in Multilingual LLMs
Unbabel;Instituto de Telecomunicações(电信研究所);Instituto Superior Técnico & Universidade de Lisboa (Lisbon ELLIS Unit)(里斯本大学技术学院及里斯本大学(里斯本ELLIS单位));MICS, CentraleSupélec, Université Paris-Saclay(MICS,CentraleSupélec,巴黎萨克雷大学)
MELLA: Bridging Linguistic Capability and Cultural Groundedness for Low-Resource Language MLLMs
Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);East China Normal University(东华大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Institute of High Performance Computing, A*STAR(高性能计算研究所,A*STAR)
ActMem: Bridging the Gap Between Memory Retrieval and Reasoning in LLM Agents
State Key Laboratory for Novel Software Technology, Nanjing University, China(南京大学新型软件技术国家重点实验室);Alibaba Group, Hangzhou, China(阿里巴巴集团,杭州,中国);National Institute of Healthcare Data Science, Nanjing University, China(南京大学健康数据科学国家研究院)
Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Tasks
State Key Laboratory for Novel Software Technology, Nanjing University, China(新型软件技术国家重点实验室,南京大学,中国);National Institute of Healthcare Data Science, Nanjing University, China(健康数据科学国家研究院,南京大学,中国)
Bridging the Gap between Synthetic and Authentic Images for Multimodal Machine Translation
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Beijing Language and Culture University(北京语言大学)
What is Implementation Science; and Why It Matters for Bridging the Artificial Intelligence Innovation-to-Application Gap in Medical Imaging
Tehran University of Medical Sciences(德黑兰医科大学);Imperial College(帝国理工学院);Washington University in St. Louis(圣路易斯华盛顿大学);Sultan Qaboos University(苏丹卡布斯大学);Universiti Sains Malaysia(马来西亚理科大学);University of British Columbia(不列颠哥伦比亚大学);BC Cancer Research Institute(不列颠哥伦比亚癌症研究所)
Leveraging Graph-based Cross-modal Information Fusion for Neural Sign Language Translation
Zhejiang University(浙江大学);Westlake University(西湖大学);Westlake Institute for Advanced Study(西湖高等研究院);City University of Hong Kong(香港城市大学);Xiamen University(厦门大学)
Lost in Translation: The Algorithmic Gap Between LMs and the Brain
CHU Sainte Justine Research Center(圣贾斯汀医院研究中心);Université de Montréal(蒙特利尔大学);Mila(米拉研究所);Ernst Strüngmann Institute for Neuroscience in Cooperation with Max Planck Society(恩斯特·施特龙格曼神经科学研究所(与马克斯·普朗克学会合作))