Alpona-1.0-9B
A 9B RTL generation model: Qwen3.5-9B post-trained for SystemVerilog design generation. It was fine-tuned on a Verilog corpus built from the CodeV-R1 dataset.
This repository holds the complete merged weights — no adapter, no external base to resolve, no checkpoint directories. Download it and it runs.
| Repository | musatur/Alpona-1.0-9B |
| Type | Decoder-only language model, text only (Qwen3_5ForCausalLM, hybrid architecture) |
| Base model | Qwen/Qwen3.5-9B. The base model's vision encoder is not included. |
| Parameters | 8.95B (8,953,803,264), BF16 |
| Download size | 17.9 GB (one safetensors file) |
| Context length | 262,144 tokens |
| Input / output | English specification in; reasoning, then one Verilog/SystemVerilog module out |
| License | CC BY-SA 4.0 |
| Developed by | EOI 122 project team |
| Funding | BIRDI grant under SICIP, project "LLM-Guided RTL Design and Verification" (EOI 122) |
Results
| benchmark | pass@1 | pass@5 |
|---|---|---|
| VerilogEval v2 (156 spec-to-RTL tasks) | 74.3% | 79.2% |
| RTLLM v2 (50 designs) | 66.7% | 73.4% |
Scored with the official testbenches for each benchmark.
These results are with the repair loop described under Evaluation. For comparison, the base model, Qwen3.5-9B, alone scores 48.5% / 66.6% (VerilogEval v2 pass@1 / pass@5) and 36.1% / 57.8% (RTLLM v2 pass@1 / pass@5), as published by ChipMATE.
Thinking mode is required
The prompt prefix ends with an open <think>. The chat template in this repo does that for
you via add_generation_prompt=True. Scoring an Alpona model with the reasoning block closed
costs it a large fraction of its score — do not disable thinking.
Requirements
This is a hybrid architecture (model_type: qwen3_5_text). It will not load on older
transformers:
pip install -U "transformers>=5.14.1" torch accelerate
The BF16 weights need about 18 GB of GPU memory, plus room for the KV cache.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "musatur/Alpona-1.0-9B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
messages = [
{"role": "system", "content": "You are a synthesizable SystemVerilog generation agent. "
"Return only one complete module with the requested interface."},
{"role": "user", "content": "Design a 4-bit synchronous up counter named TopModule with "
"inputs clk, reset and output [3:0] q."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=8192)
print(tok.decode(out[0], skip_special_tokens=True))
Intended use
- Generating synthesizable Verilog/SystemVerilog modules from written specifications, as an assistant to RTL designers, researchers and students.
- Research on LLM-based RTL generation and verification.
Every generated module should be reviewed and verified by an engineer (simulation against an independent testbench, linting, synthesis) before it is used in real hardware.
Out-of-scope use
- Use without human review in safety-critical hardware, for example medical, automotive or aerospace systems.
- General chat, image or video tasks. The vision encoder is not included, and the model was evaluated only on RTL generation.
Training data
A corpus built from the CodeV-R1 dataset (CC BY-SA 4.0), which pairs Verilog design problems with reasoning traces.
Evaluation
- Benchmarks: VerilogEval v2 (156 specification-to-RTL tasks) and RTLLM v2 (50 designs), scored with each benchmark's official testbenches.
- Metric: pass@1 and pass@5 (%).
- Repair loop: results marked "with the repair loop" let the model compile and simulate its code against its own generated testbench and repair it from the compiler and simulator output (Algorithm 2 in the project report). The model never sees the benchmark's testbench or reference design. The repair loop is not part of this repository: the code under Usage runs the model alone.
Fine-tuning and the repair loop measured separately. These are the 30 VerilogEval tasks used for the project's M4 baseline (12 easy, 12 medium, 6 hard), pass@1 (%):
| Model | Setting | Easy | Medium | Hard | All 30 |
|---|---|---|---|---|---|
| Qwen3.5-9B | alone | 87.5 | 41.7 | 8.3 | 53.3 |
| Qwen3.5-9B | with the repair loop | 100.0 | 58.3 | 8.3 | 65.0 |
| Alpona-1.0-9B | alone | 94.4 | 52.8 | 0.0 | 58.9 |
| Alpona-1.0-9B | with the repair loop | 100.0 | 75.0 | 0.0 | 70.0 |
Source: Tables 2.2 and 2.4 of the project's Second Quarterly Report.
Limitations
- Hard tasks: on the six hard tasks of the 30-task set, the model solved none, with or without the repair loop.
- Bus and protocol designs: pass rates on protocol-style tasks are low (Figure 2.5 of the project report).
- Long outputs: thinking mode writes long reasoning before the code. Leave a large
max_new_tokensbudget, or the module may be cut off. - Generated code may contain functional bugs, non-synthesizable constructs or timing problems. Verify every module with an independent testbench before use.
Licence
CC BY-SA 4.0, following the license of the CodeV-R1 training data. The base model, Qwen3.5-9B, is released under Apache-2.0.
Acknowledgement
Developed under the project "LLM-Guided RTL Design and Verification" (EOI 122), funded by a BIRDI grant under SICIP.