Benyucong's picture
Update README.md
83aa781 verified
|
Raw History Blame Contribute Delete
2.64 kB
---
base_model: Qwen/Qwen3-8B
library_name: transformers
model_name: sft_quantum_circuit_gen_8B
tags:
- generated_from_trainer
- trl
- sft
licence: license
license: apache-2.0
datasets:
- Benyucong/graph-data-quantum-tokenized_sft
language:
- en
metrics:
- code_eval
pipeline_tag: text-generation
---
# Model Card for sft_quantum_circuit_gen_8B
This model is a fine-tuned version of [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B).
It has been trained based on [Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization](https://arxiv.org/abs/2504.11109) using [TRL](https://github.com/huggingface/trl).
## Quick start
```python
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
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/benyucong-aalto-university/quantum-circuit-generation/runs/l10l9lfl)
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:
```bibtex
@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:
```bibtex
@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}}
}
```