/ Модель

Характеристики

Контекст
262 144 токена
Размер весов
54,7 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3_5 · dense
Базовая модель
Qwen3.5-27B
Библиотека
transformers
Опубликована
3 авг 2026

C2Rust

Генерация текстаТекст → текст3 профессии

Дообученная Qwen3.5-27B для перевода программ на C в Rust с сохранением поведения на тестах.

70скачиваний за 30 дней1лайквеса обновлены24 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

C2Rust — полноразмерный дообученный чекпойнт Qwen/Qwen3.5-27B, созданный Pu Zhao, Changdi Yang и соавторами из Northeastern University, EmbodyX Inc и Aibao LLC. Модель предназначена для перевода программ на C в поведенчески эквивалентный Rust. Это плотная модель с 27 млрд параметров; в чекпойнте также сохранён визуальный энкодер базовой Qwen3.5, но при переводе кода он не используется. Обучение проводилось только на тексте в три этапа: продолженное обучение на Rust, настройка на отладку по обратной связи верификатора и специализированное дообучение на парах C–Rust. Веса представлены в Safetensors, лицензия — Apache-2.0.

В описанной авторами оценке модель достигла 87,30% успешных переводов на тестовом наборе из 200 программ C: результат засчитывался, если Rust-код компилировался и проходил все заданные тесты в пределах шести попыток генерации и исправления. Модель рассчитана на эксперименты и помощь при миграции кода; сгенерированные программы требуют компиляции, тестирования и проверки человеком. Прохождение предоставленных тестов не доказывает полной семантической эквивалентности, безопасности памяти или защищённости, а код может содержать raw pointers и `unsafe` Rust. После специализации отмечено небольшое снижение результата на SWE-bench Verified относительно базовой модели.

Сценарии применения

  • перевод функций на C в Rust
  • миграция небольших программ с C на Rust
  • подготовка кандидата перевода для последующей компиляции и проверки тестами

Ограничения

Успешное прохождение предоставленных тестов не доказывает полной семантической эквивалентности, безопасности памяти или защищённости; генерируемый код может использовать `unsafe` Rust и требует проверки. Специализация сопровождается небольшим снижением результата на SWE-bench Verified относительно базового чекпойнта.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

C2Rust

C2Rust is a full-parameter BF16 fine-tune of Qwen/Qwen3.5-27B for translating C programs into behaviorally equivalent Rust. The model is trained with a three-stage curriculum and evaluated with an execution-based SACTOR harness that compiles each candidate and compares its behavior with the source C program.

Paper

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

Pu Zhao, Changdi Yang, Yixiao Chen, Yi Gao, Yifan Cao, Haochen Zeng, and Yanzhi Wang. Northeastern University · EmbodyX Inc · Aibao LLC

The arXiv title uses “Qwen3-27B”; Section 3 identifies the released source checkpoint as Qwen/Qwen3.5-27B, which is the identifier used throughout this model card.

Results

87.30% execution-verified C2Rust Success Rate — a 15.00 percentage-point gain over the untuned Qwen3.5-27B base at identical model size. The 27B checkpoint also outperforms Qwen3.5-Plus (397B total), MiniMax-M2.5 (230B total), and GLM-5 (744B total) on this benchmark.

C2Rust translation success rate

Success Rate (SR) is the percentage of programs that compile and pass every end-to-end test. Scores are arithmetic means over five random seeds under the same inference configuration.

ModelModel sizeSR
Qwen3.5-Plus397B total / 17B active77.20%
MiniMax-M2.5230B total / 10B active83.90%
GLM-5744B total / 40B active84.40%
GLM-5.2744B total / 40B active89.90%
Claude Code-4.6undisclosed90.01%
Qwen3.5-27B base27B dense72.30%
C2Rust (this model)27B dense87.30%

The curriculum improves the direct Qwen3.5-27B baseline by 15.00 percentage points while keeping model size and serving cost fixed. C2Rust outperforms Qwen3.5-Plus, MiniMax-M2.5, and GLM-5 on this task, while remaining below GLM-5.2 and Claude Code-4.6.

General coding capability

ModelSWE-bench Verified pass@1
GPT-5-mini (2025-08-07)72.0
GPT-OSS-120B62.0
Qwen3.5-122B-A10B72.0
Qwen3.5-27B base72.4
C2Rust (this model)70.6

The 1.8-point difference from the untuned base suggests a modest specialization cost, while the model retains strong general software-engineering performance.

Three-stage training curriculum

StageObjectiveDataTraining configuration
1. Rust continued pretrainingStrengthen Rust syntax, idioms, completion, repair, and library knowledge1,673,289 examples from seven Rust-focused sourcesFull-parameter BF16, 1 epoch, LR 1e-6
2. Debugging-aware SFTLearn to consume structured verifier feedback and make targeted repairsmicrosoft/Verus_Training_DataFull-parameter BF16, 2 epochs, LR 2e-7
3. C2Rust task SFTLearn direct C-to-Rust semantic translationC2Rust-Moxin functions/ and programs/ pairsFull-parameter BF16, 2 epochs, LR 2e-7

Stage 1 combines Strandset-Rust, CodeFIM-Rust-Mellum, rust_instruction_dataset, humaneval-rust, the Rust subset of Magicoder-OSS-Instruct-75K, the Rust program-synthesis and repair subsets of xCodeEval, and the Rust subset of StarCoderData.

All three stages use a 16,384-token sequence length, DeepSpeed ZeRO Stage 3, and eight NVIDIA B300 GPUs. Training is text-only. The Qwen3.5 vision encoder remains in the released checkpoint but receives no task input and plays no role in C-to-Rust translation.

Model details

FieldValue
Base modelQwen/Qwen3.5-27B
Parameters27B language model (~28B including the retained vision encoder)
Weight formatSafetensors
PrecisionBF16
Context used in training16,384 tokens
Fine-tuning typeFull-parameter
Primary taskC-to-Rust program translation
LicenseApache-2.0

The tokenizer, vocabulary, and architecture are unchanged from the base checkpoint; no task-specific special tokens were added.

Evaluation protocol

The companion benchmark contains 200 C programs: 92 receive command-line arguments and 108 read standard input. Approximately 120 are derived from IBM Project CodeNet. A translation succeeds only when the generated Rust program compiles and reproduces every reference output on the supplied tests within a six-attempt translation and repair budget.

SettingValue
Temperature0.6
Top-p0.95
Top-k20
Maximum output length1,536 tokens
Maximum translation attempts6
Random seeds5

The released repository's default configs evaluate SACTOR's interface-preserving, unidiomatic stage. Generated code may therefore contain raw pointers or unsafe Rust. Passing the benchmark measures agreement on the supplied test suite, not formal semantic equivalence.

Resources

Running with the benchmark

Download the checkpoint:

hf download moxin-org/C2Rust --local-dir /path/to/C2Rust-model

Clone and prepare the benchmark:

git clone https://github.com/moxin-org/C2Rust.git
cd C2Rust
bash fix_paths.sh

cd engine
uv sync
./update_rust_ast_parser.sh
cargo build --release
cd ..

Launch the checkpoint with SGLang:

export SERVE_VENV=/path/to/sglang-venv
./scripts/launch_model.sh /path/to/C2Rust-model 0,1 30878 2

Run a two-program smoke test before the complete evaluation:

python3 scripts/run_eval.py configs/native_prompt.toml results/_smoke \
  --modes argv --limit 2 --workers 1

See the benchmark README and SETUP.md for the complete environment, five-seed evaluation, aggregation, and troubleshooting workflow.

Intended use

This release is intended for research and experimentation on C-to-Rust translation. Treat every generated program as a candidate: compile it, test it against the original implementation, and review it for correctness, safety, and maintainability before use.

Limitations

  • Passing the supplied tests is not proof of semantic equivalence, memory safety, or security.
  • The default evaluation permits unsafe Rust and prioritizes behavior preservation over idiomaticity.
  • Stage 3 uses function- and program-level pairs, but excludes project-level training examples.
  • The model scores 70.6 on SWE-bench Verified versus 72.4 for the base checkpoint, suggesting mild capability narrowing after full-parameter specialization.
  • The report does not yet provide an ablation isolating each curriculum stage's marginal contribution.

Citation

@article{zhao2026c2rust,
  title   = {Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT},
  author  = {Zhao, Pu and Yang, Changdi and Chen, Yixiao and Gao, Yi and Cao, Yifan and Zeng, Haochen and Wang, Yanzhi},
  journal = {arXiv preprint arXiv:2608.13681},
  year    = {2026},
  doi     = {10.48550/arXiv.2608.13681}
}

License and attribution

The checkpoint is released under Apache-2.0 and is derived from Qwen/Qwen3.5-27B. The benchmark is Apache-2.0. Its dataset includes material derived from IBM Project CodeNet under CDLA-Permissive-2.0; see the dataset provenance and terms.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3_5ForConditionalGeneration
Ревизия весов
3a8bd5a

0 моделей