Add sb-run2
Browse files- sb-run2/README.md +28 -0
- sb-run2/config.json +140 -0
- sb-run2/model.pt +3 -0
- sb-run2/params.json +13 -0
sb-run2/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SB (run 2)
|
| 2 |
+
|
| 3 |
+
Part of the [Self-Drafting Latent Memory](../README.md) collection.
|
| 4 |
+
|
| 5 |
+
Second training run of the SB recipe: same initialisation seed, data and data order. It's the replicate used as the noise floor in the paper. Its codes agree with run 1 on only 37% of positions at equal loss.
|
| 6 |
+
|
| 7 |
+
- **Architecture:** 24-layer Llama-style decoder, d = 1024, 24 query / 4 KV heads, SwiGLU, RoPE, tied embeddings, vocabulary 32,768, context 2048. Training config: `w3_sb_1b` in the repository.
|
| 8 |
+
- **Validation loss:** 2.7107 (1B tokens).
|
| 9 |
+
- **Zero-shot (lm-eval 0.4.13):**
|
| 10 |
+
|
| 11 |
+
| HellaSwag | MMLU-cloze | SciQ | WinoGrande | PIQA | ARC-Easy |
|
| 12 |
+
|---|---|---|---|---|---|
|
| 13 |
+
| 29.3 | 24.6 | 60.4 | 51.8 | 60.0 | 38.0 |
|
| 14 |
+
|
| 15 |
+
## Files
|
| 16 |
+
|
| 17 |
+
- `model.pt`: `{"model": state_dict, "config": ..., "step": ..., "params": ...}`, weights only (no optimizer state).
|
| 18 |
+
- `config.json`: the resolved training/model config.
|
| 19 |
+
- `params.json`: parameter counts by component.
|
| 20 |
+
|
| 21 |
+
## Load
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
from ffnmem.infer import load_model # code from the accompanying repository
|
| 25 |
+
model, cfg = load_model("sb-run2/model.pt", device="cuda")
|
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ads": 24,
|
| 6 |
+
"n_kv_heads": 4,
|
| 7 |
+
"head_dim": 64,
|
| 8 |
+
"vocab": 32768,
|
| 9 |
+
"seq_len": 2048,
|
| 10 |
+
"d_ff": [
|
| 11 |
+
2816,
|
| 12 |
+
2816,
|
| 13 |
+
1536,
|
| 14 |
+
1536,
|
| 15 |
+
1536,
|
| 16 |
+
1536,
|
| 17 |
+
2816,
|
| 18 |
+
2816,
|
| 19 |
+
2816,
|
| 20 |
+
2816,
|
| 21 |
+
2816,
|
| 22 |
+
2816,
|
| 23 |
+
1536,
|
| 24 |
+
1536,
|
| 25 |
+
1536,
|
| 26 |
+
1536,
|
| 27 |
+
2816,
|
| 28 |
+
2816,
|
| 29 |
+
2816,
|
| 30 |
+
2816,
|
| 31 |
+
2816,
|
| 32 |
+
2816,
|
| 33 |
+
2816,
|
| 34 |
+
2816
|
| 35 |
+
],
|
| 36 |
+
"memory_layers": [
|
| 37 |
+
1
|
| 38 |
+
],
|
| 39 |
+
"memory": {
|
| 40 |
+
"routes": 184,
|
| 41 |
+
"mem_dim": 128,
|
| 42 |
+
"kv_heads": 4,
|
| 43 |
+
"q_heads": 16,
|
| 44 |
+
"head_dim": 64,
|
| 45 |
+
"execution_mode": "full"
|
| 46 |
+
},
|
| 47 |
+
"norm_eps": 1e-05,
|
| 48 |
+
"rope_theta": 10000.0,
|
| 49 |
+
"init_std": 0.02,
|
| 50 |
+
"ffn_cut_layers": [
|
| 51 |
+
2,
|
| 52 |
+
3,
|
| 53 |
+
4,
|
| 54 |
+
5,
|
| 55 |
+
12,
|
| 56 |
+
13,
|
| 57 |
+
14,
|
| 58 |
+
15
|
| 59 |
+
],
|
| 60 |
+
"ffn_cut_delta": 1280,
|
| 61 |
+
"layers": [
|
| 62 |
+
0,
|
| 63 |
+
1,
|
| 64 |
+
2,
|
| 65 |
+
3,
|
| 66 |
+
4,
|
| 67 |
+
5,
|
| 68 |
+
6,
|
| 69 |
+
7,
|
| 70 |
+
8,
|
| 71 |
+
9,
|
| 72 |
+
10,
|
| 73 |
+
11,
|
| 74 |
+
12,
|
| 75 |
+
13,
|
| 76 |
+
14,
|
| 77 |
+
15,
|
| 78 |
+
16,
|
| 79 |
+
17,
|
| 80 |
+
18,
|
| 81 |
+
19,
|
| 82 |
+
20,
|
| 83 |
+
21,
|
| 84 |
+
22,
|
| 85 |
+
23
|
| 86 |
+
],
|
| 87 |
+
"memory_overrides": {},
|
| 88 |
+
"draft": null,
|
| 89 |
+
"ssm": null
|
| 90 |
+
},
|
| 91 |
+
"train": {
|
| 92 |
+
"seed": 1234,
|
| 93 |
+
"data_seed": 1234,
|
| 94 |
+
"val_tokens": 20000000,
|
| 95 |
+
"global_batch": 256,
|
| 96 |
+
"micro_batch": 4,
|
| 97 |
+
"tokens_total": 999817216,
|
| 98 |
+
"lr": 0.0006,
|
| 99 |
+
"min_lr_ratio": 0.1,
|
| 100 |
+
"warmup_frac": 0.02,
|
| 101 |
+
"warmup_min_steps": 100,
|
| 102 |
+
"betas": [
|
| 103 |
+
0.9,
|
| 104 |
+
0.95
|
| 105 |
+
],
|
| 106 |
+
"eps": 1e-08,
|
| 107 |
+
"weight_decay": 0.1,
|
| 108 |
+
"grad_clip": 1.0,
|
| 109 |
+
"table_lr_mult": 4.0,
|
| 110 |
+
"precision": "fp16",
|
| 111 |
+
"act_ckpt": true,
|
| 112 |
+
"attn_backend": "sdpa",
|
| 113 |
+
"zero1": false,
|
| 114 |
+
"ckpt_every": 200,
|
| 115 |
+
"keep_last": 3,
|
| 116 |
+
"keep_every": 1000,
|
| 117 |
+
"eval_every": 200,
|
| 118 |
+
"eval_max_batches": null,
|
| 119 |
+
"diag_batches": 4,
|
| 120 |
+
"log_every": 10,
|
| 121 |
+
"scaler_min": 1.0,
|
| 122 |
+
"scaler_patience": 100,
|
| 123 |
+
"nan_patience": 20,
|
| 124 |
+
"save_steps": [
|
| 125 |
+
500,
|
| 126 |
+
1000,
|
| 127 |
+
1907
|
| 128 |
+
],
|
| 129 |
+
"strip_old_optimizer": true,
|
| 130 |
+
"seq_len": 2048
|
| 131 |
+
},
|
| 132 |
+
"name": "w3_sb_1b",
|
| 133 |
+
"params": {
|
| 134 |
+
"reference": true,
|
| 135 |
+
"expected_non_embedding": 369777920
|
| 136 |
+
},
|
| 137 |
+
"wandb": {
|
| 138 |
+
"project": "morbius-wave3"
|
| 139 |
+
}
|
| 140 |
+
}
|
sb-run2/model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:264adb3e641c520f48f3b6410fc80e4e1a7a54f501f305b8da476499e6f65208
|
| 3 |
+
size 1613398819
|
sb-run2/params.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"embedding": 33554432,
|
| 3 |
+
"attention": 88080384,
|
| 4 |
+
"ffn": 176160768,
|
| 5 |
+
"norms": 50176,
|
| 6 |
+
"memory_tables": 102498304,
|
| 7 |
+
"memory_readout": 2988288,
|
| 8 |
+
"draft": 0,
|
| 9 |
+
"ssm": 0,
|
| 10 |
+
"total": 403332352,
|
| 11 |
+
"non_embedding": 369777920,
|
| 12 |
+
"active_non_embedding_per_token": 267326720
|
| 13 |
+
}
|