Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- world-model
|
| 5 |
+
- dreamerv3
|
| 6 |
+
- binary-arithmetic
|
| 7 |
+
- mechanistic-interpretability
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# A World Model That Learned Perfect Binary Arithmetic
|
| 11 |
+
|
| 12 |
+
DreamerV3 world model trained on a 4-bit binary counting environment (500K steps). The model learned to simulate carry cascades autonomously — 100% completion rate under full observation ablation.
|
| 13 |
+
|
| 14 |
+
**Paper**: [GitHub](https://github.com/major-scale/anim-binary-counting)
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
|
| 18 |
+
| File | Description | Size |
|
| 19 |
+
|------|-------------|------|
|
| 20 |
+
| `latest.pt` | Full DreamerV3 checkpoint (PyTorch) | 136 MB |
|
| 21 |
+
| `exported/dreamer_weights.bin` | Extracted weight matrices for numpy RSSM | 23 MB |
|
| 22 |
+
| `exported/dreamer_manifest.json` | Weight name mapping | 4 KB |
|
| 23 |
+
| `battery.npz` | Pre-collected hidden states from 15 episodes | 25 MB |
|
| 24 |
+
| `metrics.jsonl` | Training metrics log | 79 KB |
|
| 25 |
+
|
| 26 |
+
## Usage
|
| 27 |
+
|
| 28 |
+
The analysis scripts use the exported weights (no PyTorch required):
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
git clone https://github.com/major-scale/anim-binary-counting
|
| 32 |
+
cd anim-binary-counting
|
| 33 |
+
|
| 34 |
+
# Download exported weights
|
| 35 |
+
mkdir -p checkpoints/exported
|
| 36 |
+
wget https://huggingface.co/major-scale/anim-binary-counting/resolve/main/exported/dreamer_weights.bin -O checkpoints/exported/dreamer_weights.bin
|
| 37 |
+
wget https://huggingface.co/major-scale/anim-binary-counting/resolve/main/exported/dreamer_manifest.json -O checkpoints/exported/dreamer_manifest.json
|
| 38 |
+
wget https://huggingface.co/major-scale/anim-binary-counting/resolve/main/battery.npz -O data/battery.npz
|
| 39 |
+
|
| 40 |
+
# Run analysis
|
| 41 |
+
pip install -r code/requirements.txt
|
| 42 |
+
python code/analysis/verify_dual_mode.py
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Training
|
| 46 |
+
|
| 47 |
+
Trained with [DreamerV3-torch](https://github.com/NM512/dreamerv3-torch) on a single GPU (~4 hours). See `code/training/` in the GitHub repo for configs and launcher.
|
| 48 |
+
|
| 49 |
+
## License
|
| 50 |
+
|
| 51 |
+
MIT
|