--- base_model: Qwen/Qwen3.8-27B library_name: peft license: apache-2.0 tags: [verilog, rtl, hardware-design, lora, verilog-eval] --- # RecurRTL-MATE — `localizer` adapter LoRA adapter for **Qwen/Qwen3.8-27B**, one of four role adapters in the RecurRTL-MATE recursive RTL-generation pipeline. This one identifies which part of a failing design is responsible. ## Usage ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B", device_map="auto") model = PeftModel.from_pretrained(base, "REPO_ID", subfolder="localizer") tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B") ``` The base model is ~27B parameters; in 4-bit it needs roughly 17 GB of VRAM. ## Training QLoRA (4-bit NF4 base, bf16 compute), rank 16, alpha 32, on an NVIDIA H100 NVL. Adapters were trained on recursive-repair trajectories rather than on benchmark reference solutions. ## Base-model baseline The **unmodified** base model scores **77.56% pass@1** (121/156) on VerilogEval v2 spec-to-rtl — n=1, temperature 1.0, thinking enabled, official `sv-generate --rules` prompt, scored with the official iverilog harness. Compile rate 88.5%; among designs that compiled and simulated, 87.68% passed. That figure is the **baseline these adapters are meant to improve on**, measured on the 4-bit GGUF build of the same base weights. Treat it as the reference point, not as a result for this adapter. ## Benchmark caveat `Prob099_m2014_q6c` is broken upstream in NVlabs/verilog-eval: its testbench binds ports `Y2`/`Y4` that its own reference module does not declare, so the reference cannot compile against its own testbench and no model can pass it. It is counted as a failure above because published numbers count it too.