Back to Projects

Group Project · 2026

C to Rust Transpiler
Fine-tuning LLMs for Code Translation

A machine learning project focused on using open-source Large Language Models to translate C code into Rust. The project explored model selection, dataset preparation, fine-tuning, and evaluation using CodeT5 and Qwen2.5-Coder-7B-Instruct.

C to Rust Transpiler project screensho
01 / 06

01 · Overview

Fine-tuning LLMs

The goal was to develop a model capable of translating C source code into functionally equivalent Rust code. We investigated open-source code models and fine-tuned them for this specific translation task.


We initially experimented with CodeT5 before moving to Qwen2.5-Coder-7B-Instruct. This change required us to revisit our training approach and prepare a suitable dataset for fine-tuning.

02 · My Role

Working with Artificial Intelligence

I helped research potential models and worked on fine-tuning them. I also contributed to the analysis and writing using the information gathered throughout the project. We ultimately wrote a ten-page paper documenting our work and results.

03 · Team

Who worked on it.

Hank (Henry) Glenn

Lead Tuner and Programmer

Eder Martinez

Researcher, Programmer, and Testing

Miguel Arellano

Programming

04 · Technology

Built with.

Python Qwen2.5-Coder-7B-Instruct CodeT5 LoRA PyTorch

05 · Research

Research & references.

The following resources were used as references throughout the development of the project.

06 · Results

From experimentation to a working model.

After encountering limitations with CodeT5, we moved to Qwen2.5-Coder-7B-Instruct and fine-tuned it using LoRA. A significant part of the process involved preparing, checking, and validating the training and validation data.

The resulting model was able to perform C-to-Rust translation and provided measurable improvements that we evaluated and documented in our final research paper.

View Written Paper