Instructions to use yang-z/CodeV-CL-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yang-z/CodeV-CL-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yang-z/CodeV-CL-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yang-z/CodeV-CL-7B") model = AutoModelForCausalLM.from_pretrained("yang-z/CodeV-CL-7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use yang-z/CodeV-CL-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yang-z/CodeV-CL-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yang-z/CodeV-CL-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yang-z/CodeV-CL-7B
- SGLang
How to use yang-z/CodeV-CL-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "yang-z/CodeV-CL-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yang-z/CodeV-CL-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "yang-z/CodeV-CL-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yang-z/CodeV-CL-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yang-z/CodeV-CL-7B with Docker Model Runner:
docker model run hf.co/yang-z/CodeV-CL-7B
Link to paper on HF, add project page URL
Browse filesThis PR adds a link to the paper [CodeV-R1: Reasoning-Enhanced Verilog Generation](https://huggingface.co/papers/2505.24183) on Hugging Face, as well as linking to the project page.
README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
license: llama2
|
| 3 |
library_name: transformers
|
|
|
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
-
|
| 7 |
---
|
|
|
|
| 8 |
<div align="center">
|
| 9 |
<img src="./assets/logo.png" style="zoom:25%;" />
|
| 10 |
</div>
|
|
@@ -17,11 +18,11 @@ CodeV is an innovative series of open-source, instruction-tuned Large Language M
|
|
| 17 |
|
| 18 |
## Models and Datasets
|
| 19 |
|
| 20 |
-
| | Base Model | CodeV
|
| 21 |
-
| ---- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------
|
| 22 |
| 6.7B | [deepseek-ai/deepseek-coder-6.7b-base](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-base) | [yang-z/CodeV-DS-6.7B](https://huggingface.co/yang-z/CodeV-DS-6.7B) |
|
| 23 |
-
| 7B | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [yang-z/CodeV-CL-7B](https://huggingface.co/yang-z/CodeV-CL-7B)
|
| 24 |
-
| 7B | [Qwen/CodeQwen1.5-7B-Chat](https://huggingface.co/Qwen/CodeQwen1.5-7B-Chat) | [yang-z/CodeV-QW-7B](https://huggingface.co/yang-z/CodeV-QW-7B)
|
| 25 |
|
| 26 |
## Test
|
| 27 |
|
|
@@ -61,8 +62,11 @@ response = result[0]["generated_text"]
|
|
| 61 |
print("Response:", response)
|
| 62 |
```
|
| 63 |
|
|
|
|
|
|
|
|
|
|
| 64 |
## Paper
|
| 65 |
-
**
|
| 66 |
|
| 67 |
Please cite the paper if you use the models from CodeV.
|
| 68 |
|
|
@@ -83,4 +87,4 @@ Please cite the paper if you use the models from CodeV.
|
|
| 83 |
* [Magicoder](https://github.com/ise-uiuc/magicoder): Training code, original datasets and data decontamination
|
| 84 |
* [DeepSeek-Coder](https://github.com/deepseek-ai/DeepSeek-Coder): Base model for CodeV-DeepSeek
|
| 85 |
* [CodeLlama](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/): Base model for CodeLlama
|
| 86 |
-
* [CodeQwen](https://github.com/QwenLM/CodeQwen1.5): CodeV-CodeQwen
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
license: llama2
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
+
- code
|
| 7 |
---
|
| 8 |
+
|
| 9 |
<div align="center">
|
| 10 |
<img src="./assets/logo.png" style="zoom:25%;" />
|
| 11 |
</div>
|
|
|
|
| 18 |
|
| 19 |
## Models and Datasets
|
| 20 |
|
| 21 |
+
| | Base Model | CodeV |
|
| 22 |
+
| ---- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
| 23 |
| 6.7B | [deepseek-ai/deepseek-coder-6.7b-base](https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-base) | [yang-z/CodeV-DS-6.7B](https://huggingface.co/yang-z/CodeV-DS-6.7B) |
|
| 24 |
+
| 7B | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [yang-z/CodeV-CL-7B](https://huggingface.co/yang-z/CodeV-CL-7B) |
|
| 25 |
+
| 7B | [Qwen/CodeQwen1.5-7B-Chat](https://huggingface.co/Qwen/CodeQwen1.5-7B-Chat) | [yang-z/CodeV-QW-7B](https://huggingface.co/yang-z/CodeV-QW-7B) |
|
| 26 |
|
| 27 |
## Test
|
| 28 |
|
|
|
|
| 62 |
print("Response:", response)
|
| 63 |
```
|
| 64 |
|
| 65 |
+
## Project Page
|
| 66 |
+
https://iprc-dip.github.io/CodeV-R1
|
| 67 |
+
|
| 68 |
## Paper
|
| 69 |
+
**Hugging Face:** [CodeV-R1: Reasoning-Enhanced Verilog Generation](https://huggingface.co/papers/2505.24183)
|
| 70 |
|
| 71 |
Please cite the paper if you use the models from CodeV.
|
| 72 |
|
|
|
|
| 87 |
* [Magicoder](https://github.com/ise-uiuc/magicoder): Training code, original datasets and data decontamination
|
| 88 |
* [DeepSeek-Coder](https://github.com/deepseek-ai/DeepSeek-Coder): Base model for CodeV-DeepSeek
|
| 89 |
* [CodeLlama](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/): Base model for CodeLlama
|
| 90 |
+
* [CodeQwen](https://github.com/QwenLM/CodeQwen1.5): CodeV-CodeQwen
|