Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SAT Retrofit Experiment: Can AR Models Be Forced to Output Multiple Tokens?
|
| 2 |
+
|
| 3 |
+
## TL;DR
|
| 4 |
+
**No.** Autoregressive (AR) models cannot be "snapped" to Semi-Autoregressive (SAT) inference. The hidden states only encode single next-token prediction. Joint AR+SAT training from scratch is required.
|
| 5 |
+
|
| 6 |
+
## Key Results
|
| 7 |
+
|
| 8 |
+
### Speed
|
| 9 |
+
| Method | Tokens/sec | Speedup |
|
| 10 |
+
|--------|-----------|---------|
|
| 11 |
+
| AR (baseline) | 75.6 | 1.0x |
|
| 12 |
+
| Forced SAT (block=2) | 149.9 | **1.98x** |
|
| 13 |
+
|
| 14 |
+
### Quality (Perplexity - lower is better)
|
| 15 |
+
| Prompt | AR | Forced SAT | Degradation |
|
| 16 |
+
|--------|-----|------------|-------------|
|
| 17 |
+
| "The quick brown fox" | 16.2 | 424.0 | **26x worse** |
|
| 18 |
+
| "In the beginning" | 7.4 | 69.0 | **9x worse** |
|
| 19 |
+
| "Once upon a time" | 8.9 | 56.5 | **6x worse** |
|
| 20 |
+
| "The scientist discovered" | 10.8 | 296.8 | **27x worse** |
|
| 21 |
+
| "Machine learning is" | 7.7 | 133.6 | **17x worse** |
|
| 22 |
+
|
| 23 |
+
### Example Outputs
|
| 24 |
+
|
| 25 |
+
**Prompt:** "The scientist discovered that"
|
| 26 |
+
|
| 27 |
+
- **AR (good):** "the bacteria were able to grow in the air, and that they could also grow in the water."
|
| 28 |
+
- **Forced SAT (broken):** "the thatched bacteria were roofing able to offload growling the bacteria spores into into the the"
|
| 29 |
+
|
| 30 |
+
## Why It Fails
|
| 31 |
+
|
| 32 |
+
AR model hidden states at position N only encode "what is token N+1" - singular. There is no representation for "what are tokens N+1 AND N+2 simultaneously."
|
| 33 |
+
|
| 34 |
+
When you force 2-token output:
|
| 35 |
+
- Token 1: Predicted from position -1 (correct context) ✓
|
| 36 |
+
- Token 2: Predicted from position -2 (STALE context, one step behind) ✗
|
| 37 |
+
|
| 38 |
+
This creates alternating reasonable/wrong tokens as the model answers questions about outdated context.
|
| 39 |
+
|
| 40 |
+
## The Solution: Joint AR+SAT Training
|
| 41 |
+
|
| 42 |
+
Train the model on BOTH objectives from initialization:
|
| 43 |
+
- AR loss: predict next token
|
| 44 |
+
- SAT loss: predict next N tokens simultaneously
|
| 45 |
+
|
| 46 |
+
This forces the model to build representations that encode multiple future tokens from each position, enabling both inference modes.
|
| 47 |
+
|
| 48 |
+
See: [AGILLM-3](https://huggingface.co/OpenTransformer/AGILLM-3-large) for a working implementation.
|
| 49 |
+
|
| 50 |
+
## Reproducing
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
pip install torch transformers
|
| 54 |
+
python sat_test.py
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Citation
|
| 58 |
+
|
| 59 |
+
If you use this finding, please cite:
|
| 60 |
+
```
|
| 61 |
+
@misc{sat_retrofit_2026,
|
| 62 |
+
author = {Scott Bisset},
|
| 63 |
+
title = {AR Models Cannot Be Retrofitted for SAT Inference},
|
| 64 |
+
year = {2026},
|
| 65 |
+
publisher = {OpenTransformers Ltd}
|
| 66 |
+
}
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## License
|
| 70 |
+
MIT
|