Leona-Q 1.5 Mini
Small footprint. Quantum circuits in the loop.
Leona-Q 1.5 Mini brings trainable quantum circuits into a compact language model's forward pass. Built on MiniCPM5-2B's official Q4_K_M weights, it adds a learned butterfly circuit that runs during both prompt processing and generation.
Four coherent paths. Eight data qubits per path. Three layers of learned rotations and butterfly entanglers. A compact circuit adapter—just 395 KB—adds quantum-state features to the model's internal representations.
This is a hybrid quantum-classical architecture executed through classical statevector simulation. It runs on conventional hardware; no quantum computer is required.
Benchmark results
All 13 evaluated benchmarks are shown below, using the same released butterfly checkpoint and the official Q4 baseline.
Exact scores and sample counts| Benchmark | Evaluated set / metric | Official MiniCPM5-2B Q4_K_M | Leona-Q 1.5 Mini |
|---|---|---|---|
| AIME 2026 | All 30 problems | 76.7% (23/30) | 83.3% (25/30) |
| LiveCodeBench | v6-only · 175 new problems | 56.0% (98/175) | 60.0% (105/175) |
| ARC-Challenge | Fixed subset · 128 questions | 43.8% (56/128) | 42.2% (54/128) |
| ARC-Easy | Fixed subset · 256 questions | 70.3% (180/256) | 69.9% (179/256) |
| BoolQ | Fixed subset · 128 questions | 84.4% (108/128) | 82.0% (105/128) |
| PIQA | Fixed subset · 128 questions | 71.1% (91/128) | 71.1% (91/128) |
| HellaSwag | Fixed subset · 256 questions | 55.1% (141/256) | 57.0% (146/256) |
| MMLU | 285 questions · 5 per subject | 57.5% (164/285) | 58.6% (167/285) |
| WinoGrande | Fixed subset · 256 questions | 57.8% (148/256) | 58.2% (149/256) |
| OpenBookQA | 500 questions · acc_norm | 35.4% (177/500) | 34.4% (172/500) |
| SciQ | 1000 questions · acc_norm | 92.1% (921/1000) | 92.6% (926/1000) |
| COPA | 100 questions · accuracy | 73.0% (73/100) | 73.0% (73/100) |
| RTE | 277 questions · accuracy | 59.2% (164/277) | 59.6% (165/277) |
Scores are percentages with correct/total counts. ARC-Challenge, ARC-Easy, BoolQ, PIQA, HellaSwag, MMLU and WinoGrande use fixed exploratory subsets, not full leaderboard evaluations. MMLU uses five-shot prompts and five questions per subject. OpenBookQA and SciQ use length-normalized accuracy (acc_norm); COPA and RTE use raw accuracy.
AIME and LiveCodeBench use one generated answer per problem with matched settings and no additional output-token cap beyond the native 131,072-token total context window. LiveCodeBench uses the 175 new v6 problems, not the cumulative v6 set. Other tasks use multiple-choice likelihood scoring.
The chart compares the trained quantum-circuit model with the official Q4 baseline, measured in our Linux/CUDA evaluation runtime. See evaluation details for the protocol and statistical analysis, and runtime validation for the portable implementation.
Inside the model
Open the editable draw.io diagram · View full-size SVG
Q4 language model → learned quantum circuit → residual update → next transformer layers
- Butterfly connectivity: CNOT connections span qubit distances 1, 2 and 4 across successive stages.
- Learned quantum gates: RY/RZ rotations transform input-dependent quantum states.
- Coherent readout: data-qubit and cross-path correlations produce features for the language model.
- Inference-time execution: the circuit stays active when generating responses.
- Compact deployment: approximately 1.56 GB of base weights plus a 395 KB circuit adapter. Runtime memory depends on context length.
The base model stays frozen. The adapter was trained on 1,000 examples: 800 general instruction examples and 200 DeepSeek-R1-derived reasoning examples, using answer-token supervision.
Run locally
This repository contains the circuit weights and a source runtime extension. The official base GGUF is downloaded separately and verified automatically.
Use the included Leona runtime. Stock llama.cpp, LM Studio and Transformers do not execute this adapter as-is. Linux/CUDA checkpoint evaluation is complete; full-model macOS and Windows validation is pending.
Install Python 3.12+, CMake, a C++17 compiler and the Hugging Face CLI, then:
hf download LeonaQuantum/leonaq-1.5-mini --local-dir leonaq-1.5-mini
cd leonaq-1.5-mini
python fetch.py
python build.py --backend metal
python launch.py --bin-dir build-metal/bin --model MiniCPM5-2B-Q4_K_M.gguf --server
Open http://127.0.0.1:8080 to chat.
For Windows with an NVIDIA GPU, use --backend cuda and build-cuda/bin; use a Visual Studio developer terminal with the CUDA toolkit installed. CPU and Vulkan build options are also available. These are build targets, not verified platform compatibility claims.
The launcher defaults to a 4,096-token context. Set your own context size according to available memory. Add --circuit off to compare with the official Q4 baseline.
Build and usage guide · Evaluation protocol · Training and attribution
LeonaQuantum · Exploring language models with quantum circuits.