| --- |
| license: mit |
| tags: |
| - mechanistic-interpretability |
| - grokking |
| - transformers |
| --- |
| |
| # Manifold Features — data |
|
|
| State dicts and supporting checkpoints for the [*Manifold Features*](https://nick-yudin.github.io/manifold_features/) interactive longform series by [Nikolay Yudin](https://twitter.com/Nikolay_Yudin_). |
|
|
| The source code and notebooks live at [github.com/nick-yudin/manifold_features](https://github.com/nick-yudin/manifold_features). |
|
|
| ## Contents |
|
|
| ### `four-algorithms/` — Part 2 checkpoints |
|
|
| A 2-block transformer with residual dimension 384 trained on four modular-arithmetic tasks simultaneously (`division`, `addition`, `max`, `parity` at `P = 149`) with WD = 0.3 across 5 random seeds. |
|
|
| - `seed_1000_final.pt` ... `seed_1004_final.pt` (~19 MB each) — final checkpoints after grokking; include the model state dict, the metrics log, the per-task grok steps, and the snapshot step list. |
| - `handcraft_max.pt` (~18 MB) — a 2-block transformer that solves `c = max(a, b) mod 97` with weights placed entirely by formula (no training). Hits 100% accuracy on all 9409 input pairs. |
|
|
| ## Loading |
|
|
| ```python |
| from huggingface_hub import hf_hub_download |
| import torch |
| |
| path = hf_hub_download( |
| repo_id="NikolayYudin/manifold-features-data", |
| filename="four-algorithms/seed_1000_final.pt", |
| repo_type="dataset", |
| ) |
| ckpt = torch.load(path, map_location="cpu", weights_only=False) |
| print(ckpt["final_accs"]) # {'div': 0.9995, 'add': 0.9854, 'max': 0.9915, 'parity': 0.9995} |
| ``` |
|
|
| Architecture matches `GrokModelShared` from the notebooks. Open |
| [`four-algorithms/notebooks/walk_and_dictation.ipynb`](https://github.com/nick-yudin/manifold_features/blob/main/four-algorithms/notebooks/walk_and_dictation.ipynb) for the full loading + analysis flow. |
|
|