--- license: cc-by-nc-4.0 base_model: Qwen/Qwen2.5-Coder-7B-Instruct library_name: peft tags: [verilog, rtl, eda, lora, question-answering] --- # CircuitQA LoRA adapters LoRA adapters (r = 64, alpha = 128; weights stored in fp32, base model loaded in bf16) for [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct), trained by the authors of *CircuitQA: A Grounded Architecture for Question Answering over Digital RTL Designs with Multi-Backend Query Routing*. Data, code and evaluation outputs: [drawais/circuitqa](https://huggingface.co/datasets/drawais/circuitqa). Only the adapter weights and configurations are provided; the base model and its tokenizer are loaded from their own repository. | Folder | Role | |---|---| | `s3_seed42`, `s3_seed123`, `s3_seed456` | Response Decoder trained on the template questions of the repository-disjoint split (three seeds) | | `router_s3` | Query Routing Module trained on the same template questions | | `s2_seed42`, `s2_seed123`, `s2_seed456` | Response Decoder trained on the template questions of the design-disjoint split (three seeds) | All adapters are trained on template questions and answers computed from the outputs of the analysis backends, from an earlier build of the template corpus of [drawais/circuitqa](https://huggingface.co/datasets/drawais/circuitqa) (the released `corpus/` recomputes every answer with the released backends). Requires `peft>=0.21` (the configs were written by PEFT 0.21.2). ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base = "Qwen/Qwen2.5-Coder-7B-Instruct" tok = AutoTokenizer.from_pretrained(base) model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="bfloat16", device_map="auto") model = PeftModel.from_pretrained(model, "drawais/circuitqa-adapters", subfolder="s3_seed42") ``` ## Licence The adapter weights and configurations in this repository are licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (non-commercial use). They are LoRA weights trained by the authors on top of Qwen2.5-Coder-7B-Instruct; the base model is not included and remains under its own licence, the Apache License 2.0 (copy in `LICENSE-Qwen2.5-Coder-7B-Instruct`). Use of the base model is subject to that licence. **Training data.** The training data refer to designs from the upstream repositories listed in the dataset's `LICENSE.md`; the adapters contain no design source code. Training data derived from NVDLA designs contain data derived from NVDLA, Copyright (c) 2016-2017 NVIDIA Corporation, licensed under the NVIDIA Open NVDLA License and Agreement v1.0 (copy in `LICENSES/`), modified to contain only analysis results computed by the authors. Training data derived from files of [pConst/basic_verilog](https://github.com/pConst/basic_verilog) written by Konstantin Pavlov refer to designs licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/), reduced to analysis results computed by the authors. Upstream projects are named only to identify the sources of the designs, without implying endorsement. ## Citation If you use the CircuitQA dataset, code or adapters, please cite: ```bibtex @misc{awais2026circuitqa, title = {{CircuitQA}: A Grounded Architecture for Question Answering over Digital {RTL} Designs with Multi-Backend Query Routing}, author = {Awais, Muhammad and Postolache, Octavian Adrian and Oliveira, Sancho Moura}, year = {2026}, howpublished = {\url{https://huggingface.co/datasets/drawais/circuitqa}}, note = {Dataset and code} } @misc{awais2026circuitqaadapters, title = {{CircuitQA} Adapters: {LoRA} Adapters for {Qwen2.5-Coder-7B-Instruct}}, author = {Awais, Muhammad and Postolache, Octavian Adrian and Oliveira, Sancho Moura}, year = {2026}, howpublished = {\url{https://huggingface.co/drawais/circuitqa-adapters}}, note = {Trained model adapters} } ```