Metraipolis › archive › dc_38b6fd811409

Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT — arXiv:2608.13681

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.13681
License (as archived)
CC0-1.0
Archived
2026-10-17T07:47:02.764Z
SHA-256 of the archived text
b236df7dc672c92098e67bb75cd5b59a9e0d7d8fbeeda7cc079752a706cdf8b1
Stable URL of this page
https://metraipolis.com/documento/dc_38b6fd811409

How to cite

Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT — arXiv:2608.13681 — arXiv (en), https://arxiv.org/abs/2608.13681 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_38b6fd811409 (Metraipolis archive dc_38b6fd811409, sha256 b236df7dc672c92098e67bb75cd5b59a9e0d7d8fbeeda7cc079752a706cdf8b1)
BibTeX
@misc{dc38b6fd811409,
  title = {Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT — arXiv:2608.13681},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.13681},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_38b6fd811409; sha256 b236df7dc672c92098e67bb75cd5b59a9e0d7d8fbeeda7cc079752a706cdf8b1},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.13681. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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-purpose pretraining rarely emphasizes idiomatic Rust generation, cross-language semantic equivalence, or the ability to reason about and repair compiler/runtime feedback. In this report we describe a three-stage fine-tuning curriculum applied to Qwen3-27B that is designed to progressively specialize the model for the C-to-Rust (C2Rust) translation task: (1) continued pretraining on Rust-centric corpora to strengthen the model's prior over idiomatic Rust syntax and standard-library usage; (2) supervised fine-tuning (SFT) on the microsoft/Verus_Training_Data dataset to instill debugging and self-repair behavior over Rust code; and (3) task-specific SFT on paired C/Rust solutions derived from LeetCode problems to teach direct semantic translation. We evaluate the resulting model using the agentic, static-analysis-guided verification framework of SACTOR, which performs structure-aware, two-phase (unidiomatic to idiomatic) translation with foreign-function-interface (FFI)-based end-to-end (E2E) testing. We report success rate, idiomaticity (Clippy lint counts, unsafe-code fraction), and failure-mode analyses, and compare our fine-tuned model against baseline Qwen3-27B and other LLMs evaluated under the same framework.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-01 in cs.AI).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI); Emerging Technologies (cs.ET); Machine Learning (cs.LG).
Pagina del lavoro: https://arxiv.org/abs/2608.13681 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-17T07:28:26.648Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-01?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).