BRlkl commited on
Commit
acb671e
·
verified ·
1 Parent(s): 84ed552

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '
2
+ ' + message['content'] | trim + '<end_of_turn>
3
+ ' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model
4
+ '}}{% endif %}
initial_latent_z.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19386fa58bc1889796bdad4719acf56199cff237492e9dc82d6ff06ba6db0e5b
3
+ size 1048656
metrics.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "multiturn",
5
+ "best_validation_loss": 1.2392609406151966,
6
+ "best_metrics": {
7
+ "loss": 1.2392609406151966,
8
+ "token_count": 13229.0,
9
+ "example_count": 119.0,
10
+ "first_token_correct": 214.0,
11
+ "first_token_count": 455.0,
12
+ "first_token_exact_match": 0.4703296703296703
13
+ },
14
+ "global_step": 360,
15
+ "train_dataset": {
16
+ "example_count": 2260,
17
+ "observation_steps_mean": 3.816371681415929,
18
+ "observation_steps_max": 5,
19
+ "decoder_steps_mean": 3.816371681415929,
20
+ "decoder_steps_max": 5,
21
+ "input_tokens_mean": 163.47079646017698,
22
+ "input_tokens_max": 305,
23
+ "target_tokens_mean": 110.7070796460177,
24
+ "target_tokens_max": 225,
25
+ "dataset_counts": {
26
+ "everyday_conversations": 2260
27
+ }
28
+ },
29
+ "validation_dataset": {
30
+ "example_count": 119,
31
+ "observation_steps_mean": 3.823529411764706,
32
+ "observation_steps_max": 5,
33
+ "decoder_steps_mean": 3.823529411764706,
34
+ "decoder_steps_max": 5,
35
+ "input_tokens_mean": 163.18487394957984,
36
+ "input_tokens_max": 280,
37
+ "target_tokens_mean": 111.16806722689076,
38
+ "target_tokens_max": 189,
39
+ "dataset_counts": {
40
+ "everyday_conversations": 119
41
+ }
42
+ },
43
+ "wandb_enabled": true
44
+ }
45
+ ]
46
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:228489ef08b9767be5e41a367eb909eda39ada543a7da5cc7e00905e09c290bb
3
+ size 2518360980
pre_sft_b200.yaml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ datasets:
2
+ - name: everyday_conversations
3
+ repo_id: HuggingFaceTB/everyday-conversations-llama3.1-2k
4
+ format: messages_all_turns
5
+ train_split: train_sft
6
+ validation_split: test_sft
7
+ min_turns: 2
8
+ max_turns:
9
+ max_message_chars: 6000
10
+ use_base_chat_template: true
11
+
12
+ model:
13
+ base_model_name: google/t5gemma-l-l-prefixlm-it
14
+ initial_model_path: BRlkl/test
15
+ dtype: bfloat16
16
+ attn_implementation: sdpa
17
+ magicnorm_eps: 1.0e-6
18
+ z_slots: 256
19
+ num_time_tokens: 0
20
+ use_explicit_time_features: false
21
+ gate_attention_heads: 4
22
+ max_observation_tokens: 1024
23
+ max_decoder_tokens: 1024
24
+ thought_loop_proposal_mode: observation_hidden_compression
25
+ preserve_observation_encoder_manifold: true
26
+ observation_encoder_use_state_context: true
27
+ latent_attention_mask_mode: full
28
+ initial_update_gate_bias: 6.0
29
+
30
+ training:
31
+ seed: 17
32
+ num_workers: 2
33
+ gradient_checkpointing: true
34
+ mixed_precision: bf16
35
+ max_grad_norm: 1.0
36
+ weight_decay: 0.01
37
+ backbone_learning_rate: 5.0e-6
38
+ new_module_learning_rate: 1.0e-4
39
+ adam_beta1: 0.9
40
+ adam_beta2: 0.95
41
+ adam_epsilon: 1.0e-8
42
+ fused_adamw: true
43
+ freeze_gate_head: true
44
+ log_every_steps: 1
45
+ eval_every_steps: 25
46
+ checkpoint_every_steps: 250
47
+ max_train_examples:
48
+ max_validation_examples:
49
+ freeze_decoder_first_fraction: 1.0
50
+ probe_extra_new_tokens: 16
51
+
52
+ phase:
53
+ micro_batch_size: 16
54
+ eval_batch_size: 16
55
+ gradient_accumulation_steps: 4
56
+ num_train_epochs: 1
57
+ warmup_ratio: 0.03
58
+ shuffle_train: true
59
+
60
+ cache:
61
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn
62
+
63
+ paths:
64
+ run_root: runs_pre_sft_multiturn
65
+ export_root: exports_multiturn
66
+
67
+ inference:
68
+ format: alpaca_single_turn
69
+ use_base_chat_template: true
70
+
71
+ wandb:
72
+ enabled: true
73
+ project: samantha-pre-sft
74
+ run_name: t5gemma2-thoughtloop-pre-sft-everyday-all-turns
75
+
76
+ hub:
77
+ model_repo_id: BRlkl/test_multiturn2
78
+ private: false
sft_b200.yaml ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ datasets:
2
+ - name: everyday_conversations
3
+ repo_id: HuggingFaceTB/everyday-conversations-llama3.1-2k
4
+ format: messages_all_turns
5
+ train_split: train_sft
6
+ validation_split: test_sft
7
+ min_turns: 2
8
+ max_turns:
9
+ max_message_chars: 6000
10
+ use_base_chat_template: true
11
+
12
+ model:
13
+ base_model_name: google/t5gemma-l-l-prefixlm-it
14
+ initial_model_path: BRlkl/test
15
+ dtype: bfloat16
16
+ attn_implementation: sdpa
17
+ magicnorm_eps: 1.0e-6
18
+ z_slots: 256
19
+ num_time_tokens: 0
20
+ use_explicit_time_features: false
21
+ gate_attention_heads: 4
22
+ max_observation_tokens: 1024
23
+ max_decoder_tokens: 1024
24
+ thought_loop_proposal_mode: observation_hidden_compression
25
+ preserve_observation_encoder_manifold: true
26
+ observation_encoder_use_state_context: true
27
+ latent_attention_mask_mode: full
28
+ initial_update_gate_bias: 6.0
29
+
30
+ training:
31
+ seed: 17
32
+ num_workers: 2
33
+ gradient_checkpointing: true
34
+ mixed_precision: bf16
35
+ max_grad_norm: 1.0
36
+ weight_decay: 0.01
37
+ backbone_learning_rate: 5.0e-6
38
+ new_module_learning_rate: 1.0e-4
39
+ adam_beta1: 0.9
40
+ adam_beta2: 0.95
41
+ adam_epsilon: 1.0e-8
42
+ fused_adamw: true
43
+ freeze_gate_head: true
44
+ log_every_steps: 1
45
+ eval_every_steps: 50
46
+ checkpoint_every_steps: 250
47
+ max_train_examples:
48
+ max_validation_examples:
49
+ freeze_decoder_first_fraction: 0.0
50
+ decoder_training_mode: teacher_forced
51
+ probe_extra_new_tokens: 16
52
+
53
+ phase:
54
+ micro_batch_size: 16
55
+ eval_batch_size: 16
56
+ gradient_accumulation_steps: 4
57
+ num_train_epochs: 5
58
+ warmup_ratio: 0.03
59
+ shuffle_train: true
60
+
61
+ cache:
62
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn
63
+
64
+ paths:
65
+ run_root: runs_pre_sft_multiturn
66
+ export_root: exports_multiturn
67
+
68
+ inference:
69
+ format: alpaca_single_turn
70
+ use_base_chat_template: true
71
+
72
+ wandb:
73
+ enabled: true
74
+ project: samantha-pre-sft
75
+ run_name: t5gemma2-thoughtloop-pre-sft-everyday-all-turns
76
+
77
+ hub:
78
+ model_repo_id: BRlkl/test_multiturn4
79
+ private: false
sft_config.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "datasets": [
3
+ {
4
+ "name": "everyday_conversations",
5
+ "repo_id": "HuggingFaceTB/everyday-conversations-llama3.1-2k",
6
+ "format": "messages_all_turns",
7
+ "train_split": "train_sft",
8
+ "validation_split": "test_sft",
9
+ "min_turns": 2,
10
+ "max_turns": null,
11
+ "max_message_chars": 6000,
12
+ "use_base_chat_template": true
13
+ }
14
+ ],
15
+ "model": {
16
+ "base_model_name": "google/t5gemma-l-l-prefixlm-it",
17
+ "initial_model_path": "BRlkl/test",
18
+ "dtype": "bfloat16",
19
+ "attn_implementation": "sdpa",
20
+ "magicnorm_eps": 1e-06,
21
+ "z_slots": 256,
22
+ "num_time_tokens": 0,
23
+ "use_explicit_time_features": false,
24
+ "gate_attention_heads": 4,
25
+ "max_observation_tokens": 1024,
26
+ "max_decoder_tokens": 1024,
27
+ "thought_loop_proposal_mode": "observation_hidden_compression",
28
+ "preserve_observation_encoder_manifold": true,
29
+ "observation_encoder_use_state_context": true,
30
+ "latent_attention_mask_mode": "full",
31
+ "initial_update_gate_bias": 6.0
32
+ },
33
+ "training": {
34
+ "seed": 17,
35
+ "num_workers": 2,
36
+ "gradient_checkpointing": true,
37
+ "mixed_precision": "bf16",
38
+ "max_grad_norm": 1.0,
39
+ "weight_decay": 0.01,
40
+ "backbone_learning_rate": 5e-06,
41
+ "new_module_learning_rate": 0.0001,
42
+ "adam_beta1": 0.9,
43
+ "adam_beta2": 0.95,
44
+ "adam_epsilon": 1e-08,
45
+ "fused_adamw": true,
46
+ "freeze_gate_head": true,
47
+ "log_every_steps": 1,
48
+ "eval_every_steps": 50,
49
+ "checkpoint_every_steps": 250,
50
+ "max_train_examples": null,
51
+ "max_validation_examples": null,
52
+ "freeze_decoder_first_fraction": 0.0,
53
+ "decoder_training_mode": "teacher_forced",
54
+ "probe_extra_new_tokens": 16
55
+ },
56
+ "phase": {
57
+ "micro_batch_size": 16,
58
+ "eval_batch_size": 16,
59
+ "gradient_accumulation_steps": 4,
60
+ "num_train_epochs": 10,
61
+ "warmup_ratio": 0.03,
62
+ "shuffle_train": true
63
+ },
64
+ "cache": {
65
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn"
66
+ },
67
+ "paths": {
68
+ "run_root": "runs_pre_sft_multiturn",
69
+ "export_root": "exports_multiturn"
70
+ },
71
+ "inference": {
72
+ "format": "alpaca_single_turn",
73
+ "use_base_chat_template": true
74
+ },
75
+ "wandb": {
76
+ "enabled": true,
77
+ "project": "samantha-pre-sft",
78
+ "run_name": "t5gemma2-thoughtloop-pre-sft-everyday-all-turns"
79
+ },
80
+ "hub": {
81
+ "model_repo_id": "BRlkl/test_multiturn4",
82
+ "private": false
83
+ }
84
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:561e31602d41b5cf3a4a41197db54761c3b898ac3147cbcb2a9c5094b668cbba
3
+ size 34362527
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<bos>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<eos>",
6
+ "is_local": false,
7
+ "local_files_only": false,
8
+ "mask_token": "<mask>",
9
+ "model_max_length": 1000000000000000019884624838656,
10
+ "pad_token": "<pad>",
11
+ "padding_side": "right",
12
+ "sp_model_kwargs": {},
13
+ "spaces_between_special_tokens": false,
14
+ "tokenizer_class": "GemmaTokenizer",
15
+ "unk_token": "<unk>",
16
+ "use_default_system_prompt": false
17
+ }