Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 38 of its 59 references that are in the map. First posted on arXiv 13 Aug 2026.
Builds on
38 of 59 references.
References · 38
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2025Dream 7B: Diffusion Large Language Modelscited by 515
- 2025LLaDA 1.5: Variance-Reduced Preference Optimization for Large Language Diffusion Modelscited by 273
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2025Mercury: Ultra-Fast Language Models Based on Diffusioncited by 225
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generationcited by 184
- 2026Qwen3.5-Omni Technical Reportcited by 146
- 2025Dream-Coder 7B: An Open Diffusion Language Model for Codecited by 81
- 2025A Survey on Diffusion Language Modelscited by 75
- 2025Efficient Reasoning with Hidden Thinkingcited by 72
26 more
- 2023Verus: Verifying Rust Programs using Linear Ghost Types (extended version)cited by 50
- 2025Token Reduction Should Go Beyond Efficiency in Generative Models -- From Vision, Language to Multimodalitycited by 49
- 2022Code Translation with Compiler Representationscited by 42
- 2024LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformerscited by 35
- 2023CodeFusion: A Pre-trained Diffusion Model for Code Generationcited by 31
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 31
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2024Numerical Pruning for Efficient Autoregressive Modelscited by 24
- 2025DraftAttention: Fast Video Diffusion via Low-Resolution Attention Guidancecited by 21
- 2024Pruning Foundation Models for High Accuracy without Retrainingcited by 19
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 18
- 2024Rethinking Token Reduction for State Space Modelscited by 14
- 2024Search for Efficient Large Language Modelscited by 13
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2025FastCar: Cache Attentive Replay for Fast Auto-Regressive Video Generation on the Edgecited by 9
- 2024Translating C To Rust: Lessons from a User Studycited by 8
- 2025SafeTrans: LLM-assisted Transpilation from C to Rustcited by 8
- 2025Cross-Platform Scaling of Vision-Language-Action Models from Edge to Cloud GPUscited by 8
- 2025QuartDepth: Post-Training Quantization for Real-Time Depth Estimation on the Edgecited by 7
- 2026Effective MoE-based LLM Compression by Exploiting Heterogeneous Inter-Group Experts Routing Frequency and Information Densitycited by 6
- 20247B Fully Open Source Moxin-LLM/VLM -- From Pretraining to GRPO-based Reinforcement Learning Enhancementcited by 5
- 2025Open-Source Multimodal Moxin Models with Moxin-VLM and Moxin-VLAcited by 4
- 2025Search-Based Multi-Trajectory Refinement for Safe C-to-Rust Translation with Large Language Modelscited by 3
- 2026Reducing the Costs of Proof Synthesis on Rust Systems by Scaling Up a Seed Training Setcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning
- 2026AdaTrans: Automated C to Rust Transformation via Error-Adaptive Repair ↗
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation
- 2024RustRepoTrans: Repository-level Code Translation Benchmark Targeting Rust
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust
- 2025Unlocking a New Rust Programming Experience: Fast and Slow Thinking with LLMs to Conquer Undefined Behaviors
- 2026LLM4C2Rust: Large Language Models for Automated Memory-Safe Code Transpilation ↗