Qwen3-8B SVA, SFT baseline (LoRA adapter)

A 698 MB LoRA adapter for Qwen/Qwen3-8B that turns natural-language property descriptions into SystemVerilog Assertions (SVA), reasoning in a <think> block first.

For the best accuracy, use qwen3-8b-sva-rest-r2-merged (84.8%). Use this adapter when you want something light to download, want to swap adapters on a shared base, or want a starting point for your own fine-tuning.

Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B", torch_dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")
model = PeftModel.from_pretrained(base, "mmoselhy077/qwen3-8b-sva-thinking-abl839-lora")
# Optional: model = model.merge_and_unload()

msgs = [{"role": "user", "content": "Write a SystemVerilog assertion: req must be granted within 3 cycles."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, enable_thinking=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=8192, do_sample=True, temperature=0.2)
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))

Evaluation

FVEval-Verified, 356 problems (73 human, 283 machine). A sample is correct only if Questa qverify proves it equivalent to the reference with a bidirectional miter. Vacuous assertions fail.

Metric All Human Machine
Equivalence pass@5 81.2% 63.0% 85.9%
Equivalence pass@1 (approx.) — ~45% ~63%

pass@5 is an oracle ceiling. Sample several answers and check them formally; do not deploy single-shot. "Proven" rates are not comparable across these models, because the harness counted vacuous proofs.

Training

839 curated NL→SVA examples (sva-abl839-corpus), LoRA r=64, α=128, 3 epochs.

Limitations

Single-property English specs only. Outputs can be valid SVA that is wrong or vacuous, so always check them formally. Human-written specs are much harder than machine-written ones (63% vs 86%).

License

Apache-2.0, inherited from Qwen3-8B.

Downloads last month
50
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mmoselhy077/qwen3-8b-sva-thinking-abl839-lora

Finetuned
Qwen/Qwen3-8B
Adapter
(2,490)
this model

Evaluation results

  • equivalence pass@5 (all) on FVEval-Verified (356 problems)
    self-reported
    81.200
  • equivalence pass@5 (machine split) on FVEval-Verified (356 problems)
    self-reported
    85.900
  • equivalence pass@5 (human split) on FVEval-Verified (356 problems)
    self-reported
    63.000