/ Модель

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

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
15,2 ГБ
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-Coder-7B-Instruct
Библиотека
transformers
Опубликована
3 июн 2025

CodeV-R1-RL-Qwen-7B

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

CodeV-R1-Qwen-7B — дообученная модель Qwen для генерации и дополнения Verilog по текстовым спецификациям.

1 173скачиваний за 30 дней7лайковвеса обновлены20 июн 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CodeV-R1-Qwen-7B — языковая модель для генерации и дополнения кода на Verilog, разработанная авторами проекта CodeV-R1. Она дообучена с подкреплением на основе CodeV-R1-Distill-Qwen-7B, а исходная база в метаданных указана как Qwen/Qwen2.5-Coder-7B-Instruct. Модель предназначена для преобразования текстовых спецификаций в RTL-код, продолжения Verilog-фрагментов и решения задач проектирования цифровой логики.

Модель использует плотную архитектуру Qwen2 с причинной генерацией текста и содержит 7,1 млрд параметров. Для неё заявлено контекстное окно 32 768 токенов; репозиторий содержит веса safetensors. В README описан подход RLVR: генерация тестовых стендов, проверка эквивалентности кода и двухэтапное обучение с дистилляцией и последующим подкреплением. Оценка проводилась на VerilogEval и RTLLM; авторы также отмечают улучшение эффективности относительно DeepSeek-R1 по оценке вычислительных затрат.

Модель ориентирована на аппаратное описание и не является универсальным средством автоматизации EDA: корректность и синтезируемость сгенерированного Verilog следует проверять тестами и средствами проектирования. В предоставленном README лицензия не описана.

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

  • генерация RTL-модуля Verilog по текстовой спецификации
  • дополнение незавершённого кода Verilog
  • создание тестовых вариантов аппаратной логики
  • черновое преобразование требований к цифровой схеме в HDL-код

Ограничения

Сгенерированный код требует проверки тестбенчем и средствами EDA; README не сообщает лицензию модели.

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

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

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

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

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

Открыть на Hugging Face

CodeV-R1-Qwen-7B

Project page

1. Introduction

Large language models (LLMs) trained via reinforcement learning with verifiable reward (RLVR) have achieved breakthroughs on tasks with explicit, automatable verification, such as software programming and mathematical problems. Extending RLVR to electronic design automation (EDA), especially automatically generating hardware description languages (HDLs) like Verilog from natural-language (NL) specifications, however, poses three key challenges: the lack of automated and accurate verification environments, the scarcity of high‐quality NL–code pairs, and the prohibitive computation cost of RLVR.

To this end, we introduce CodeV-R1, an RLVR framework for training Verilog generation LLMs, As a continuation of the work initiated with CodeV. First, we develop a rule-based testbench generator that performs robust equivalence checking against golden references. Second, we propose a round-trip data synthesis method that pairs open-source Verilog snippets with LLM‐generated NL descriptions, verifies code–NL–code consistency via the generated testbench, and filters out inequivalent examples to yield a high-quality dataset. Third, we employ a two-stage distill-then-RL training pipeline: distillation for the cold start of reasoning abilities, followed by adaptive DAPO, our novel RLVR algorithm that can reduce training cost by adaptively adjusting sampling rate.

CodeV-R1-Qwen-7B, is a model that employs reinforcement learning (RL) fine-tuning, built upon the foundation of CodeV-R1-Distill-Qwen-7B. The distillation-based precursor, CodeV-R1-Distill-Qwen-7B, is provided here. For more training details, please refer to our paper.

2. Evaluation Results

During the evaluation phase, the maximum generation length is configured to 16,384 tokens. A temperature setting of 0.6 is applied, and 20 responses are generated per query to estimate the pass@1 score.

Our evaluation encompasses Verilog benchmarks, including VerilogEval and RTLLM. For VerilogEval v2, we examine zero-shot scenarios in both specification-to-RTL translation and code completion tasks. Concerning RTLLM, results are reported for version 1.1, which offers a broader spectrum of comparative analyses. Furthermore, we find that the acquisition of the reasoning process in Verilog problems, as facilitated by DeepSeek-R1, enhances the model's out-of-domain mathematical capabilities.

VerilogEval (v2)

ModelModel sizeTypeSpec-to-rtlCompletion
GPT-4oUndisclosedGeneral62.5%59.0%
GPT-4 TurboUndisclosedGeneral61.1%53.9%
GPT-4UndisclosedGeneral32.0%42.3%
Mistral LargeUndisclosedGeneral37.5%34.0%
Llama3.1405BGeneral57.2%56.4%
Llama3.170BGeneral42.8%35.3%
Llama370BGeneral43.9%37.8%
Llama270BGeneral5.3%1.3%
Llama3.18BGeneral19.1%2.6%
CodeLlama70BCoding34.9%37.2%
DeepSeek Coder33BCoding21.7%25.0%
CodeGemma7BCoding9.5%8.3%
DeepSeek Coder6.7BCoding29.6%24.4%
RTL-Coder6.7BVerilog RTL36.8%35.9%
CodeV-R1-distill (ours)7BVerilog RTL65.2%65.5%
CodeV-R1 (ours)7BVerilog RTL68.8%69.9%

RTLLM (v1.1)

ModelModel sizeTypePass@1
GPT-4oUndisclosedGeneral33.8%
GPT-3.5 TurboUndisclosedGeneral28.3%
Llama3.1405BGeneral38.9%
Nemotron-4340BGeneral18.9%
Llama3.18BGeneral19.1%
CodeLlama7BCoding17.9%
CodeQwen7BCoding24.1%
Starcoder215BCoding15.5%
DeepSeek Coder6.7BCoding23.1%
DeepSeek-Coder-V216BCoding33.1%
DeepSeek-Coder-V2236BCoding34.5%
RTL-Coder6.7BVerilog RTL36.8%
CraftRTL6.7BVerilog RTL53.1%
CodeV-R1-distill (ours)7BVerilog RTL56.2%
CodeV-R1 (ours)7BVerilog RTL72.9%

For RTLLM v1.1, we also plot results showing pass rate against model size.

4. Usage

CodeV-R1-Distill-Qwen-7B can be utilized in the same manner as Qwen or Llama models.

For instance, you can easily start a service using vLLM:

vllm serve zhuyaoyu/CodeV-R1-Distill-Qwen-7B --tensor-parallel-size 2 --max-model-len 16384 --enforce-eager

Usage Recommendations

During training and evaluation, we use a system prompt

You are a helpful assistant. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think> </think> and<answer> </answer> tags, respectively, i.e., <think> reasoning process here </think><answer> answer here </answer>.  Now the user asks you to write verilog code. After thinking, when you finally reach a conclusion, enclose the final verilog code in ```verilog ``` within <answer> </answer> tags. i.e., <answer> ```verilog
 module top_module(in, out, ...) ... ``` </answer>.

It is recommended to use this prompt during inference.

5. License

CodeV-R1-Qwen-7B is derived from Qwen-2.5 series, which are originally licensed under Apache 2.0 License, and now finetuned with 87k samples curated with DeepSeek-R1.

6. Citation

If you find our model helpful, please cite our paper:

@misc{zhu2025codevr1,
      title={CodeV-R1: Reasoning-Enhanced Verilog Generation}, 
      author={Yaoyu Zhu and Di Huang and Hanqi Lyu and Xiaoyun Zhang and Chongxiao Li and Wenxuan Shi and Yutong Wu and Jianan Mu and Jinghua Wang and Yang Zhao and Pengwei Jin and Shuyao Cheng and Shengwen Liang and Xishan Zhang and Rui Zhang and Zidong Du and Qi Guo and Xing Hu and Yunji Chen},
      year={2025},
      eprint={2505.24183},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2505.24183}, 
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
286cf43

0 моделей