BRlkl commited on
Commit
516071e
·
verified ·
1 Parent(s): 3c0f381

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:aa19220fb3d547b77f6fbae4806c6dd5823be555d014b8d65792fa41f23472ec
3
+ size 4194392
metrics.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "simple_multiturn_transcript",
5
+ "best_selection_metric_value": 6.337032405180627,
6
+ "best_metrics": {
7
+ "validation/loss_total": 1.8748868287042504,
8
+ "validation/loss_response": 2.216750873447601,
9
+ "validation/loss_current_user_reconstruction": 2.1496858545410533,
10
+ "validation/loss_probe": 1.3845612109447378,
11
+ "validation/loss_past_response_contrastive": 1.0462471295376212,
12
+ "validation/response_first_token_exact_match": 0.1326530612244898,
13
+ "validation/current-user_reconstruction_first_token_exact_match": 0.10714285714285714,
14
+ "validation/probe_first_token_exact_match": 0.7040816326530612,
15
+ "validation/supervised_turn_count": 196.0,
16
+ "validation/response_exact_match": 0.0,
17
+ "validation/response_similarity": 0.10058788564883722,
18
+ "validation/response_token_f1": 0.20117577129767444,
19
+ "validation/response_line_recall": 0.0,
20
+ "validation/response_reconstruction_similarity": 0.1891127356809172,
21
+ "validation/response_reconstruction_exact_match": 0.0,
22
+ "validation/response_reconstruction_token_f1": 0.1891127356809172,
23
+ "validation/probe_exact_match": 0.0,
24
+ "validation/probe_transcript_similarity": 0.17437084392135335,
25
+ "validation/probe_token_f1": 0.3487416878427067,
26
+ "validation/probe_line_recall": 0.0,
27
+ "validation/response_similarity_by_turn/turn_2": 0.09775539351122156,
28
+ "validation/response_similarity_by_turn/turn_3": 0.10816021143924962,
29
+ "validation/response_similarity_by_turn/turn_4": 0.10406032060356261,
30
+ "validation/response_similarity_by_turn/turn_5": 0.10085456009369054,
31
+ "validation/response_similarity_by_turn/turn_6": 0.04664324746291959,
32
+ "validation/response_reconstruction_similarity_by_turn/turn_2": 0.19856356350644752,
33
+ "validation/response_reconstruction_similarity_by_turn/turn_3": 0.19559046721759682,
34
+ "validation/response_reconstruction_similarity_by_turn/turn_4": 0.17994648355759468,
35
+ "validation/response_reconstruction_similarity_by_turn/turn_5": 0.19919191919191923,
36
+ "validation/response_reconstruction_similarity_by_turn/turn_6": 0.08781362007168458,
37
+ "validation/probe_transcript_similarity_by_turn/turn_2": 0.22581347347376093,
38
+ "validation/probe_transcript_similarity_by_turn/turn_3": 0.20101213533791346,
39
+ "validation/probe_transcript_similarity_by_turn/turn_4": 0.10900768873835404,
40
+ "validation/probe_transcript_similarity_by_turn/turn_5": 0.04821993196924256,
41
+ "validation/probe_transcript_similarity_by_turn/turn_6": 0.0330600424212759,
42
+ "validation/goal_loss": 6.337032405180627
43
+ },
44
+ "global_step": 241,
45
+ "train_dataset": {
46
+ "example_count": 7696,
47
+ "pair_count_mean": 4.2548076923076925,
48
+ "pair_count_max": 6,
49
+ "response_target_tokens_mean_turn2_plus": 126.23921517671518,
50
+ "response_target_tokens_max_turn2_plus": 1643,
51
+ "probe_target_tokens_mean_turn2_plus": 471.31613825363826,
52
+ "probe_target_tokens_max_turn2_plus": 3285,
53
+ "dataset_counts": {
54
+ "chatalpaca_multiturn_enriched": 7696
55
+ },
56
+ "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",
57
+ "current_user_reconstruction_question_text": "What did me (the user) just ask you? give verbatim message I just previously sent"
58
+ },
59
+ "validation_dataset": {
60
+ "example_count": 151,
61
+ "pair_count_mean": 4.139072847682119,
62
+ "pair_count_max": 6,
63
+ "response_target_tokens_mean_turn2_plus": 123.21854304635761,
64
+ "response_target_tokens_max_turn2_plus": 889,
65
+ "probe_target_tokens_mean_turn2_plus": 448.5298013245033,
66
+ "probe_target_tokens_max_turn2_plus": 1545,
67
+ "dataset_counts": {
68
+ "chatalpaca_multiturn_enriched": 151
69
+ },
70
+ "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",
71
+ "current_user_reconstruction_question_text": "What did me (the user) just ask you? give verbatim message I just previously sent"
72
+ },
73
+ "wandb_enabled": true
74
+ }
75
+ ]
76
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:587dbb030eba8e2bc7bde40598443167c492ed59f52a0222078ab3bb9447d12f
3
+ size 2521506792
sft_b200.yaml ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 60
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.40
57
+ current_user_reconstruction_loss_weight: 0.25
58
+ probe_loss_weight: 0.25
59
+ past_response_contrastive_loss_weight: 0.10
60
+
61
+ enable_past_response_contrastive_loss: true
62
+ past_response_contrastive_margin: 0.50
63
+ 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"
64
+ current_user_reconstruction_question_text: "What did me (the user) just ask you? give verbatim message I just previously sent"
65
+
66
+ feedback_generation_max_new_tokens: 1024
67
+ feedback_generation_extra_new_tokens: 16
68
+ validation_response_max_new_tokens: 1024
69
+ validation_response_extra_new_tokens: 16
70
+ validation_probe_max_new_tokens: 1024
71
+ validation_probe_extra_new_tokens: 16
72
+
73
+ wandb_train_metric_keys:
74
+ - train/loss_total
75
+ - train/loss_response
76
+ - train/loss_current_user_reconstruction
77
+ - train/loss_probe
78
+ - train/loss_past_response_contrastive
79
+ - train/response_first_token_exact_match
80
+ - train/current-user_reconstruction_first_token_exact_match
81
+ - train/probe_first_token_exact_match
82
+ wandb_validation_metric_keys:
83
+ - validation/loss_total
84
+ - validation/loss_response
85
+ - validation/loss_current_user_reconstruction
86
+ - validation/loss_probe
87
+ - validation/loss_past_response_contrastive
88
+ - validation/goal_loss
89
+ - validation/response_similarity
90
+ - validation/response_reconstruction_similarity
91
+ - validation/probe_transcript_similarity
92
+
93
+ checkpoint_selection_metric: validation/goal_loss
94
+ checkpoint_selection_mode: min
95
+ validation_response_exact_miss_penalty: 1.0
96
+ validation_reconstruction_similarity_miss_penalty: 1.0
97
+ validation_probe_exact_miss_penalty: 1.0
98
+ validation_probe_similarity_miss_penalty: 2.0
99
+
100
+ phase:
101
+ micro_batch_size: 4
102
+ eval_batch_size: 4
103
+ gradient_accumulation_steps: 8
104
+ num_train_epochs: 1
105
+ warmup_ratio: 0.03
106
+ shuffle_train: true
107
+
108
+ cache:
109
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn_simple_transcript
110
+
111
+ paths:
112
+ run_root: runs_pre_sft_multiturn_simple_transcript
113
+ export_root: exports_multiturn_simple_transcript
114
+
115
+ inference:
116
+ format: predictive_state_multiturn
117
+ use_base_chat_template: true
118
+
119
+ wandb:
120
+ enabled: true
121
+ project: samantha-pre-sft
122
+ run_name: t5gemma2-thoughtloop-pre-sft-simple-transcript
123
+
124
+ hub:
125
+ model_repo_id: BRlkl/test_multiturn_simple_transcript1024_2
126
+ private: false
sft_config.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "BRlkl/test_1024",
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
+ "gate_decision_temperature": 1.0,
36
+ "initial_gate_decision_threshold_logit": 0.0
37
+ },
38
+ "training": {
39
+ "seed": 17,
40
+ "num_workers": 2,
41
+ "gradient_checkpointing": true,
42
+ "mixed_precision": "bf16",
43
+ "max_grad_norm": 1.0,
44
+ "weight_decay": 0.01,
45
+ "backbone_learning_rate": 5e-06,
46
+ "new_module_learning_rate": 0.0001,
47
+ "adam_beta1": 0.9,
48
+ "adam_beta2": 0.95,
49
+ "adam_epsilon": 1e-08,
50
+ "fused_adamw": true,
51
+ "freeze_gate_head": true,
52
+ "assistant_feedback_mode": "teacher_forced",
53
+ "log_every_steps": 1,
54
+ "eval_every_steps": 60,
55
+ "checkpoint_every_steps": 500,
56
+ "eval_max_batches": 16,
57
+ "validation_behavior_max_batches": 4,
58
+ "max_train_examples": null,
59
+ "max_validation_examples": null,
60
+ "response_loss_weight": 0.4,
61
+ "current_user_reconstruction_loss_weight": 0.25,
62
+ "probe_loss_weight": 0.25,
63
+ "past_response_contrastive_loss_weight": 0.1,
64
+ "enable_past_response_contrastive_loss": true,
65
+ "past_response_contrastive_margin": 0.5,
66
+ "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",
67
+ "current_user_reconstruction_question_text": "What did me (the user) just ask you? give verbatim message I just previously sent",
68
+ "feedback_generation_max_new_tokens": 1024,
69
+ "feedback_generation_extra_new_tokens": 16,
70
+ "validation_response_max_new_tokens": 1024,
71
+ "validation_response_extra_new_tokens": 16,
72
+ "validation_probe_max_new_tokens": 1024,
73
+ "validation_probe_extra_new_tokens": 16,
74
+ "wandb_train_metric_keys": [
75
+ "train/loss_total",
76
+ "train/loss_response",
77
+ "train/loss_current_user_reconstruction",
78
+ "train/loss_probe",
79
+ "train/loss_past_response_contrastive",
80
+ "train/response_first_token_exact_match",
81
+ "train/current-user_reconstruction_first_token_exact_match",
82
+ "train/probe_first_token_exact_match"
83
+ ],
84
+ "wandb_validation_metric_keys": [
85
+ "validation/loss_total",
86
+ "validation/loss_response",
87
+ "validation/loss_current_user_reconstruction",
88
+ "validation/loss_probe",
89
+ "validation/loss_past_response_contrastive",
90
+ "validation/goal_loss",
91
+ "validation/response_similarity",
92
+ "validation/response_reconstruction_similarity",
93
+ "validation/probe_transcript_similarity"
94
+ ],
95
+ "checkpoint_selection_metric": "validation/goal_loss",
96
+ "checkpoint_selection_mode": "min",
97
+ "validation_response_exact_miss_penalty": 1.0,
98
+ "validation_reconstruction_similarity_miss_penalty": 1.0,
99
+ "validation_probe_exact_miss_penalty": 1.0,
100
+ "validation_probe_similarity_miss_penalty": 2.0
101
+ },
102
+ "phase": {
103
+ "micro_batch_size": 4,
104
+ "eval_batch_size": 4,
105
+ "gradient_accumulation_steps": 8,
106
+ "num_train_epochs": 1,
107
+ "warmup_ratio": 0.03,
108
+ "shuffle_train": true
109
+ },
110
+ "cache": {
111
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn_simple_transcript"
112
+ },
113
+ "paths": {
114
+ "run_root": "runs_pre_sft_multiturn_simple_transcript",
115
+ "export_root": "exports_multiturn_simple_transcript"
116
+ },
117
+ "inference": {
118
+ "format": "predictive_state_multiturn",
119
+ "use_base_chat_template": true,
120
+ "gate_probability_threshold": 0.5,
121
+ "learned_gate_decision_threshold_logit": 0.0
122
+ },
123
+ "wandb": {
124
+ "enabled": true,
125
+ "project": "samantha-pre-sft",
126
+ "run_name": "t5gemma2-thoughtloop-pre-sft-simple-transcript"
127
+ },
128
+ "hub": {
129
+ "model_repo_id": "BRlkl/test_multiturn_simple_transcript1024_2",
130
+ "private": false
131
+ }
132
+ }
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
+ }