Qwen3-27B 三阶段微调实现 C 到 Rust 代码翻译
原标题:Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT
AI 摘要
该报告介绍了一种针对 Qwen3-27B 模型的三阶段微调课程,旨在将 C 代码翻译为安全、惯用的 Rust 代码。课程包括在 Rust 语料上的继续预训练、基于 Verus_Training_Data 的调试感知监督微调,以及基于 LeetCode 配对数据的任务特定微调。评估使用 SACTOR 框架,结果显示微调模型在成功率和惯用性上优于基线模型。
正文节选
Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT Abstract Translating C code into safe, idiomatic Rust is a longstanding software-engineering goal because it can eliminate entire classes of memory-safety vulnerabilities while preserving the functional behavior of legacy systems. Large language models (LLMs) have shown promise for this task but typically underperform when applied off-the-shelf, since general