suchirsalhan commited on
Commit
fff94ee
·
verified ·
1 Parent(s): 4197fdd

main <- step 6000

Browse files
Files changed (4) hide show
  1. README.md +31 -0
  2. config.json +187 -0
  3. model.safetensors +3 -0
  4. training_config.yaml +117 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags: [dynamic-chunking, tokenization, hnet, byte-level, beetle-hnet]
5
+ ---
6
+
7
+ # ali_ali_s0
8
+
9
+ A byte-level H-Net run from [beetle-hnet](https://github.com/suchirsalhan/beetle-hnet)
10
+ (`architecture=ali`, `objective=ratio`
11
+ `schedule=None`, `dechunk=ema`, seed 0,
12
+ 6000 steps x 32 x 1024 bytes, langs ['en', 'tr', 'fi']).
13
+
14
+ ## Layout (Beetle-style)
15
+
16
+ - **`step-N` branches**, one per kept checkpoint on a phase-aware log2 schedule (0, 1, 2, 4, 6,
17
+ 8, 16, ..., 2^k from every objective-phase start, plus the final step). Each holds
18
+ `model.safetensors`, `config.json`, `training_config.yaml` and the full resumable trainer
19
+ state `training_state/checkpoint.pt` (for inventory arms this includes the inventory).
20
+ - **`main`**: the latest step's weights and config, plus `log.jsonl`, `final.json` and the
21
+ FLORES+ boundary probes `probe/` once the run has finished.
22
+
23
+ ```python
24
+ from huggingface_hub import hf_hub_download
25
+ import torch
26
+ p = hf_hub_download("AdaptiveChunking/ali_ali_s0", "training_state/checkpoint.pt", revision="step-1024")
27
+ state = torch.load(p, map_location="cpu", weights_only=False)
28
+ ```
29
+
30
+ `model.safetensors` stores each tied tensor once; `config.json["tied_weights"]` maps the
31
+ dropped names to the stored ones.
config.json ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "ali",
3
+ "step": 6000,
4
+ "model_config": {
5
+ "vocab_size": 256,
6
+ "d_enc": 256,
7
+ "d_main": 512,
8
+ "n_enc": 2,
9
+ "n_dec": 2,
10
+ "n_main": 6,
11
+ "n_heads_enc": 4,
12
+ "n_heads_main": 8,
13
+ "seq_len": 1024,
14
+ "dropout": 0.0,
15
+ "target_ratio": 6.0,
16
+ "max_chunk_mult": 3.0,
17
+ "dechunk": "ema",
18
+ "router_noise": 0.0,
19
+ "rope_base": 10000.0
20
+ },
21
+ "ali_config": {
22
+ "enabled": true,
23
+ "budget_B": 65536,
24
+ "staging_capacity": 262144,
25
+ "policy": "utility",
26
+ "candidate_types": [
27
+ "surface",
28
+ "split",
29
+ "merge",
30
+ "skel"
31
+ ],
32
+ "gate": "vector",
33
+ "retrieval": true,
34
+ "memory_scope": "persistent",
35
+ "read_dropout": 0.1,
36
+ "write_rule": "mean",
37
+ "eta_min": 0.0,
38
+ "consolidate_every": 50,
39
+ "probe_seqs": 2,
40
+ "probe_reps": 8,
41
+ "horizon": 32,
42
+ "predictor": "mlp",
43
+ "lambda_util": 0.1,
44
+ "max_span": 64,
45
+ "byte_classes_path": "/local/scratch/sas245/beetle-hnet/scratch/data/byte_classes.json",
46
+ "gate_hidden": 0,
47
+ "type_dim": 16,
48
+ "gate_bias_init": -2.0
49
+ },
50
+ "tied_weights": {
51
+ "head.weight": "emb.weight"
52
+ },
53
+ "config": {
54
+ "model": {
55
+ "architecture": "ali",
56
+ "d_enc": 256,
57
+ "d_main": 512,
58
+ "n_enc": 2,
59
+ "n_dec": 2,
60
+ "n_main": 6,
61
+ "n_heads_enc": 4,
62
+ "n_heads_main": 8,
63
+ "seq_len": 1024,
64
+ "dropout": 0.0,
65
+ "target_ratio": 6.0,
66
+ "max_chunk_mult": 3.0,
67
+ "dechunk": "ema",
68
+ "router_noise": 0.0,
69
+ "rope_base": 10000.0
70
+ },
71
+ "memory": {
72
+ "ali": {
73
+ "budget_B": 65536,
74
+ "staging_capacity": 262144,
75
+ "policy": "utility",
76
+ "candidate_types": [
77
+ "surface",
78
+ "split",
79
+ "merge",
80
+ "skel"
81
+ ],
82
+ "write_rule": "mean",
83
+ "eta_min": 0.0,
84
+ "memory_scope": "persistent",
85
+ "consolidate_every": 50,
86
+ "max_span": 64,
87
+ "gate": "vector",
88
+ "retrieval": true,
89
+ "read_dropout": 0.1,
90
+ "gate_hidden": 0,
91
+ "type_dim": 16,
92
+ "gate_bias_init": -2.0,
93
+ "probe_seqs": 2,
94
+ "probe_reps": 8,
95
+ "horizon": 32,
96
+ "predictor": "mlp",
97
+ "lambda_util": 0.1,
98
+ "enabled": true,
99
+ "inventory_kwargs": {},
100
+ "probe_mix": null,
101
+ "util_batch_slots": 1024
102
+ },
103
+ "pkm": {
104
+ "n_keys": 256,
105
+ "topk": 8,
106
+ "heads": 1,
107
+ "d_key": null,
108
+ "value_lr_mult": 1.0
109
+ }
110
+ },
111
+ "objective": {
112
+ "name": "ratio",
113
+ "schedule": null,
114
+ "alpha": 0.03,
115
+ "alpha_parity_cap": 0.06,
116
+ "global_anchor": 0.0,
117
+ "premium_clip": 4.0,
118
+ "premium_kind": "flores_per_sent",
119
+ "tau1": 0.4,
120
+ "tau2": 0.7,
121
+ "freeze_scope": "router",
122
+ "cpc_decay": 0.9,
123
+ "genreg_target_entropy": null,
124
+ "genreg_eta": 0.05
125
+ },
126
+ "data": {
127
+ "corpus": "corpus",
128
+ "langs": [
129
+ "en",
130
+ "tr",
131
+ "fi"
132
+ ],
133
+ "mixture": null,
134
+ "doc_filters": null,
135
+ "byte_classes": "scratch/data/byte_classes.json"
136
+ },
137
+ "training": {
138
+ "seed": 0,
139
+ "max_steps": 6000,
140
+ "batch_size": 32,
141
+ "grad_accum": 1,
142
+ "lr": 0.0003,
143
+ "min_lr_frac": 0.1,
144
+ "warmup": 300,
145
+ "weight_decay": 0.1,
146
+ "grad_clip": 1.0,
147
+ "betas": [
148
+ 0.9,
149
+ 0.95
150
+ ],
151
+ "router_lr_mult": 1.0,
152
+ "log_every": 50,
153
+ "amp": "bf16",
154
+ "compile": false,
155
+ "device": "cuda"
156
+ },
157
+ "checkpointing": {
158
+ "run_name": "ali_ali_s0",
159
+ "runs_dir": "runs",
160
+ "ckpt_every": 200,
161
+ "keep": false,
162
+ "milestones": [
163
+ 1000,
164
+ 3000
165
+ ],
166
+ "resume": "auto"
167
+ },
168
+ "evaluation": {
169
+ "eval_every": 200,
170
+ "eval_batches": 8,
171
+ "probe_sents": 128,
172
+ "probe_bpb_batches": 4,
173
+ "log_spaced_probe": true,
174
+ "dense_early_every": 0,
175
+ "dense_early_until": 0,
176
+ "dump_reps": true,
177
+ "dump_reps_thresholds": [
178
+ 0.3,
179
+ 0.4,
180
+ 0.5,
181
+ 0.6,
182
+ 0.7
183
+ ]
184
+ }
185
+ },
186
+ "format": "beetle-hnet step branch v1 (src/checkpointing/hub.py)"
187
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8e1b5c038341e12cd92798fb4f9efcc3f6c3e2eddeba1f739af0110c9f1b2d0
3
+ size 91151512
training_config.yaml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ architecture: ali
3
+ d_enc: 256
4
+ d_main: 512
5
+ n_enc: 2
6
+ n_dec: 2
7
+ n_main: 6
8
+ n_heads_enc: 4
9
+ n_heads_main: 8
10
+ seq_len: 1024
11
+ dropout: 0.0
12
+ target_ratio: 6.0
13
+ max_chunk_mult: 3.0
14
+ dechunk: ema
15
+ router_noise: 0.0
16
+ rope_base: 10000.0
17
+ memory:
18
+ ali:
19
+ budget_B: 65536
20
+ staging_capacity: 262144
21
+ policy: utility
22
+ candidate_types:
23
+ - surface
24
+ - split
25
+ - merge
26
+ - skel
27
+ write_rule: mean
28
+ eta_min: 0.0
29
+ memory_scope: persistent
30
+ consolidate_every: 50
31
+ max_span: 64
32
+ gate: vector
33
+ retrieval: true
34
+ read_dropout: 0.1
35
+ gate_hidden: 0
36
+ type_dim: 16
37
+ gate_bias_init: -2.0
38
+ probe_seqs: 2
39
+ probe_reps: 8
40
+ horizon: 32
41
+ predictor: mlp
42
+ lambda_util: 0.1
43
+ enabled: true
44
+ inventory_kwargs: {}
45
+ probe_mix: null
46
+ util_batch_slots: 1024
47
+ pkm:
48
+ n_keys: 256
49
+ topk: 8
50
+ heads: 1
51
+ d_key: null
52
+ value_lr_mult: 1.0
53
+ objective:
54
+ name: ratio
55
+ schedule: null
56
+ alpha: 0.03
57
+ alpha_parity_cap: 0.06
58
+ global_anchor: 0.0
59
+ premium_clip: 4.0
60
+ premium_kind: flores_per_sent
61
+ tau1: 0.4
62
+ tau2: 0.7
63
+ freeze_scope: router
64
+ cpc_decay: 0.9
65
+ genreg_target_entropy: null
66
+ genreg_eta: 0.05
67
+ data:
68
+ corpus: corpus
69
+ langs:
70
+ - en
71
+ - tr
72
+ - fi
73
+ mixture: null
74
+ doc_filters: null
75
+ byte_classes: scratch/data/byte_classes.json
76
+ training:
77
+ seed: 0
78
+ max_steps: 6000
79
+ batch_size: 32
80
+ grad_accum: 1
81
+ lr: 0.0003
82
+ min_lr_frac: 0.1
83
+ warmup: 300
84
+ weight_decay: 0.1
85
+ grad_clip: 1.0
86
+ betas:
87
+ - 0.9
88
+ - 0.95
89
+ router_lr_mult: 1.0
90
+ log_every: 50
91
+ amp: bf16
92
+ compile: false
93
+ device: cuda
94
+ checkpointing:
95
+ run_name: ali_ali_s0
96
+ runs_dir: runs
97
+ ckpt_every: 200
98
+ keep: false
99
+ milestones:
100
+ - 1000
101
+ - 3000
102
+ resume: auto
103
+ evaluation:
104
+ eval_every: 200
105
+ eval_batches: 8
106
+ probe_sents: 128
107
+ probe_bpb_batches: 4
108
+ log_spaced_probe: true
109
+ dense_early_every: 0
110
+ dense_early_until: 0
111
+ dump_reps: true
112
+ dump_reps_thresholds:
113
+ - 0.3
114
+ - 0.4
115
+ - 0.5
116
+ - 0.6
117
+ - 0.7