Upload README.md with huggingface_hub
Browse files6 unmodified lines789101112131415161718192021222324252627286 unmodified lines# transformer-visualized: tiny 2-layer transformers (trained, hand-crafted, controls)Weights for **[transformer-visualized](https://github.com/BurnyCoder/transformer-visualized)**, an interactive, animated visualization of a two-layertransformer (live site: https://burnycoder.github.io/transformer-visualized/). Every run of the preregistered study is here under `runs/<run_id>/`:- `final.safetensors`: final weights (TransformerLens 3.9.0 `HookedTransformer` names; biases are zero and omitted)- `checkpoints/step_*.safetensors`: ~40 log-spaced training checkpoints- `config.json`: architecture and training spec- `metrics.jsonl`: validation metrics logged during training- `eval_val.json` / `eval_test.json`: full evaluation (losses with bootstrap CIs, G, head scores, circuits, ablations)**Architecture.** 2 layers, 2 heads × 8 dims, ReLU MLP of width 64, d_model = 32, n_ctx = 24, vocabulary of 26words; no LayerNorm, zero biases (the simplifications of *A Mathematical Framework for Transformer Circuits*).**Data.** A toy word grammar (exact bigram chain) in which each later sentence repeats an earlier one withprobability 0.5. The splits are in the companion dataset repo.**Key results (test set).** Gain fraction G (share of the achievable in-context gain; 0 = bigram oracle,1 = Bayes-optimal): main 2-layer model 0.981 [0.971, 0.990] over 5 seeds; hand-crafted 0.853 [0.851, 0.855].**Load.**```python6 unmodified lines789101112131415161718192021222324252627282930313233343536376 unmodified lines# transformer-visualized: tiny 2-layer transformers (trained, hand-crafted, controls)Weights for **[transformer-visualized](https://github.com/BurnyCoder/transformer-visualized)**, an interactive, animated visualization of a two-layertransformer (live site: https://burnycoder.github.io/transformer-visualized/; paper: https://github.com/BurnyCoder/transformer-visualized/blob/main/reports/paper.pdf). Every run of the study is here under`runs/<run_id>/`: the preregistered runs, the preregistration-addendum-1 control runs (`ind_spans*`, `gram_*`), thesensitivity runs (`sens_*`) and the pilot runs (`pilot_*`).- `final.safetensors`: final weights (TransformerLens 3.9.0 `HookedTransformer` names; biases are zero and omitted)- `checkpoints/step_*.safetensors`: ~40 log-spaced training checkpoints- `config.json`: architecture and training spec- `metrics.jsonl`: validation metrics logged during training- `eval_val.json` / `eval_test.json`: full evaluation on the grammar (losses with bootstrap CIs, G, head scores, circuits,ablations); `eval_meta.json` records the device of evaluations re-run on the CPU- `eval_induction.json`: textbook-circuit measurements on held-out repeated random spans (addendum 1)**Architecture.** 2 layers, 2 heads × 8 dims, ReLU MLP of width 64, d_model = 32, n_ctx = 24, vocabulary of 26words; no LayerNorm, zero biases (the analytical simplifications of *A Mathematical Framework for TransformerCircuits*, built into the model). Other runs differ as recorded in their `config.json`.**Data.** A toy word grammar (exact bigram chain) in which each later sentence repeats an earlier one withprobability 0.5. The splits are in the companion dataset repo.**Key results (test set).** Gain fraction G (share of the achievable in-context gain; 0 = bigram oracle,1 = Bayes-optimal): main 2-layer model 0.981 [0.971, 0.990] over 5 seeds; 1-word induction oracle0.869; hand-crafted 0.853 [0.851, 0.855]. The hand-crafted model implements the textbook previous-token →induction circuit; the trained models mostly do not on the grammar (H1 falsified, H4 falsified), butthe same architecture forms it on repeated random spans in 4/5 seeds (addendum A1 supported).An independent audit is in `reports/reviews/review-3.md` of the code repository.**Load.**```python
README.md+13-4