suchirsalhan commited on
Commit
023c19c
·
verified ·
1 Parent(s): ecf70e5

main <- step 6000

Browse files
Files changed (4) hide show
  1. README.md +31 -0
  2. config.json +155 -0
  3. model.safetensors +3 -0
  4. training_config.yaml +114 -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
+ # parity_B_ste_s1
8
+
9
+ A byte-level H-Net run from [beetle-hnet](https://github.com/suchirsalhan/beetle-hnet)
10
+ (`architecture=hnet`, `objective=parity`
11
+ `schedule=B`, `dechunk=ste`, seed 1,
12
+ 6000 steps x 32 x 1024 bytes, langs None).
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/parity_B_ste_s1", "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,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "arch": "hnet",
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": "ste",
18
+ "router_noise": 0.0,
19
+ "rope_base": 10000.0
20
+ },
21
+ "ali_config": null,
22
+ "tied_weights": {
23
+ "head.weight": "emb.weight"
24
+ },
25
+ "config": {
26
+ "model": {
27
+ "architecture": "hnet",
28
+ "d_enc": 256,
29
+ "d_main": 512,
30
+ "n_enc": 2,
31
+ "n_dec": 2,
32
+ "n_main": 6,
33
+ "n_heads_enc": 4,
34
+ "n_heads_main": 8,
35
+ "seq_len": 1024,
36
+ "dropout": 0.0,
37
+ "target_ratio": 6.0,
38
+ "max_chunk_mult": 3.0,
39
+ "dechunk": "ste",
40
+ "router_noise": 0.0,
41
+ "rope_base": 10000.0
42
+ },
43
+ "memory": {
44
+ "ali": {
45
+ "budget_B": 65536,
46
+ "staging_capacity": 262144,
47
+ "policy": "utility",
48
+ "candidate_types": [
49
+ "surface",
50
+ "split",
51
+ "merge",
52
+ "skel"
53
+ ],
54
+ "write_rule": "mean",
55
+ "eta_min": 0.0,
56
+ "memory_scope": "persistent",
57
+ "consolidate_every": 50,
58
+ "max_span": 64,
59
+ "gate": "vector",
60
+ "retrieval": true,
61
+ "read_dropout": 0.1,
62
+ "gate_hidden": 0,
63
+ "type_dim": 16,
64
+ "gate_bias_init": -2.0,
65
+ "probe_seqs": 2,
66
+ "probe_reps": 8,
67
+ "horizon": 32,
68
+ "predictor": "mlp",
69
+ "lambda_util": 0.1,
70
+ "enabled": true,
71
+ "inventory_kwargs": {},
72
+ "probe_mix": null,
73
+ "util_batch_slots": 1024
74
+ },
75
+ "pkm": {
76
+ "n_keys": 256,
77
+ "topk": 8,
78
+ "heads": 1,
79
+ "d_key": null,
80
+ "value_lr_mult": 1.0
81
+ }
82
+ },
83
+ "objective": {
84
+ "name": "parity",
85
+ "schedule": "B",
86
+ "alpha": 0.03,
87
+ "alpha_parity_cap": 0.06,
88
+ "global_anchor": 0.0,
89
+ "premium_clip": 4.0,
90
+ "premium_kind": "flores_per_sent",
91
+ "tau1": 0.4,
92
+ "tau2": 0.7,
93
+ "freeze_scope": "router",
94
+ "cpc_decay": 0.9,
95
+ "genreg_target_entropy": null,
96
+ "genreg_eta": 0.05
97
+ },
98
+ "data": {
99
+ "corpus": "corpus",
100
+ "langs": null,
101
+ "mixture": null,
102
+ "doc_filters": null,
103
+ "byte_classes": "scratch/data/byte_classes.json"
104
+ },
105
+ "training": {
106
+ "seed": 1,
107
+ "max_steps": 6000,
108
+ "batch_size": 32,
109
+ "grad_accum": 1,
110
+ "lr": 0.0003,
111
+ "min_lr_frac": 0.1,
112
+ "warmup": 300,
113
+ "weight_decay": 0.1,
114
+ "grad_clip": 1.0,
115
+ "betas": [
116
+ 0.9,
117
+ 0.95
118
+ ],
119
+ "router_lr_mult": 1.0,
120
+ "log_every": 50,
121
+ "amp": "bf16",
122
+ "compile": false,
123
+ "device": "cuda"
124
+ },
125
+ "checkpointing": {
126
+ "run_name": "parity_B_ste_s1",
127
+ "runs_dir": "runs",
128
+ "ckpt_every": 200,
129
+ "keep": false,
130
+ "milestones": [
131
+ 1000,
132
+ 3000
133
+ ],
134
+ "resume": "auto"
135
+ },
136
+ "evaluation": {
137
+ "eval_every": 200,
138
+ "eval_batches": 8,
139
+ "probe_sents": 128,
140
+ "probe_bpb_batches": 4,
141
+ "log_spaced_probe": true,
142
+ "dense_early_every": 0,
143
+ "dense_early_until": 0,
144
+ "dump_reps": true,
145
+ "dump_reps_thresholds": [
146
+ 0.3,
147
+ 0.4,
148
+ 0.5,
149
+ 0.6,
150
+ 0.7
151
+ ]
152
+ }
153
+ },
154
+ "format": "beetle-hnet step branch v1 (src/checkpointing/hub.py)"
155
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78853c8cb5955d704bd2d34f382d0be536413bcfabbab0edd22a03829317b002
3
+ size 90078272
training_config.yaml ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ architecture: hnet
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: ste
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: parity
55
+ schedule: B
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: null
70
+ mixture: null
71
+ doc_filters: null
72
+ byte_classes: scratch/data/byte_classes.json
73
+ training:
74
+ seed: 1
75
+ max_steps: 6000
76
+ batch_size: 32
77
+ grad_accum: 1
78
+ lr: 0.0003
79
+ min_lr_frac: 0.1
80
+ warmup: 300
81
+ weight_decay: 0.1
82
+ grad_clip: 1.0
83
+ betas:
84
+ - 0.9
85
+ - 0.95
86
+ router_lr_mult: 1.0
87
+ log_every: 50
88
+ amp: bf16
89
+ compile: false
90
+ device: cuda
91
+ checkpointing:
92
+ run_name: parity_B_ste_s1
93
+ runs_dir: runs
94
+ ckpt_every: 200
95
+ keep: false
96
+ milestones:
97
+ - 1000
98
+ - 3000
99
+ resume: auto
100
+ evaluation:
101
+ eval_every: 200
102
+ eval_batches: 8
103
+ probe_sents: 128
104
+ probe_bpb_batches: 4
105
+ log_spaced_probe: true
106
+ dense_early_every: 0
107
+ dense_early_until: 0
108
+ dump_reps: true
109
+ dump_reps_thresholds:
110
+ - 0.3
111
+ - 0.4
112
+ - 0.5
113
+ - 0.6
114
+ - 0.7