Cukinator commited on
Commit
d63509f
Β·
verified Β·
1 Parent(s): 19f9b7a

Update README: document all runs including _v3 folders and full file inventory

Browse files
Files changed (1) hide show
  1. README.md +69 -39
README.md CHANGED
@@ -10,47 +10,92 @@ tags:
10
  - ablation
11
  ---
12
 
13
- # CPU-1 Ablation Study β€” Source Checkpoints (compact 2-bit)
14
 
15
  **Repo:** `Cukinator/cpu1-ablation-checkpoints` | **Unpacked mirror:** [`Cukinator/cpu1-ablations-final`](https://huggingface.co/Cukinator/cpu1-ablations-final) | **Code:** [`github.com/Cukinator/1.58bits`](https://github.com/Cukinator/1.58bits)
16
 
17
- This repository stores the raw training checkpoints produced by `train_ablation_amd.py` from the 1.58bits repo. There are two checkpoint flavours, both saved per run inside its own folder:
 
 
 
 
 
 
 
18
 
19
  | Filename pattern | Format | Purpose |
20
  |---|---|---|
21
- | `<run>/checkpoint_<run>_final.pt` | `compact_2bit` (2-bit packed ternary + bf16 scales) | Final inference checkpoint β€” minimal size, ~9 MB for a 39M ternary model |
22
- | `<run>/checkpoint_<run>_step<N>.pt` | bf16 model + bf16 optimizer state | Phase 1 intermediate resume points |
23
- | `<run>/checkpoint_<run>_phase2_step<N>.pt` | bf16 model + bf16 optimizer state | Phase 2 intermediate resume points (delete-gate runs only) |
24
 
25
- > **If you just want ready-to-use float32 weights**, use the unpacked mirror at [`Cukinator/cpu1-ablations-final`](https://huggingface.co/Cukinator/cpu1-ablations-final) β€” those are plain `.pt` files you can load with `model.load_state_dict(...)` without any unpacking step.
26
-
27
- This source repo exists so that (a) training jobs can resume from the latest step checkpoint after preemption, and (b) the `compact_2bit` format itself can be inspected and benchmarked.
28
 
29
  ## Repository contents
30
 
31
- 22 trained runs, organised in three rounds:
32
-
33
- | Round | Tokens/param | Runs |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  |---|---|---|
35
- | **r1** β€” original ablation budget | 2 | `run_01`, `run_02`, `run_02a_byte_only_heads`, `run_03`, `run_04`, `run_05`, `run_05b_kernel_strict`, `run_06`, `run_07`, `run_08`, `run_09`, `run_10`, `run_13`, `run_14`, `run_15`, `run_16` |
36
  | **r2** β€” re-run at higher budget | 15 | `run_04_r2`, `run_07_r2` (partial), `run_13_r2`, `run_14_r2`, `run_15_r2`, `run_16_r2` |
37
- | **r3** β€” cold-start rescue (queued) | 50 | `run_04_r3`, `run_07_r3`, `run_14_r3`, `run_15_r3` (not yet uploaded) |
38
-
39
- The naming and architecture of each run is defined in `RUN_CONFIGS` / `SMALL_RUN_CONFIGS` in `train_ablation_amd.py`.
40
 
41
  ## Quick start (compact_2bit)
42
 
43
- Loading a `compact_2bit` checkpoint requires the unpacking helper that ships with the training code:
44
-
45
  ```python
46
  import sys
47
  sys.path.insert(0, "/path/to/1.58bits")
48
  from train_ablation_amd import load_ablation_checkpoint, build_ablation_model, generate
49
  import torch
50
 
51
- state, config = load_ablation_checkpoint(
52
- "run_02/checkpoint_run_02_final.pt"
53
- )
54
  model = build_ablation_model(config)
55
  model.load_state_dict(state, strict=False)
56
  model.eval()
@@ -58,29 +103,14 @@ model.eval()
58
  print(generate(model, "Once upon a time", 128, config, torch.device("cpu")))
59
  ```
60
 
61
- For the same checkpoint without an external dependency, use the `cpu1-ablations-final` repo.
62
-
63
- ## Final-checkpoint sizes (compact_2bit)
64
-
65
- Sizes are measured from the actual `_final.pt` files on disk.
66
-
67
- | Run family | Architecture | d_model | Final size |
68
- |---|---|---|---|
69
- | `run_01` | Transformer + BPE (16K vocab) + FP16 | 512 | ~210 MB |
70
- | `run_02`, `run_02a`, `run_03` | FP16 byte-level baselines | 512 | ~75 MB |
71
- | `run_04`..`run_10` | 39M ternary chain | 512 | ~9 MB |
72
- | `run_05b_kernel_strict` | MLGRU without W_o | 512 | ~8 MB |
73
- | `run_13` | 10M BPE + ternary (4K vocab) | 320 | ~5 MB |
74
- | `run_14`, `run_15`, `run_16` | 10M byte + ternary variants | 320 | ~3 MB |
75
 
76
  ## Training results & 2026-05 Audit
77
 
78
- The full table of `val_loss`, `perplexity`, throughput and architecture per run is published in the README of the main repository. A summary of the 2026-05 audit findings:
79
-
80
  1. **FP16 baselines** (`run_01`, `run_02`, `run_02a`, `run_03`) converge as designed: byte + LocalByteDecoder reaches `val_loss` 1.71, MLGRU FP16 reaches 1.86.
81
- 2. **All byte-level ternary runs collapse** to `ln(256) β‰ˆ 5.545` nats β€” the uniform-output entropy floor. This holds across both scales (10M and 39M) and both token budgets (2 tok/p and 15 tok/p).
82
- 3. A **7.5Γ— increase in tokens-per-parameter (r2)** moved the validation loss by only ~0.0001 nats. The cold-start dynamics of straight-through-estimator ternary training, not the budget, are the bottleneck at this scale.
83
- 4. Details, mechanistic analysis and throughput projections are documented in the main repository README.
84
 
85
  ## License
86
  Apache-2.0. Same as the source code at [github.com/Cukinator/1.58bits](https://github.com/Cukinator/1.58bits).
 
10
  - ablation
11
  ---
12
 
13
+ # CPU-1 Ablation Study β€” Checkpoints
14
 
15
  **Repo:** `Cukinator/cpu1-ablation-checkpoints` | **Unpacked mirror:** [`Cukinator/cpu1-ablations-final`](https://huggingface.co/Cukinator/cpu1-ablations-final) | **Code:** [`github.com/Cukinator/1.58bits`](https://github.com/Cukinator/1.58bits)
16
 
17
+ This repository consolidates **all** training checkpoints from the CPU-1 ablation study:
18
+
19
+ - **`run_XX_v3/` folders** β€” the original high-resolution checkpoints from the v3 training run (step-by-step checkpoints, one commit per step).
20
+ - **`run_XX/` folders** β€” compact checkpoints from the full ablation sweep (final + key intermediate steps).
21
+
22
+ **Total: 1348 files across 34 folders.**
23
+
24
+ ## File format
25
 
26
  | Filename pattern | Format | Purpose |
27
  |---|---|---|
28
+ | `<run>/checkpoint_<run>_final.pt` | `compact_2bit` (2-bit packed ternary + bf16 scales) | Final inference checkpoint β€” minimal size |
29
+ | `<run>/checkpoint_<run>_step<N>.pt` | bf16 model + bf16 optimizer state | Intermediate resume point |
30
+ | `<run>/checkpoint_<run>_phase2_step<N>.pt` | bf16 model + bf16 optimizer state | Phase 2 resume point (delete-gate runs) |
31
 
32
+ > **If you just want ready-to-use float32 weights**, use the unpacked mirror at [`Cukinator/cpu1-ablations-final`](https://huggingface.co/Cukinator/cpu1-ablations-final).
 
 
33
 
34
  ## Repository contents
35
 
36
+ ### Original v3 step checkpoints (`_v3` folders)
37
+ 12 folders with dense step-by-step checkpoints from the v3 training:
38
+
39
+ | Folder | Files |
40
+ |---|---|
41
+ | `run_01_v3/` | 72 |
42
+ | `run_02_v3/` | 73 |
43
+ | `run_02a_byte_only_heads_v3/` | 75 |
44
+ | `run_03_v3/` | 71 |
45
+ | `run_04_v3/` | 71 |
46
+ | `run_05_v3/` | 71 |
47
+ | `run_05b_kernel_strict_v3/` | 71 |
48
+ | `run_06_v3/` | 71 |
49
+ | `run_08_v3/` | 71 |
50
+ | `run_13_v3/` | 72 |
51
+ | `run_14_v3/` | 75 |
52
+ | `run_15_v3/` | 70 |
53
+
54
+ ### Full ablation sweep (`run_XX/` folders)
55
+ 22 folders covering all ablation runs (r1, r2):
56
+
57
+ | Folder | Files | Notes |
58
+ |---|---|---|
59
+ | `run_01/` | 22 | Transformer + BPE 16K vocab + FP16, 512 d_model ~210 MB final |
60
+ | `run_02/` | 22 | FP16 byte-level baseline, 512 d_model ~75 MB final |
61
+ | `run_02a_byte_only_heads/` | 22 | FP16 byte-only heads variant ~75 MB final |
62
+ | `run_03/` | 22 | FP16 byte-level baseline, 512 d_model ~75 MB final |
63
+ | `run_04/` | 22 | 39M ternary chain, 512 d_model ~9 MB final |
64
+ | `run_04_r2/` | 22 | 39M ternary, higher token budget (r2) |
65
+ | `run_05/` | 22 | 39M ternary ~9 MB final |
66
+ | `run_05b_kernel_strict/` | 22 | MLGRU without W_o ~8 MB final |
67
+ | `run_06/` | 22 | 39M ternary ~9 MB final |
68
+ | `run_07/` | 22 | 39M ternary ~9 MB final |
69
+ | `run_07_r2/` | 21 | 39M ternary higher budget (r2, partial) |
70
+ | `run_08/` | 22 | 39M ternary ~9 MB final |
71
+ | `run_09/` | 22 | 39M ternary ~9 MB final |
72
+ | `run_10/` | 22 | 39M ternary ~9 MB final |
73
+ | `run_13/` | 22 | 10M BPE + ternary 4K vocab, 320 d_model ~5 MB final |
74
+ | `run_13_r2/` | 22 | 10M BPE + ternary higher budget (r2) |
75
+ | `run_14/` | 22 | 10M byte + ternary, 320 d_model ~3 MB final |
76
+ | `run_14_r2/` | 22 | 10M byte + ternary higher budget (r2) |
77
+ | `run_15/` | 22 | 10M byte + ternary variant ~3 MB final |
78
+ | `run_15_r2/` | 22 | 10M byte + ternary higher budget (r2) |
79
+ | `run_16/` | 22 | 10M byte + ternary variant ~3 MB final |
80
+ | `run_16_r2/` | 22 | 10M byte + ternary higher budget (r2) |
81
+
82
+ ## Training rounds summary
83
+
84
+ | Round | Tokens/param | Runs included |
85
  |---|---|---|
86
+ | **r1** β€” original ablation budget | 2 | `run_01`–`run_10`, `run_13`–`run_16` |
87
  | **r2** β€” re-run at higher budget | 15 | `run_04_r2`, `run_07_r2` (partial), `run_13_r2`, `run_14_r2`, `run_15_r2`, `run_16_r2` |
88
+ | **v3** β€” step-by-step checkpoints | β€” | All `_v3` folders |
 
 
89
 
90
  ## Quick start (compact_2bit)
91
 
 
 
92
  ```python
93
  import sys
94
  sys.path.insert(0, "/path/to/1.58bits")
95
  from train_ablation_amd import load_ablation_checkpoint, build_ablation_model, generate
96
  import torch
97
 
98
+ state, config = load_ablation_checkpoint("run_14/checkpoint_run_14_final.pt")
 
 
99
  model = build_ablation_model(config)
100
  model.load_state_dict(state, strict=False)
101
  model.eval()
 
103
  print(generate(model, "Once upon a time", 128, config, torch.device("cpu")))
104
  ```
105
 
106
+ For the same checkpoint without an external dependency, use the [`cpu1-ablations-final`](https://huggingface.co/Cukinator/cpu1-ablations-final) repo.
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  ## Training results & 2026-05 Audit
109
 
 
 
110
  1. **FP16 baselines** (`run_01`, `run_02`, `run_02a`, `run_03`) converge as designed: byte + LocalByteDecoder reaches `val_loss` 1.71, MLGRU FP16 reaches 1.86.
111
+ 2. **All byte-level ternary runs collapse** to `ln(256) β‰ˆ 5.545` nats β€” the uniform-output entropy floor across both scales (10M and 39M) and both token budgets.
112
+ 3. A **7.5Γ— increase in tokens-per-parameter (r2)** moved validation loss by only ~0.0001 nats. The cold-start dynamics of straight-through-estimator ternary training, not the budget, are the bottleneck at this scale.
113
+ 4. Full details in the [main repository README](https://github.com/Cukinator/1.58bits).
114
 
115
  ## License
116
  Apache-2.0. Same as the source code at [github.com/Cukinator/1.58bits](https://github.com/Cukinator/1.58bits).