arXiv ScienceSearch

arXiv · 2608.13681

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-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.

Explore related subjects

Keep this discovery

BibTeXRIS

Pu Zhao, Changdi Yang, Yixiao Chen, Yi Gao, Yifan Cao, Haochen Zeng, Yanzhi Wang. 2026-08-13. Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT. https://arxiv.org/abs/2608.13681

Cite the original work for its findings. Save a collection to share your selection of sources.

Discover connections

Connections use source metadata and explicit phrase matches, not verified experimental comparisons.

KEEP EXPLORING

Related papers

Augmenting software engineering with AI - The ai4se taxonomy and its use

Although model-driven software engineering (MDSE) has proven effective in managing complex systems, its industrial adoption remains limited by the substantial maintenance overhead required for models and the specialised skills demanded of developers. Meanwhile, advances in artificial intelligence (AI), particularly generative and agentic AI, have shown great promise in automating code-related tasks such as comprehension, generation, and defect detection. These capabilities are largely powered by 'big code': vast repositories of open-source software that now form the basis of data-driven, empirical SE and automated quality assurance. This paper aims to synthesise these two domains by exploring the integration of AI into model-driven practices. It provides a comprehensive overview of the current state of AI-augmented software engineering and introduces a novel taxonomy 'ai4se' to classify and connect diverse AI applications within the field. On this basis, the paper proposes a vision for 'big models' in software engineering (SE), an approach designed to leverage the structural advantages of MDSE alongside the scalability of AI. Finally, the paper discusses the pair modelling paradigm as a collaborative framework for the MDSE industry, designed to enhance software quality through human-AI partnership.

cs.SE

Emergent Behavior and Uncertainty in IoT-Enhanced Business Processes: Challenges and Future Directions

IoT-enhanced business processes are characterized by high complexity due to heterogeneous actors, varying levels of autonomy among participating systems, continuously evolving execution contexts spanning the digital and physical worlds, and continuous event streams. In such settings, process behavior partially emerges only at runtime through complex interactions involving humans, IoT devices, physical objects, software systems, agents, and services. This complexity introduces partial observability, uncertainty, and runtime dynamics that are difficult to anticipate and that challenge traditional business process management (BPM) assumptions and systems. We discuss these challenges from three perspectives, addressing 1) uncertainty representation, 2) operationalization of IoT-enhanced processes, and 3) runtime management of emergent behavior. Based on a motivating scenario and an analysis of the state of the art, we identify open research gaps and outline short-, medium-, and long-term recommendations to shape a research agenda on emergent behavior in IoT-enhanced business processes.

cs.ET

Differential Space-Time Block Coding for Phase-Unsynchronized Cell-Free MIMO Downlink

In the downlink of CF-mMIMO systems, spectral efficiency gains critically rely on joint coherent transmission, as all APs must align their transmitted signals in phase at the UE. Achieving such phase alignment is challenging, as it requires tight synchronization among geographically distributed APs. In this paper, we address this issue by introducing a DSTBC approach that bypasses the need for AP phase synchronization. We first provide analytic bounds to the achievable spectral efficiency of CF-mMIMO with phase-unsynchronized APs. Then, we propose a DSTBC-based transmission scheme tailored to CF-mMIMO, which operates without CSI and phase synchronization among the APs. We derive a closed-form expression for the resulting SINR, enabling quantitative comparisons among different DSTBC schemes. Numerical simulations confirm that phase misalignments can significantly impair system performance. In contrast, the proposed DSTBC scheme can mitigate these effects, achieving performance comparable to that of fully synchronized systems. However, when more than two APs jointly serve a UE, the code rate of DSTBC schemes can limit their SE gains. Hence, we also investigate DQO-STBC schemes that achieve full code rate by relaxing the orthogonality constraints.

cs.IT