Model Card for sft_quantum_circuit_gen_4B
This model is a fine-tuned version of Qwen/Qwen3-4B-Instruct-2507. It has been trained based on Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization using TRL.
Quick start
from transformers import pipeline
question = """Design a QASM 3.0 quantum circuit with 3 qubits and 3 layers to solve the vertex_cover \
given the graph: {"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}], \
"edges": [{"source": 0, "target": 1}, {"source": 0, "target": 2}, {"source": 1, "target": 2}]}. \
Provide valid QASM 3.0 code with optimal parameters."""
generator = pipeline("text-generation", model="Benyucong/sft_quantum_circuit_gen_8B", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=1024, return_full_text=False)[0]
print(output["generated_text"])
Training procedure
This model was trained with SFT.
Framework versions
- TRL: 0.15.2
- Transformers: 4.55.0
- Pytorch: 2.7.1
- Datasets: 4.0.0
- Tokenizers: 0.21.4
Citations
If you use this model, please cite:
@misc{jern2025agentqfinetuninglargelanguage,
      title={Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization}, 
      author={Linus Jern and Valter Uotila and Cong Yu and Bo Zhao},
      year={2025},
      eprint={2504.11109},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      url={https://arxiv.org/abs/2504.11109}, 
}
Cite TRL as:
@misc{vonwerra2022trl,
    title        = {{TRL: Transformer Reinforcement Learning}},
    author       = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
    year         = 2020,
    journal      = {GitHub repository},
    publisher    = {GitHub},
    howpublished = {\url{https://github.com/huggingface/trl}}
}
- Downloads last month
- 35
Model tree for Benyucong/sft_quantum_circuit_gen_4B
Base model
Qwen/Qwen3-4B-Instruct-2507