--- license: apache-2.0 library_name: peft tags: - verilog - rtl - lora - peft - qwen - hardware-design - eda --- # Verilog RTL LoRA Adapter Suite (TCAD 2026 Draft Artifacts) This repository collects the main PEFT LoRA adapters used in the adapter-centric Verilog RTL generation study. The original local adapter directories were copied and renamed with descriptive artifact names. No original local adapter directory was deleted or modified. ## Adapter mapping | Descriptive artifact name | Paper alias | Base/start | Intended role | |---|---:|---|---| | `qwen25-coder-7b-verilog-direct-baseline-lora` | `v9` | Qwen2.5-Coder-7B-Instruct | Stable direct LoRA baseline trained from auto-distilled RTL data and passing anchors. | | `qwen25-coder-7b-verilog-delta-distilled-lora` | `v30b` | Qwen2.5-Coder-7B-Instruct + `v9` | Delta-distilled direct adapter emphasizing cases where `v9` failed and a verifier/selector found a passing candidate. | | `qwen35-9b-verilog-migration-general-lora` | `v32` | Qwen3.5-9B | First Qwen3.5 migration adapter trained from Qwen2.5-derived verified data. | | `qwen35-9b-verilog-thinking-reinforced-lora` | `v33` | Qwen3.5-9B + `v32` | Thinking/reasoning-preserving direct adapter with failure-analysis reinforcement and passing anchors. | | `qwen35-9b-verilog-structured-repair-lora` | `v34` | Qwen3.5-9B + `v33` | Structured/manual repair adapter focused on deterministic final-code formatting and repair behavior. | `v36` in the paper is not a separate adapter. It is a verification-guided workflow that composes the `v33` and `v34` adapters with compiler/simulator feedback under a bounded call budget. ## Loading example ```python from transformers import AutoTokenizer, AutoModelForCausalLM from peft import PeftModel base_model = "Qwen/Qwen2.5-Coder-7B-Instruct" # for v9/v30b artifacts adapter_dir = "qwen25-coder-7b-verilog-direct-baseline-lora" tok = AutoTokenizer.from_pretrained(adapter_dir) base = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto") model = PeftModel.from_pretrained(base, adapter_dir) ``` Use `Qwen/Qwen3.5-9B` as the base family for the Qwen3.5 adapters (`v32`, `v33`, `v34`) with the compatibility loader used in the project scripts. ## Reporting note These adapters are research artifacts. Several training rows are benchmark-targeted or verifier-derived. Do not report them as clean zero-shot leaderboard submissions on the same benchmark. Direct adapter results and verification-guided workflow results should be reported separately. ## Internal diagnostic benchmark This repository also includes `internal-rtl-diagnostic-30/`, the Internal RTL Diagnostic-30 suite used for local regression testing and adapter sanity checks. It is an internal diagnostic benchmark, not a public leaderboard. Results on this suite should not be compared to external adapters/models unless prompts, harness, extraction, simulator, and scoring protocol are matched.