BRlkl commited on
Commit
94aa4ed
·
verified ·
1 Parent(s): 3543829

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:7149350c78d3fca85fd2969041b5448c17efe63a3e032b7354a2c174a6e1fb3e
3
+ size 1048656
metrics.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "simple_multiturn_transcript",
5
+ "best_selection_metric_value": 5.121905698811801,
6
+ "best_metrics": {
7
+ "validation/loss_total": 1.6588564595009827,
8
+ "validation/loss_response": 2.0905123861018247,
9
+ "validation/loss_probe": 1.227200532900141,
10
+ "validation/response_first_token_exact_match": 0.21940928270042195,
11
+ "validation/probe_first_token_exact_match": 1.0,
12
+ "validation/supervised_turn_count": 474.0,
13
+ "validation/response_exact_match": 0.007936507936507936,
14
+ "validation/probe_exact_match": 0.0,
15
+ "validation/probe_transcript_similarity": 0.26450712637633667,
16
+ "validation/probe_token_f1": 0.5290142527526733,
17
+ "validation/probe_line_recall": 0.0,
18
+ "validation/probe_transcript_similarity_by_turn/turn_2": 0.2855606331489746,
19
+ "validation/probe_transcript_similarity_by_turn/turn_3": 0.2640905426798366,
20
+ "validation/probe_transcript_similarity_by_turn/turn_4": 0.24927199699265568,
21
+ "validation/probe_transcript_similarity_by_turn/turn_5": 0.24620106445427534,
22
+ "validation/probe_transcript_similarity_by_turn/turn_6": 0.23760515186996223,
23
+ "validation/goal_loss": 5.121905698811801
24
+ },
25
+ "global_step": 579,
26
+ "train_dataset": {
27
+ "example_count": 7696,
28
+ "pair_count_mean": 4.2548076923076925,
29
+ "pair_count_max": 6,
30
+ "response_target_tokens_mean_turn2_plus": 126.23921517671518,
31
+ "response_target_tokens_max_turn2_plus": 1643,
32
+ "probe_target_tokens_mean_turn2_plus": 471.31613825363826,
33
+ "probe_target_tokens_max_turn2_plus": 3285,
34
+ "dataset_counts": {
35
+ "chatalpaca_multiturn_enriched": 7696
36
+ },
37
+ "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"
38
+ },
39
+ "validation_dataset": {
40
+ "example_count": 151,
41
+ "pair_count_mean": 4.139072847682119,
42
+ "pair_count_max": 6,
43
+ "response_target_tokens_mean_turn2_plus": 123.21854304635761,
44
+ "response_target_tokens_max_turn2_plus": 889,
45
+ "probe_target_tokens_mean_turn2_plus": 448.5298013245033,
46
+ "probe_target_tokens_max_turn2_plus": 1545,
47
+ "dataset_counts": {
48
+ "chatalpaca_multiturn_enriched": 151
49
+ },
50
+ "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"
51
+ },
52
+ "wandb_enabled": true
53
+ }
54
+ ]
55
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21a3db5d302b00687b6129bf51944f8e485dcd15d9a3aa85f692ea2c5bb85bad
3
+ size 2518360980
sft_b200.yaml ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
16
+ dtype: bfloat16
17
+ attn_implementation: sdpa
18
+ magicnorm_eps: 1.0e-6
19
+ z_slots: 1024
20
+ num_time_tokens: 0
21
+ use_explicit_time_features: false
22
+ gate_attention_heads: 4
23
+ max_observation_tokens: 1024
24
+ max_decoder_tokens: 1024
25
+ thought_loop_proposal_mode: observation_hidden_compression
26
+ preserve_observation_encoder_manifold: true
27
+ observation_encoder_use_state_context: true
28
+ latent_attention_mask_mode: full
29
+ hard_state_replace: true
30
+
31
+ training:
32
+ seed: 17
33
+ num_workers: 2
34
+ gradient_checkpointing: true
35
+ mixed_precision: bf16
36
+ max_grad_norm: 1.0
37
+ weight_decay: 0.01
38
+ backbone_learning_rate: 5.0e-6
39
+ new_module_learning_rate: 1.0e-4
40
+ adam_beta1: 0.9
41
+ adam_beta2: 0.95
42
+ adam_epsilon: 1.0e-8
43
+ fused_adamw: true
44
+ freeze_gate_head: true
45
+ assistant_feedback_mode: teacher_forced
46
+ log_every_steps: 1
47
+ eval_every_steps: 200
48
+ checkpoint_every_steps: 500
49
+ eval_max_batches: 16
50
+ validation_behavior_max_batches: 4
51
+ max_train_examples:
52
+ max_validation_examples:
53
+
54
+ response_loss_weight: 0.5
55
+ probe_loss_weight: 0.5
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
+
58
+ feedback_generation_max_new_tokens: 1024
59
+ feedback_generation_extra_new_tokens: 16
60
+ validation_response_max_new_tokens: 1024
61
+ validation_response_extra_new_tokens: 16
62
+ validation_probe_max_new_tokens: 1024
63
+ validation_probe_extra_new_tokens: 16
64
+
65
+ wandb_train_metric_keys:
66
+ - train/loss_total
67
+ - train/loss_response
68
+ - train/loss_probe
69
+ - train/response_first_token_exact_match
70
+ - train/probe_first_token_exact_match
71
+ wandb_validation_metric_keys:
72
+ - validation/loss_total
73
+ - validation/loss_response
74
+ - validation/loss_probe
75
+ - validation/goal_loss
76
+ - validation/response_exact_match
77
+ - validation/probe_exact_match
78
+ - validation/probe_transcript_similarity
79
+
80
+ checkpoint_selection_metric: validation/goal_loss
81
+ checkpoint_selection_mode: min
82
+ validation_response_exact_miss_penalty: 1.0
83
+ validation_probe_exact_miss_penalty: 1.0
84
+ validation_probe_similarity_miss_penalty: 2.0
85
+
86
+ phase:
87
+ micro_batch_size: 8
88
+ eval_batch_size: 8
89
+ gradient_accumulation_steps: 4
90
+ num_train_epochs: 3
91
+ warmup_ratio: 0.03
92
+ shuffle_train: true
93
+
94
+ cache:
95
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn_simple_transcript
96
+
97
+ paths:
98
+ run_root: runs_pre_sft_multiturn_simple_transcript
99
+ export_root: exports_multiturn_simple_transcript
100
+
101
+ inference:
102
+ format: predictive_state_multiturn
103
+ use_base_chat_template: true
104
+
105
+ wandb:
106
+ enabled: true
107
+ project: samantha-pre-sft
108
+ run_name: t5gemma2-thoughtloop-pre-sft-simple-transcript
109
+
110
+ hub:
111
+ model_repo_id: BRlkl/test_multiturn_simple_transcript
112
+ private: false
sft_config.json ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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",
19
+ "dtype": "bfloat16",
20
+ "attn_implementation": "sdpa",
21
+ "magicnorm_eps": 1e-06,
22
+ "z_slots": 256,
23
+ "num_time_tokens": 0,
24
+ "use_explicit_time_features": false,
25
+ "gate_attention_heads": 4,
26
+ "max_observation_tokens": 1024,
27
+ "max_decoder_tokens": 1024,
28
+ "thought_loop_proposal_mode": "observation_hidden_compression",
29
+ "preserve_observation_encoder_manifold": true,
30
+ "observation_encoder_use_state_context": true,
31
+ "latent_attention_mask_mode": "full",
32
+ "hard_state_replace": true
33
+ },
34
+ "training": {
35
+ "seed": 17,
36
+ "num_workers": 2,
37
+ "gradient_checkpointing": true,
38
+ "mixed_precision": "bf16",
39
+ "max_grad_norm": 1.0,
40
+ "weight_decay": 0.01,
41
+ "backbone_learning_rate": 5e-06,
42
+ "new_module_learning_rate": 0.0001,
43
+ "adam_beta1": 0.9,
44
+ "adam_beta2": 0.95,
45
+ "adam_epsilon": 1e-08,
46
+ "fused_adamw": true,
47
+ "freeze_gate_head": true,
48
+ "assistant_feedback_mode": "teacher_forced",
49
+ "log_every_steps": 1,
50
+ "eval_every_steps": 200,
51
+ "checkpoint_every_steps": 500,
52
+ "eval_max_batches": 16,
53
+ "validation_behavior_max_batches": 4,
54
+ "max_train_examples": null,
55
+ "max_validation_examples": null,
56
+ "response_loss_weight": 0.5,
57
+ "probe_loss_weight": 0.5,
58
+ "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",
59
+ "feedback_generation_max_new_tokens": 1024,
60
+ "feedback_generation_extra_new_tokens": 16,
61
+ "validation_response_max_new_tokens": 1024,
62
+ "validation_response_extra_new_tokens": 16,
63
+ "validation_probe_max_new_tokens": 1024,
64
+ "validation_probe_extra_new_tokens": 16,
65
+ "wandb_train_metric_keys": [
66
+ "train/loss_total",
67
+ "train/loss_response",
68
+ "train/loss_probe",
69
+ "train/response_first_token_exact_match",
70
+ "train/probe_first_token_exact_match"
71
+ ],
72
+ "wandb_validation_metric_keys": [
73
+ "validation/loss_total",
74
+ "validation/loss_response",
75
+ "validation/loss_probe",
76
+ "validation/goal_loss",
77
+ "validation/response_exact_match",
78
+ "validation/probe_exact_match",
79
+ "validation/probe_transcript_similarity"
80
+ ],
81
+ "checkpoint_selection_metric": "validation/goal_loss",
82
+ "checkpoint_selection_mode": "min",
83
+ "validation_response_exact_miss_penalty": 1.0,
84
+ "validation_probe_exact_miss_penalty": 1.0,
85
+ "validation_probe_similarity_miss_penalty": 2.0
86
+ },
87
+ "phase": {
88
+ "micro_batch_size": 10,
89
+ "eval_batch_size": 10,
90
+ "gradient_accumulation_steps": 4,
91
+ "num_train_epochs": 3,
92
+ "warmup_ratio": 0.03,
93
+ "shuffle_train": true
94
+ },
95
+ "cache": {
96
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn_simple_transcript"
97
+ },
98
+ "paths": {
99
+ "run_root": "runs_pre_sft_multiturn_simple_transcript",
100
+ "export_root": "exports_multiturn_simple_transcript"
101
+ },
102
+ "inference": {
103
+ "format": "predictive_state_multiturn",
104
+ "use_base_chat_template": true
105
+ },
106
+ "wandb": {
107
+ "enabled": true,
108
+ "project": "samantha-pre-sft",
109
+ "run_name": "t5gemma2-thoughtloop-pre-sft-simple-transcript"
110
+ },
111
+ "hub": {
112
+ "model_repo_id": "BRlkl/test_multiturn_simple_transcript",
113
+ "private": false
114
+ }
115
+ }
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
+ }