BRlkl commited on
Commit
48b5767
·
verified ·
1 Parent(s): 3381ee4

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:22076a159f4663d6e6504fbf20475f488597cd7d2662e32f664b2364d9c93aa9
3
+ size 4194392
metrics.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "simple_multiturn_transcript",
5
+ "best_selection_metric_value": 6.619700041489555,
6
+ "best_metrics": {
7
+ "validation/loss_total": 2.042751923562315,
8
+ "validation/loss_response": 2.2427044281789876,
9
+ "validation/loss_current_user_reconstruction": 2.211277997021919,
10
+ "validation/loss_probe": 1.4743208408693655,
11
+ "validation/response_first_token_exact_match": 0.13291139240506328,
12
+ "validation/current-user_reconstruction_first_token_exact_match": 0.04008438818565401,
13
+ "validation/probe_first_token_exact_match": 0.6455696202531646,
14
+ "validation/supervised_turn_count": 474.0,
15
+ "validation/response_exact_match": 0.0,
16
+ "validation/response_similarity": 0.085281379048045,
17
+ "validation/response_token_f1": 0.17056275809609,
18
+ "validation/response_line_recall": 0.0,
19
+ "validation/response_reconstruction_similarity": 0.1664633586109287,
20
+ "validation/response_reconstruction_exact_match": 0.0,
21
+ "validation/response_reconstruction_token_f1": 0.1664633586109287,
22
+ "validation/probe_exact_match": 0.0,
23
+ "validation/probe_transcript_similarity": 0.1282942617309157,
24
+ "validation/probe_token_f1": 0.2565885234618314,
25
+ "validation/probe_line_recall": 0.0,
26
+ "validation/response_similarity_by_turn/turn_2": 0.08411492269405914,
27
+ "validation/response_similarity_by_turn/turn_3": 0.09334476082649767,
28
+ "validation/response_similarity_by_turn/turn_4": 0.073076306800475,
29
+ "validation/response_similarity_by_turn/turn_5": 0.08426057530291096,
30
+ "validation/response_similarity_by_turn/turn_6": 0.09150152785411145,
31
+ "validation/response_reconstruction_similarity_by_turn/turn_2": 0.21040282742381106,
32
+ "validation/response_reconstruction_similarity_by_turn/turn_3": 0.14500742221360224,
33
+ "validation/response_reconstruction_similarity_by_turn/turn_4": 0.1341406656584131,
34
+ "validation/response_reconstruction_similarity_by_turn/turn_5": 0.1833900922912523,
35
+ "validation/response_reconstruction_similarity_by_turn/turn_6": 0.1195707522775192,
36
+ "validation/probe_transcript_similarity_by_turn/turn_2": 0.1699551585606979,
37
+ "validation/probe_transcript_similarity_by_turn/turn_3": 0.14287379041502474,
38
+ "validation/probe_transcript_similarity_by_turn/turn_4": 0.09564061108210939,
39
+ "validation/probe_transcript_similarity_by_turn/turn_5": 0.06612852121879803,
40
+ "validation/probe_transcript_similarity_by_turn/turn_6": 0.0478720635643674,
41
+ "validation/goal_loss": 6.619700041489555
42
+ },
43
+ "global_step": 386,
44
+ "train_dataset": {
45
+ "example_count": 7696,
46
+ "pair_count_mean": 4.2548076923076925,
47
+ "pair_count_max": 6,
48
+ "response_target_tokens_mean_turn2_plus": 126.23921517671518,
49
+ "response_target_tokens_max_turn2_plus": 1643,
50
+ "probe_target_tokens_mean_turn2_plus": 471.31613825363826,
51
+ "probe_target_tokens_max_turn2_plus": 3285,
52
+ "dataset_counts": {
53
+ "chatalpaca_multiturn_enriched": 7696
54
+ },
55
+ "probe_question_text": "What is everything we have talked about so far? Give exact conversation transcript verbatim in following format: [User 1]: X [Assistant 1]: Y [User 2]: A etc"
56
+ },
57
+ "validation_dataset": {
58
+ "example_count": 151,
59
+ "pair_count_mean": 4.139072847682119,
60
+ "pair_count_max": 6,
61
+ "response_target_tokens_mean_turn2_plus": 123.21854304635761,
62
+ "response_target_tokens_max_turn2_plus": 889,
63
+ "probe_target_tokens_mean_turn2_plus": 448.5298013245033,
64
+ "probe_target_tokens_max_turn2_plus": 1545,
65
+ "dataset_counts": {
66
+ "chatalpaca_multiturn_enriched": 151
67
+ },
68
+ "probe_question_text": "What is everything we have talked about so far? Give exact conversation transcript verbatim in following format: [User 1]: X [Assistant 1]: Y [User 2]: A etc"
69
+ },
70
+ "wandb_enabled": true
71
+ }
72
+ ]
73
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49130a34aab6b03330e7c84a1ef7542b3de8c6a9d2ff60402d9a9d4e0a06d213
3
+ size 2521506708
sft_b200.yaml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ datasets:
2
+ - name: chatalpaca_multiturn_enriched
3
+ repo_id: BRlkl/chatalpaca-multiturn-enriched
4
+ source_split: train
5
+ format: messages_all_turns
6
+ validation_ratio: 0.02
7
+ split_seed: 17
8
+ min_turns: 2
9
+ max_turns: 6
10
+ max_message_chars: 6000
11
+ use_base_chat_template: true
12
+
13
+ model:
14
+ base_model_name: google/t5gemma-l-l-prefixlm-it
15
+ initial_model_path: BRlkl/test_1024
16
+ dtype: bfloat16
17
+ attn_implementation: sdpa
18
+ disable_cudnn_sdp: true
19
+ disable_mha_fastpath: true
20
+ magicnorm_eps: 1.0e-6
21
+ z_slots: 1024
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
+ hard_state_replace: true
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: 5.0e-6
41
+ new_module_learning_rate: 1.0e-4
42
+ adam_beta1: 0.9
43
+ adam_beta2: 0.95
44
+ adam_epsilon: 1.0e-8
45
+ fused_adamw: true
46
+ freeze_gate_head: true
47
+ assistant_feedback_mode: teacher_forced
48
+ log_every_steps: 1
49
+ eval_every_steps: 100
50
+ checkpoint_every_steps: 500
51
+ eval_max_batches: 16
52
+ validation_behavior_max_batches: 4
53
+ max_train_examples:
54
+ max_validation_examples:
55
+
56
+ response_loss_weight: 0.33
57
+ current_user_reconstruction_loss_weight: 0.33
58
+ probe_loss_weight: 0.33
59
+ probe_question_text: "What is everything we have talked about so far? Give exact conversation transcript verbatim in following format: [User 1]: X [Assistant 1]: Y [User 2]: A etc"
60
+
61
+ feedback_generation_max_new_tokens: 1024
62
+ feedback_generation_extra_new_tokens: 16
63
+ validation_response_max_new_tokens: 1024
64
+ validation_response_extra_new_tokens: 16
65
+ validation_probe_max_new_tokens: 1024
66
+ validation_probe_extra_new_tokens: 16
67
+
68
+ wandb_train_metric_keys:
69
+ - train/loss_total
70
+ - train/loss_response
71
+ - train/loss_current_user_reconstruction
72
+ - train/loss_probe
73
+ - train/response_first_token_exact_match
74
+ - train/current-user_reconstruction_first_token_exact_match
75
+ - train/probe_first_token_exact_match
76
+ wandb_validation_metric_keys:
77
+ - validation/loss_total
78
+ - validation/loss_response
79
+ - validation/loss_current_user_reconstruction
80
+ - validation/loss_probe
81
+ - validation/goal_loss
82
+ - validation/response_similarity
83
+ - validation/response_reconstruction_similarity
84
+ - validation/probe_transcript_similarity
85
+
86
+ checkpoint_selection_metric: validation/goal_loss
87
+ checkpoint_selection_mode: min
88
+ validation_response_exact_miss_penalty: 1.0
89
+ validation_reconstruction_similarity_miss_penalty: 1.0
90
+ validation_probe_exact_miss_penalty: 1.0
91
+ validation_probe_similarity_miss_penalty: 2.0
92
+
93
+ phase:
94
+ micro_batch_size: 10
95
+ eval_batch_size: 10
96
+ gradient_accumulation_steps: 4
97
+ num_train_epochs: 5
98
+ warmup_ratio: 0.03
99
+ shuffle_train: true
100
+
101
+ cache:
102
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn_simple_transcript
103
+
104
+ paths:
105
+ run_root: runs_pre_sft_multiturn_simple_transcript
106
+ export_root: exports_multiturn_simple_transcript
107
+
108
+ inference:
109
+ format: predictive_state_multiturn
110
+ use_base_chat_template: true
111
+
112
+ wandb:
113
+ enabled: true
114
+ project: samantha-pre-sft
115
+ run_name: t5gemma2-thoughtloop-pre-sft-simple-transcript
116
+
117
+ hub:
118
+ model_repo_id: BRlkl/test_multiturn_simple_transcript1024_2
119
+ private: false
sft_config.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "datasets": [
3
+ {
4
+ "name": "chatalpaca_multiturn_enriched",
5
+ "repo_id": "BRlkl/chatalpaca-multiturn-enriched",
6
+ "source_split": "train",
7
+ "format": "messages_all_turns",
8
+ "validation_ratio": 0.02,
9
+ "split_seed": 17,
10
+ "min_turns": 2,
11
+ "max_turns": 6,
12
+ "max_message_chars": 6000,
13
+ "use_base_chat_template": true
14
+ }
15
+ ],
16
+ "model": {
17
+ "base_model_name": "google/t5gemma-l-l-prefixlm-it",
18
+ "initial_model_path": null,
19
+ "dtype": "bfloat16",
20
+ "attn_implementation": "sdpa",
21
+ "disable_cudnn_sdp": true,
22
+ "disable_mha_fastpath": true,
23
+ "magicnorm_eps": 1e-06,
24
+ "z_slots": 1024,
25
+ "num_time_tokens": 0,
26
+ "use_explicit_time_features": false,
27
+ "gate_attention_heads": 4,
28
+ "max_observation_tokens": 1024,
29
+ "max_decoder_tokens": 1024,
30
+ "thought_loop_proposal_mode": "observation_hidden_compression",
31
+ "preserve_observation_encoder_manifold": true,
32
+ "observation_encoder_use_state_context": true,
33
+ "latent_attention_mask_mode": "full",
34
+ "hard_state_replace": true
35
+ },
36
+ "training": {
37
+ "seed": 17,
38
+ "num_workers": 2,
39
+ "gradient_checkpointing": true,
40
+ "mixed_precision": "bf16",
41
+ "max_grad_norm": 1.0,
42
+ "weight_decay": 0.01,
43
+ "backbone_learning_rate": 5e-06,
44
+ "new_module_learning_rate": 0.0001,
45
+ "adam_beta1": 0.9,
46
+ "adam_beta2": 0.95,
47
+ "adam_epsilon": 1e-08,
48
+ "fused_adamw": true,
49
+ "freeze_gate_head": true,
50
+ "assistant_feedback_mode": "teacher_forced",
51
+ "log_every_steps": 1,
52
+ "eval_every_steps": 90,
53
+ "checkpoint_every_steps": 500,
54
+ "eval_max_batches": 16,
55
+ "validation_behavior_max_batches": 4,
56
+ "max_train_examples": null,
57
+ "max_validation_examples": null,
58
+ "response_loss_weight": 0.5,
59
+ "current_user_reconstruction_loss_weight": 0.25,
60
+ "probe_loss_weight": 0.25,
61
+ "probe_question_text": "What is everything we have talked about so far? Give exact conversation transcript verbatim in following format: [User 1]: X [Assistant 1]: Y [User 2]: A etc",
62
+ "feedback_generation_max_new_tokens": 1024,
63
+ "feedback_generation_extra_new_tokens": 16,
64
+ "validation_response_max_new_tokens": 1024,
65
+ "validation_response_extra_new_tokens": 16,
66
+ "validation_probe_max_new_tokens": 1024,
67
+ "validation_probe_extra_new_tokens": 16,
68
+ "wandb_train_metric_keys": [
69
+ "train/loss_total",
70
+ "train/loss_response",
71
+ "train/loss_current_user_reconstruction",
72
+ "train/loss_probe",
73
+ "train/response_first_token_exact_match",
74
+ "train/current-user_reconstruction_first_token_exact_match",
75
+ "train/probe_first_token_exact_match"
76
+ ],
77
+ "wandb_validation_metric_keys": [
78
+ "validation/loss_total",
79
+ "validation/loss_response",
80
+ "validation/loss_current_user_reconstruction",
81
+ "validation/loss_probe",
82
+ "validation/goal_loss",
83
+ "validation/response_similarity",
84
+ "validation/response_reconstruction_similarity",
85
+ "validation/probe_transcript_similarity"
86
+ ],
87
+ "checkpoint_selection_metric": "validation/goal_loss",
88
+ "checkpoint_selection_mode": "min",
89
+ "validation_response_exact_miss_penalty": 1.0,
90
+ "validation_reconstruction_similarity_miss_penalty": 1.0,
91
+ "validation_probe_exact_miss_penalty": 1.0,
92
+ "validation_probe_similarity_miss_penalty": 2.0
93
+ },
94
+ "phase": {
95
+ "micro_batch_size": 10,
96
+ "eval_batch_size": 10,
97
+ "gradient_accumulation_steps": 4,
98
+ "num_train_epochs": 2,
99
+ "warmup_ratio": 0.03,
100
+ "shuffle_train": true
101
+ },
102
+ "cache": {
103
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn_simple_transcript"
104
+ },
105
+ "paths": {
106
+ "run_root": "runs_pre_sft_multiturn_simple_transcript",
107
+ "export_root": "exports_multiturn_simple_transcript"
108
+ },
109
+ "inference": {
110
+ "format": "predictive_state_multiturn",
111
+ "use_base_chat_template": true
112
+ },
113
+ "wandb": {
114
+ "enabled": true,
115
+ "project": "samantha-pre-sft",
116
+ "run_name": "t5gemma2-thoughtloop-pre-sft-simple-transcript"
117
+ },
118
+ "hub": {
119
+ "model_repo_id": "BRlkl/test_multiturn_simple_transcript1024",
120
+ "private": false
121
+ }
122
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:923de64f4705efd22f6880dc5e6a9b2993de2706a03d0d48773e0173e32a074f
3
+ size 34362428
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
+ }