Dottie's frozen-teacher compression experiment
Can a small set of measurements from a larger model teach a smaller model more than the larger model's answers alone? This benchmark first checks that the larger model can perform the candidate task more reliably than the smaller one. Both checkpoints are inspectable, and both use their own tokenizer and native chat template on the same user text.
What happened in the recorded run
The frozen teacher was Qwen2.5-1.5B-Instruct. The recipient was stock Qwen3.5-0.8B. Every calibration case appeared twice with the A/B mapping reversed. The grade was the first freely chosen token from the whole vocabulary. We used 8 cases and 16 prompts per candidate.
| Candidate | Teacher correct | Receiver correct | Teacher right under both maps | Receiver right under both maps | Teacher outputs outside A/B |
|---|---|---|---|---|---|
| Choose the larger number | 10/16 | 12/16 | 3/8 | 6/8 | 0 |
| Classify an animal or vehicle | 8/16 | 8/16 | 2/8 | 4/8 | 7 |
Before scoring, we required the teacher to get at least 12/16 answers correct and 4/8 cases right under both maps, with a lead of at least 3/16 over the pristine recipient. Both candidates fell short. The run ended at calibration. There are no fresh transfer scores, fitted receiver weights, minimum useful rank, or precision estimate from this run. The numbers describe these two tasks and wordings. An independent offline replay reproduced the protocol, all raw calibration tokens and the HTML report byte for byte.
The raw answers reveal a difference between knowing a category and expressing it with the requested code. For otter, the larger Qwen returned the single word animal under both A/B maps. For donkey it did the same. When asked about tram or sailboat under the reversed map, it returned vehicle. The remaining out-of-format answer was the single letter T on taxi. Greedy continuation through end-of-turn confirmed those seven complete replies. Counting correct category words alongside correct codes gives 14/16 expressions of the right category in the teacher and 8/16 in the recipient. That second count is a retrospective observation on calibration data. A new semantic-answer experiment would need new calibration and test cases. It does not change this run's gate.
Reproduce on the A9
Use the unzipped complete kit. Start PowerShell in the directory that contains qwen_compression.py. If .qwen-env already exists from the earlier Qwen work, use it. For a fresh Python 3.12 environment use the following commands.
py -3.12 -m venv .qwen-env
.\.qwen-env\Scripts\python.exe -m pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu
.\.qwen-env\Scripts\python.exe -m pip install transformers==5.3.0
Check the packet encoder, then run the benchmark. The default output directory has a unique name under runs. Open the index.html path printed at the end. The recommended two CPU threads match the recorded run.
.\.qwen-env\Scripts\python.exe qwen_compression.py --self-test
.\.qwen-env\Scripts\python.exe qwen_compression.py --threads 2
The first run downloads about 4.83 GB of checkpoint data plus the tokenizers. The receiver uses the kit's existing models\qwen35-exp8 cache when available. The teacher uses models\qwen25-15b. Only the original stock receiver is opened. All checkpoint checks use the pinned SHA-256 digest. To use a different cached location and run disconnected, substitute its paths here.
.\.qwen-env\Scripts\python.exe qwen_compression.py --threads 2 --offline --cache models\qwen35-exp8 --teacher-cache models\qwen25-15b
What a qualifying run measures
- Calibrate on separate cases. Try number comparison first, then animal/vehicle classification if needed. An eligible task gets 8 labeled orientation prompts, 32 bridge prompts and 8 unrelated prompts to preserve. Future prompts use new cases, new wording and both A/B mappings. The bridge rubric is withheld from fitting.
- Store the teacher measurement. Capture the last real prompt-token response after the 14th and 28th teacher blocks. Center and normalize each layer's features, combine them across prompts, and extract orthogonal sample coordinates by PCA. Send only the coordinates of the shared 40 prompts, with a manifest of the prompt IDs, hashes and eight anchor labels. The recipient needs no donor weights or donor projection matrix.
- Vary signal size. Evaluate PCA ranks 1, 2, 4 and 8 independently at signed four-bit, signed eight-bit and float32 precision. The binary store includes an eight-byte shape and format header and one float32 scale per quantized component. For the 40 prompts, rank 1 at four bits occupies 32 bytes, rank 4 at eight bits occupies 184 bytes, and rank 8 at float32 occupies 1,288 bytes, plus the common manifest. These are packet sizes, not demonstrated sufficiency thresholds. The fit separately records bytes in the model-specific adapter.
- Compute one recipient-native edit per comparison. Use the labeled anchor centroids in the decoded coordinates to assign each bridge prompt a signed strength. A fixed ridge solve fits a rank-one update to the last MLP down projection of the smaller model, using the same 48 prompts in every fit. The answer-only arm gets the very same prompts, eight ground-truth anchors, and the larger model's unrestricted A/B answers. Invalid answers request zero displacement. A shuffle arm permutes bridge row assignments at rank 4 and 8 bits. An anchors-only fit and the untouched receiver complete the comparison. The geometry arm carries continuous targets. The answer-only arm carries discrete answers. A positive difference would warrant a teacher-logit comparison to distinguish extra confidence information from other geometry.
- Lock the prediction and test. Write every factor and binary packet, then record their hashes, per-case predicted movements and the expected guard retention in
forecast-lock.json. Run the 32 fresh prompts and eight old-answer guards after locking. The primary rank-4, 8-bit edit must gain at least four correct answers over the untouched copy, exceed both the answer-only and shuffled edits by at least two answers, and keep at least seven of eight old first tokens. Full pair counts, changed answers and all grid scores remain visible even on a miss. Reapply the primary edit as an actual native BF16 parameter and independently run the entire receiver to check the optimized evaluator. - Keep the pattern and the write separately. The packet captures relations among specific examples. It binds to the manifest, teacher revision, layers and processing recipe. The recipient factors
lora_A(1 × 3,584) andlora_B(1,024 × 1) would form a rank-one update tomodel.language_model.layers.23.mlp.down_proj.weight. Their product is written to the corresponding stock receiver layer, with unit scale and BF16 rounding. The raw NPZ factors are a numerical recipe. They need a matching base revision, module name and adapter configuration for a PEFT loader. A different receiver needs a freshly fitted write.
The planned comparisons cover a narrow behavior and a small retention sample. A passing row would be evidence about this receiver and these probes. The smallest passing grid cell would require independent confirmation. Token retention measures the greedy first token, rather than the full quality of an answer.
Sources and records
- Frozen teacher at revision
989aa7980e4cf806f80c7fef2b1adb7bc71aa306. Official Qwen2.5-1.5B-Instruct files - Stock receiver at revision
2fc06364715b967f1860aea9cf38778875588b17. Official Qwen3.5-0.8B files - Each run saves its own frozen
protocol.json, measuredcompression.json, and localindex.htmlwith every calibration prompt and raw answer.