CrazyJames26 commited on
Commit
9594f18
·
verified ·
1 Parent(s): c4627b8

Upload verified 1b-scalar-r0p02 checkpoint

Browse files
.gitattributes CHANGED
@@ -38,3 +38,4 @@ checkpoints/1b-inout-r0p02/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
  checkpoints/1b-inout-r0p05/tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
  checkpoints/1b-inplace/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  checkpoints/1b-scalar-lmonly/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
38
  checkpoints/1b-inout-r0p05/tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
  checkpoints/1b-inplace/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
  checkpoints/1b-scalar-lmonly/tokenizer.json filter=lfs diff=lfs merge=lfs -text
41
+ checkpoints/1b-scalar-r0p02/tokenizer.json filter=lfs diff=lfs merge=lfs -text
checkpoints/1b-scalar-r0p02/checkpoint_meta.json ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention": {
3
+ "attn_implementation": "flash_attention_2"
4
+ },
5
+ "base_model": "meta-llama/Llama-3.2-1B",
6
+ "model": {
7
+ "replace_layers": [
8
+ 0,
9
+ 1,
10
+ 2,
11
+ 3,
12
+ 4,
13
+ 5,
14
+ 6,
15
+ 7,
16
+ 8,
17
+ 9,
18
+ 10,
19
+ 11,
20
+ 12,
21
+ 13,
22
+ 14,
23
+ 15
24
+ ],
25
+ "replacement_mode": "sw2k_inplace_ttt_mlp",
26
+ "sliding_window": 2048,
27
+ "sw2k_mode": "masked",
28
+ "ttt_chunk": 2048,
29
+ "ttt_conv_init": "zero",
30
+ "ttt_forgetting_gate_init_bias": 4.0,
31
+ "ttt_forgetting_mode": "learned_scalar",
32
+ "ttt_lr": 0.001,
33
+ "ttt_memory_budget_loss_weight": 1.0,
34
+ "ttt_memory_budget_ratio": 0.02,
35
+ "ttt_proj": true,
36
+ "ttt_retain_gate_loss_weight": 0.0,
37
+ "ttt_target": "hidden_states",
38
+ "ttt_write_gate_enabled": false,
39
+ "ttt_write_gate_init_bias": 4.0,
40
+ "ttt_write_gate_loss_weight": 0.0,
41
+ "type": "hybrid_inplace_ttt_mlp"
42
+ },
43
+ "model_init": {
44
+ "config_name": "meta-llama/Llama-3.2-1B",
45
+ "config_overrides": {},
46
+ "mode": "random"
47
+ },
48
+ "resolved_config": {
49
+ "attention": {
50
+ "attn_implementation": "flash_attention_2"
51
+ },
52
+ "base_model": "meta-llama/Llama-3.2-1B",
53
+ "data": {
54
+ "add_eos_token": false,
55
+ "data_dir": "${FORGET_TTT_DATA_ROOT}/pile_uncopyrighted_local_jsonl/jsonl/train",
56
+ "data_glob": "*.jsonl",
57
+ "max_length": 32768,
58
+ "min_text_tokens": 16385,
59
+ "pack_to_max_length": true,
60
+ "repeat_streaming": true,
61
+ "seed": 42,
62
+ "shuffle": false,
63
+ "shuffle_buffer_size": 10000,
64
+ "streaming": true,
65
+ "text_field": "text",
66
+ "type": "local_text_jsonl_lm"
67
+ },
68
+ "distillation": {
69
+ "enabled": false,
70
+ "eps": 1e-06,
71
+ "lambda_hidden": 0.0,
72
+ "loss_type": "normalized_l2"
73
+ },
74
+ "model": {
75
+ "replace_layers": [
76
+ 0,
77
+ 1,
78
+ 2,
79
+ 3,
80
+ 4,
81
+ 5,
82
+ 6,
83
+ 7,
84
+ 8,
85
+ 9,
86
+ 10,
87
+ 11,
88
+ 12,
89
+ 13,
90
+ 14,
91
+ 15
92
+ ],
93
+ "replacement_mode": "sw2k_inplace_ttt_mlp",
94
+ "sliding_window": 2048,
95
+ "sw2k_mode": "masked",
96
+ "ttt_chunk": 2048,
97
+ "ttt_conv_init": "zero",
98
+ "ttt_forgetting_gate_init_bias": 4.0,
99
+ "ttt_forgetting_mode": "learned_scalar",
100
+ "ttt_lr": 0.001,
101
+ "ttt_memory_budget_loss_weight": 1.0,
102
+ "ttt_memory_budget_ratio": 0.02,
103
+ "ttt_proj": true,
104
+ "ttt_retain_gate_loss_weight": 0.0,
105
+ "ttt_target": "hidden_states",
106
+ "ttt_write_gate_enabled": false,
107
+ "ttt_write_gate_init_bias": 4.0,
108
+ "ttt_write_gate_loss_weight": 0.0,
109
+ "type": "hybrid_inplace_ttt_mlp"
110
+ },
111
+ "model_init": {
112
+ "config_name": "meta-llama/Llama-3.2-1B",
113
+ "config_overrides": {},
114
+ "mode": "random"
115
+ },
116
+ "phase": 1,
117
+ "tokenizer_name": "meta-llama/Llama-3.2-1B",
118
+ "torch_dtype": "bfloat16",
119
+ "training": {
120
+ "dataloader_num_workers": 0,
121
+ "eval_every_steps": 0,
122
+ "eval_max_steps": 0,
123
+ "freeze_unreplaced_transformer_blocks": false,
124
+ "gradient_accumulation_steps": 1,
125
+ "gradient_checkpointing": true,
126
+ "learning_rate": 0.0003,
127
+ "log_with": "wandb",
128
+ "logging_steps": 10,
129
+ "logs_dir": "./outputs/train_from_scratch_short_to_long/EXP_AR_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_localjsonl_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02/logs/03_stage3_gt16k",
130
+ "lr_scheduler_type": "cosine",
131
+ "max_grad_norm": 1.0,
132
+ "max_steps": 50000,
133
+ "mixed_precision": "bf16",
134
+ "output_dir": "${FORGET_TTT_OUTPUT_ROOT}/train_from_scratch_short_to_long/EXP_AR_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_localjsonl_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02/03_stage3_gt16k",
135
+ "per_device_train_batch_size": 1,
136
+ "project_name": "train from scratch short to long",
137
+ "run_name": "formal_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02_stage3_gt16k",
138
+ "save_steps": 5000,
139
+ "save_total_limit": 3,
140
+ "train_base_model": true,
141
+ "train_ttt_branch": true,
142
+ "warmup_steps": 2000,
143
+ "weight_decay": 0.1
144
+ },
145
+ "trust_remote_code": false
146
+ },
147
+ "tokenizer_name": "meta-llama/Llama-3.2-1B",
148
+ "torch_dtype": "bfloat16",
149
+ "trust_remote_code": false
150
+ }
checkpoints/1b-scalar-r0p02/config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 128000,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 128001,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 8192,
15
+ "max_position_embeddings": 131072,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 32,
19
+ "num_hidden_layers": 16,
20
+ "num_key_value_heads": 8,
21
+ "pad_token_id": null,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "factor": 32.0,
26
+ "high_freq_factor": 4.0,
27
+ "low_freq_factor": 1.0,
28
+ "original_max_position_embeddings": 8192,
29
+ "rope_theta": 500000.0,
30
+ "rope_type": "llama3"
31
+ },
32
+ "tie_word_embeddings": true,
33
+ "transformers_version": "5.5.4",
34
+ "use_cache": true,
35
+ "vocab_size": 128256
36
+ }
checkpoints/1b-scalar-r0p02/generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 128000,
4
+ "eos_token_id": 128001,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.5.4",
8
+ "use_cache": true
9
+ }
checkpoints/1b-scalar-r0p02/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff973a409e4cbfd247396fc935bb37c380aba2996c93c69898c3e3387c376756
3
+ size 2606267432
checkpoints/1b-scalar-r0p02/resolved_config.yaml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ base_model: meta-llama/Llama-3.2-1B
2
+ tokenizer_name: meta-llama/Llama-3.2-1B
3
+ torch_dtype: bfloat16
4
+ phase: 1
5
+ trust_remote_code: false
6
+ model_init:
7
+ mode: random
8
+ config_name: meta-llama/Llama-3.2-1B
9
+ config_overrides: {}
10
+ attention:
11
+ attn_implementation: flash_attention_2
12
+ model:
13
+ type: hybrid_inplace_ttt_mlp
14
+ replacement_mode: sw2k_inplace_ttt_mlp
15
+ sw2k_mode: masked
16
+ replace_layers:
17
+ - 0
18
+ - 1
19
+ - 2
20
+ - 3
21
+ - 4
22
+ - 5
23
+ - 6
24
+ - 7
25
+ - 8
26
+ - 9
27
+ - 10
28
+ - 11
29
+ - 12
30
+ - 13
31
+ - 14
32
+ - 15
33
+ sliding_window: 2048
34
+ ttt_chunk: 2048
35
+ ttt_proj: true
36
+ ttt_lr: 0.001
37
+ ttt_target: hidden_states
38
+ ttt_conv_init: zero
39
+ ttt_forgetting_mode: learned_scalar
40
+ ttt_forgetting_gate_init_bias: 4.0
41
+ ttt_write_gate_enabled: false
42
+ ttt_write_gate_init_bias: 4.0
43
+ ttt_memory_budget_loss_weight: 1.0
44
+ ttt_memory_budget_ratio: 0.02
45
+ ttt_retain_gate_loss_weight: 0.0
46
+ ttt_write_gate_loss_weight: 0.0
47
+ data:
48
+ type: local_text_jsonl_lm
49
+ max_length: 32768
50
+ streaming: true
51
+ repeat_streaming: true
52
+ shuffle: false
53
+ shuffle_buffer_size: 10000
54
+ seed: 42
55
+ pack_to_max_length: true
56
+ add_eos_token: false
57
+ data_dir: ${FORGET_TTT_DATA_ROOT}/pile_uncopyrighted_local_jsonl/jsonl/train
58
+ data_glob: '*.jsonl'
59
+ text_field: text
60
+ min_text_tokens: 16385
61
+ training:
62
+ output_dir: ${FORGET_TTT_OUTPUT_ROOT}/train_from_scratch_short_to_long/EXP_AR_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_localjsonl_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02/03_stage3_gt16k
63
+ logs_dir: ./outputs/train_from_scratch_short_to_long/EXP_AR_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_localjsonl_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02/logs/03_stage3_gt16k
64
+ per_device_train_batch_size: 1
65
+ gradient_accumulation_steps: 1
66
+ dataloader_num_workers: 0
67
+ max_steps: 50000
68
+ save_steps: 5000
69
+ save_total_limit: 3
70
+ logging_steps: 10
71
+ eval_every_steps: 0
72
+ eval_max_steps: 0
73
+ learning_rate: 0.0003
74
+ weight_decay: 0.1
75
+ max_grad_norm: 1.0
76
+ mixed_precision: bf16
77
+ gradient_checkpointing: true
78
+ lr_scheduler_type: cosine
79
+ warmup_steps: 2000
80
+ train_base_model: true
81
+ train_ttt_branch: true
82
+ freeze_unreplaced_transformer_blocks: false
83
+ log_with: wandb
84
+ project_name: train from scratch short to long
85
+ run_name: formal_hybrid_inplace_ttt_learned_scalar_nogate_sw2k_pileuncopyrighted_1b_32k_tttlr001_lr3e4_frominplace_stage1final_budget1p0_ratio0p02_stage3_gt16k
86
+ distillation:
87
+ enabled: false
88
+ lambda_hidden: 0.0
89
+ loss_type: normalized_l2
90
+ eps: 1.0e-06
checkpoints/1b-scalar-r0p02/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
checkpoints/1b-scalar-r0p02/tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|begin_of_text|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|end_of_text|>",
6
+ "is_local": false,
7
+ "model_input_names": [
8
+ "input_ids",
9
+ "attention_mask"
10
+ ],
11
+ "model_max_length": 131072,
12
+ "pad_token": "<|end_of_text|>",
13
+ "tokenizer_class": "TokenizersBackend"
14
+ }