suchirsalhan commited on
Commit
992d422
·
verified ·
1 Parent(s): 57981ec

main <- step 6000

Browse files
Files changed (4) hide show
  1. README.md +31 -0
  2. config.json +159 -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_hnet_s0
8
+
9
+ A byte-level H-Net run from [beetle-hnet](https://github.com/suchirsalhan/beetle-hnet)
10
+ (`architecture=hnet`, `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_hnet_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,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "ema",
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": "ema",
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": "ratio",
85
+ "schedule": null,
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": [
101
+ "en",
102
+ "tr",
103
+ "fi"
104
+ ],
105
+ "mixture": null,
106
+ "doc_filters": null,
107
+ "byte_classes": "scratch/data/byte_classes.json"
108
+ },
109
+ "training": {
110
+ "seed": 0,
111
+ "max_steps": 6000,
112
+ "batch_size": 32,
113
+ "grad_accum": 1,
114
+ "lr": 0.0003,
115
+ "min_lr_frac": 0.1,
116
+ "warmup": 300,
117
+ "weight_decay": 0.1,
118
+ "grad_clip": 1.0,
119
+ "betas": [
120
+ 0.9,
121
+ 0.95
122
+ ],
123
+ "router_lr_mult": 1.0,
124
+ "log_every": 50,
125
+ "amp": "bf16",
126
+ "compile": false,
127
+ "device": "cuda"
128
+ },
129
+ "checkpointing": {
130
+ "run_name": "ali_hnet_s0",
131
+ "runs_dir": "runs",
132
+ "ckpt_every": 200,
133
+ "keep": false,
134
+ "milestones": [
135
+ 1000,
136
+ 3000
137
+ ],
138
+ "resume": "auto"
139
+ },
140
+ "evaluation": {
141
+ "eval_every": 200,
142
+ "eval_batches": 8,
143
+ "probe_sents": 128,
144
+ "probe_bpb_batches": 4,
145
+ "log_spaced_probe": true,
146
+ "dense_early_every": 0,
147
+ "dense_early_until": 0,
148
+ "dump_reps": true,
149
+ "dump_reps_thresholds": [
150
+ 0.3,
151
+ 0.4,
152
+ 0.5,
153
+ 0.6,
154
+ 0.7
155
+ ]
156
+ }
157
+ },
158
+ "format": "beetle-hnet step branch v1 (src/checkpointing/hub.py)"
159
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae975b3821d47d1a95c1b75dfdf72ab8b32cfffc7d38e4b14054018d0fa23489
3
+ size 90078272
training_config.yaml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 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_hnet_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