Instructions to use shailja/fine-tuned-codegen-2B-Verilog with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shailja/fine-tuned-codegen-2B-Verilog with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shailja/fine-tuned-codegen-2B-Verilog")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("shailja/fine-tuned-codegen-2B-Verilog") model = AutoModelForCausalLM.from_pretrained("shailja/fine-tuned-codegen-2B-Verilog") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use shailja/fine-tuned-codegen-2B-Verilog with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shailja/fine-tuned-codegen-2B-Verilog" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shailja/fine-tuned-codegen-2B-Verilog", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/shailja/fine-tuned-codegen-2B-Verilog
- SGLang
How to use shailja/fine-tuned-codegen-2B-Verilog 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 "shailja/fine-tuned-codegen-2B-Verilog" \ --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": "shailja/fine-tuned-codegen-2B-Verilog", "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 "shailja/fine-tuned-codegen-2B-Verilog" \ --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": "shailja/fine-tuned-codegen-2B-Verilog", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use shailja/fine-tuned-codegen-2B-Verilog with Docker Model Runner:
docker model run hf.co/shailja/fine-tuned-codegen-2B-Verilog
Update README.md
Browse files
README.md
CHANGED
|
@@ -50,7 +50,7 @@ extra_gated_fields:
|
|
| 50 |
|
| 51 |
## Model Summary
|
| 52 |
|
| 53 |
-
The
|
| 54 |
|
| 55 |
- **Repository:** [shailja-thakur/VGen](https://github.com/shailja-thakur/VGen)
|
| 56 |
- **Baseline LLM** [SalesForce/CodeGen](https://github.com/salesforce/CodeGen)
|
|
|
|
| 50 |
|
| 51 |
## Model Summary
|
| 52 |
|
| 53 |
+
The VeriGen model is 2B parameter model is a fine-tuned version of [CodeGen-multi-2B](https://github.com/salesforce/codegen), trained on [Verilog Dataset](https://huggingface.co/datasets/shailja/Verilog_GitHub), with a context length of 2048.
|
| 54 |
|
| 55 |
- **Repository:** [shailja-thakur/VGen](https://github.com/shailja-thakur/VGen)
|
| 56 |
- **Baseline LLM** [SalesForce/CodeGen](https://github.com/salesforce/CodeGen)
|