qroute / README.md
Laborator's picture
deploy: sync from qroute cb583c5
6919f98 verified
|
Raw
History Blame Contribute Delete
1.91 kB
---
title: QRoute
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
hardware: cpu-basic
tags:
- quantum-computing
- vqc
- mixture-of-experts
- pennylane
- llm
- routing
- auto-deploy
---
# QRoute - a quantum MoE router for LLMs
This Space demonstrates [QRoute](https://github.com/Quantum-Labor/qroute): a
variational quantum circuit (VQC) that routes tokens to experts in a
Mixture-of-Experts layer. It is project 3 of 3 in the Quantum Co-Processor program
(after QVerify and QAgent).
## What you can do here
- **Explore expert routing.** Pick an example token (one per cluster); 8 expert
"lamps" light up to show which experts the VQC router and the classical baseline
each select (top-2), with the routing-probability bars side by side.
- **See training and load balance.** Training-loss curves for both routers and an
expert-utilization chart with the Gini coefficient (lower = more balanced).
- **Read the toy results.** Both routers reach 100% validation accuracy at a
comparable parameter count.
## Design notes
- **Precompute and serve.** Both routers are trained offline by
`scripts/precompute_space.py` (the README config) and the per-epoch losses,
routing probabilities, utilization, and metrics are baked into
`precomputed/toy_results.json`. The Space renders them with matplotlib and does
no live training/inference, so torch / pennylane are not in the image.
- **Fully open.** No IBM path, no quota, no OAuth.
- **Honest scope.** Simulator only, 3 qubits / 8 experts, a toy task. No quantum
advantage is claimed; the VQC router is a trainable, integrable module that
matches the classical baseline. The full-scale 7-qubit / 128-expert Gemma plan
is in the repo's design.md and roadmap.md.
Auto-deployed from the `qroute` repo `main` branch via a GitHub Action
(`HfApi.upload_folder`); see `docs/deploy.md`.