Instructions to use Mohato/qwen-quantum-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mohato/qwen-quantum-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mohato/qwen-quantum-adapter")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Mohato/qwen-quantum-adapter", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mohato/qwen-quantum-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mohato/qwen-quantum-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mohato/qwen-quantum-adapter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mohato/qwen-quantum-adapter
- SGLang
How to use Mohato/qwen-quantum-adapter with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Mohato/qwen-quantum-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mohato/qwen-quantum-adapter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Mohato/qwen-quantum-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mohato/qwen-quantum-adapter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use Mohato/qwen-quantum-adapter with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mohato/qwen-quantum-adapter to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mohato/qwen-quantum-adapter to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mohato/qwen-quantum-adapter to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Mohato/qwen-quantum-adapter", max_seq_length=2048, ) - Docker Model Runner
How to use Mohato/qwen-quantum-adapter with Docker Model Runner:
docker model run hf.co/Mohato/qwen-quantum-adapter
π QAC-L: Quantum Action Codec
Neuro-Symbolic Compiler Adapter for Qwen2.5-Coder-7B
A lightweight, deterministic bridge between natural language and quantum execution.
Developed by Pulsate Labs
π§ What It Is & What It Does
In conversational quantum computing systems, asking a Large Language Model to generate raw Python/Qiskit code on the fly is highly unstable. It leads to API deprecations, syntax hallucinations, and execution safety risks.
This LoRA adapter solves that problem. By acting as a strict intermediary compiler, it restricts the LLM's output to a custom, highly-structured Quantum Domain-Specific Language (DSL). This output is easily parsed, validated, and executed by a classical software boundary (the "Bouncer" shield), ensuring 100% stable execution.
β‘ Supported Translations
1. Quantum Superposition / Randomness:
User Input: "Can you do a quantum coin flip using 3 qubits?"
DSL Output:[ACTION: RANDOM] [QUBITS: 3]
2. Quantum Chemistry (Hβ VQE):
User Input: "Hey, compute the ground state energy of hydrogen with a distance of 1.4 Angstroms."
DSL Output:[ACTION: VQE] [DISTANCE: 1.4]
βοΈ How It Works (System Architecture)
The architecture relies on a Neuro-Symbolic loop, separating the creative translation of natural language from the strict mathematical execution of the quantum circuit.
graph TD
A[User Natural Query] -->|String| B(Qwen-7B LoRA Adapter)
B -->|Translates to DSL| C{The Bouncer Parser}
C -->|Invalid or Unsafe| X[Reject & Re-Prompt]
C -->|Valid: ACTION: VQE| D[Local Qiskit AerSimulator]
D -->|Raw Measurements| E(AI Physics Interpreter)
E -->|Scientific English| F[User Output]
π¬ The Fine-Tuning Process
The model was fine-tuned on a synthetic dataset of 1,200 conversational-to-DSL pairs generated using randomized, physically realistic parameter variations ($N \in [1, 5]$ qubits, $D \in [0.5, 2.5]$ Γ ).
Using QLoRA (Quantized Low-Rank Adaptation) on dual T4 GPUs, the model's training loss dropped from 1.89 to 0.11, indicating stable convergence and flawless syntactic replication of the target DSL.
π Comparison with Similar Approaches
When building AI-Quantum interfaces, developers typically use one of two architectures. Here is why the QAC-L Neuro-Symbolic pipeline outperforms standard generation:
| Feature | Standard LLM Code Gen (Raw Qiskit) | QAC-L Adapter + Bouncer (Ours) |
|---|---|---|
| Method | LLM writes raw Python script containing Qiskit commands. | LLM compiles parameters into a strict, validated schema. |
| Syntax Stability | β Poor. Generates deprecated functions or incorrect imports. | High. 100% stable. Classical Python handles the API calls. |
| Security / Safety | β Low. Vulnerable to Prompt Injection (running arbitrary OS code). | High. Sanitized by regex parser. Malformed inputs are blocked. |
| VRAM Footprint | β Heavy. Requires massive frontier models (GPT-4) for reliability. | Light. Runs efficiently on local consumer hardware (7B Q4). |
Built for the future of Embodied AI and Quantum Control