QuantumBench is a focused experiment for distilling quantum information science knowledge from a larger teacher language model into a smaller student model.
Complete dataset: data/train/quantumbench_full.jsonl (107 examples) + data/eval/quantumbench_full.jsonl (26 examples)
- Total: 133 expert-authored Q&A pairs on quantum physics and quantum information science
- Source: Kaggle Measuring AGI hackathon submission — executive function track
- Split: 80% train (107), 20% eval (26) — stratified by difficulty tier
- Difficulty tiers: 40 foundational, 63 intermediate, 30 graduate
- Format: JSONL with
instruction(question with prefix) andresponse(expert answer) - Characteristics: Zero newlines in all questions and answers (flat strings); answers range from 144–2813 characters; graduate questions integrate 4 sub-requirements from different quantum information sub-domains
The canonical project lane is:
- Teacher:
models/teacher-model - Teacher base:
models/gpt2-large - Student base:
models/gpt2 - Student output:
models/student-gpt2-distilled - Train data:
data/train/quantumbench_full.jsonl(new) - Eval data:
data/eval/quantumbench_full.jsonl(new)
The current supervised recovery lane adds:
- Curriculum builder:
scripts/build_quantumbench_curriculum.py - Canonical supervised data:
data/train/quantumbench_train_canonical.jsonl - Stage 1 curriculum:
data/train/quantumbench_train_curriculum_stage1.jsonl - Stage 2 curriculum:
data/train/quantumbench_train_curriculum_stage2.jsonl - Semantic eval companion:
data/eval/quantumbench_eval_semantic.jsonl - Semantic rubric evaluator:
scripts/semantic_eval_quantumbench.py
Train a compact GPT-2 student to preserve as much quantum information science behavior as possible from a GPT-2 Large LoRA teacher, then measure whether the transfer holds on held-out quantum questions.
models/teacher-model
- Architecture: GPT-2 Large causal language model
- Base:
models/gpt2-large - Adaptation: PEFT LoRA
- LoRA rank: 16
- LoRA alpha: 32
- LoRA dropout: 0.05
- Target module:
c_attn - Role: quantum knowledge source for distillation
models/student-gpt2-distilled
- Architecture: GPT-2 causal language model
- Base:
models/gpt2 - Approximate base parameters: 124M
- Role: distilled compact quantum model
The student path is a target output. It should not be treated as valid until a clean dry run, full training run, and held-out evaluation are documented.
Each dataset line is:
{"instruction": "...", "response": "..."}data/train/quantumbench_train.jsonl: training and distillation datadata/eval/quantumbench_eval.jsonl: held-out quantum information science evaluation data
Do not train on the eval file.
Set up the environment:
bash setup.sh
source venv/bin/activateCheck the repo and dependencies:
python scripts/system_check.py
python scripts/test_dataset.py --data-path data/train/quantumbench_train.jsonl
python scripts/build_quantumbench_curriculum.py
python scripts/test_dataset.py --data-path data/train/quantumbench_train_canonical.jsonlRun a short distillation dry run:
python scripts/distill_quantumbench.py \
--teacher-model models/teacher-model \
--student-model-name gpt2 \
--data-path data/train/quantumbench_train.jsonl \
--output-dir models/student-gpt2-distilled \
--epochs 1 \
--batch-size 2 \
--learning-rate 1e-5 \
--temperature 1.5 \
--alpha 0.1 \
--max-length 256 \
--dry-runRun the canonical full distillation:
python scripts/distill_quantumbench.py \
--teacher-model models/teacher-model \
--student-model-name gpt2 \
--data-path data/train/quantumbench_train.jsonl \
--output-dir models/student-gpt2-distilled \
--epochs 5 \
--batch-size 2 \
--learning-rate 1e-5 \
--temperature 1.5 \
--alpha 0.1 \
--max-length 256Evaluate teacher and student:
python scripts/evaluate_quantumbench.py \
--teacher-model models/teacher-model \
--student-model models/student-gpt2-distilled \
--data-path data/eval/quantumbench_eval.jsonl \
--max-new-tokens 256 \
--output-predictions results/predictions/teacher_student_eval.jsonCompare distillation behavior:
python scripts/compare_teacher_student.py \
--teacher-model models/teacher-model \
--student-model models/student-gpt2-distilled \
--data-path data/eval/quantumbench_eval.jsonl \
--output results/metrics/teacher_student_comparison.jsonRun a qualitative generation gate:
python scripts/generation_quality_gate.py \
--model-path models/student-gpt2-supervised-sanity \
--data-path data/eval/quantumbench_eval.jsonl \
--output results/predictions/sanity_quality_gate_eval.json \
--sample-size 5Run semantic rubric evaluation:
python scripts/semantic_eval_quantumbench.py \
--model-path models/student-gpt2-supervised-v2 \
--data-path data/eval/quantumbench_eval_semantic.jsonl \
--output results/predictions/student_supervised_v2_semantic_eval.jsonPROJECT_STATUS.md: current project state and next actionsdocs/TRAINING_PROGRESS.md: chronological training runsdocs/EVALUATION_PROTOCOL.md: quantum knowledge evaluation rubricdocs/MODEL_CARD_TEACHER.md: canonical teacher detailsdocs/MODEL_CARD_STUDENT.md: target student detailsdocs/EXPERIMENT_LOG.md: canonical vs archived artifacts
data/ train/eval JSONL files
configs/ canonical distillation and evaluation settings
scripts/ focused training, evaluation, comparison, and visualization tools
docs/ current documentation
results/ generated metrics, predictions, plots, and runs
models/ canonical base models, teacher adapter, and distilled student target
archive/ stale docs, logs, scripts, and experimental model variants
Earlier student runs were exploratory and showed instability, including NaN evaluation loss and repetition-related fixes. The canonical student should be regenerated and evaluated under the protocol in docs/EVALUATION_PROTOCOL.md.