BRlkl commited on
Commit
850dcdd
·
verified ·
1 Parent(s): 36b9a89

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:82777bd3d172cbb47fd317bf8029e7974ce866fa1414cbd87e2c92b3bd4223ba
3
+ size 1048656
metrics.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "multiturn",
5
+ "best_validation_loss": 2.652476119995117,
6
+ "best_metrics": {
7
+ "loss_total": 2.652476119995117,
8
+ "loss_decoder": 2.1608673334121704,
9
+ "loss_oracle_latent_mse": 0.2362155869603157,
10
+ "loss_oracle_latent_cosine": 0.005752995098009706,
11
+ "loss_oracle_first_token_kl": 0.254817932844162,
12
+ "first_token_correct": 96.0,
13
+ "first_token_count": 625.0,
14
+ "first_token_exact_match": 0.1536,
15
+ "state_teacher_forcing_ratio": 0.0
16
+ },
17
+ "oracle_preflight": {
18
+ "oracle_decoder_loss": 2.409222452066309,
19
+ "oracle_decoder_token_count": 24364.0,
20
+ "oracle_first_token_correct": 111.0,
21
+ "oracle_first_token_count": 625.0,
22
+ "oracle_first_token_exact_match": 0.1776,
23
+ "oracle_example_count": 151.0
24
+ },
25
+ "global_step": 363,
26
+ "train_dataset": {
27
+ "example_count": 7696,
28
+ "observation_steps_mean": 4.2548076923076925,
29
+ "observation_steps_max": 6,
30
+ "input_tokens_mean": 240.67255717255716,
31
+ "input_tokens_max": 1719,
32
+ "oracle_input_tokens_mean": 562.7067307692307,
33
+ "oracle_input_tokens_max": 3358,
34
+ "target_tokens_mean": 161.35044178794178,
35
+ "target_tokens_max": 1736,
36
+ "dataset_counts": {
37
+ "chatalpaca_multiturn_enriched": 7696
38
+ }
39
+ },
40
+ "validation_dataset": {
41
+ "example_count": 151,
42
+ "observation_steps_mean": 4.139072847682119,
43
+ "observation_steps_max": 6,
44
+ "input_tokens_mean": 236.91390728476821,
45
+ "input_tokens_max": 753,
46
+ "oracle_input_tokens_mean": 537.4238410596026,
47
+ "oracle_input_tokens_max": 1666,
48
+ "target_tokens_mean": 161.35099337748343,
49
+ "target_tokens_max": 912,
50
+ "dataset_counts": {
51
+ "chatalpaca_multiturn_enriched": 151
52
+ }
53
+ },
54
+ "wandb_enabled": true
55
+ }
56
+ ]
57
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa54c879ef2865c97be5750e0bdfe4d359aed282da52ec4fc1fa55a281d91cb6
3
+ size 2518360980
sft_b200.yaml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
16
+ teacher_model_path: BRlkl/test
17
+ dtype: bfloat16
18
+ attn_implementation: sdpa
19
+ magicnorm_eps: 1.0e-6
20
+ z_slots: 256
21
+ num_time_tokens: 0
22
+ use_explicit_time_features: false
23
+ gate_attention_heads: 4
24
+ max_observation_tokens: 1024
25
+ max_decoder_tokens: 1024
26
+ thought_loop_proposal_mode: observation_hidden_compression
27
+ preserve_observation_encoder_manifold: true
28
+ observation_encoder_use_state_context: true
29
+ latent_attention_mask_mode: full
30
+ initial_update_gate_bias: 20.0
31
+
32
+ training:
33
+ seed: 17
34
+ num_workers: 2
35
+ gradient_checkpointing: true
36
+ mixed_precision: bf16
37
+ max_grad_norm: 1.0
38
+ weight_decay: 0.01
39
+ backbone_learning_rate: 5.0e-6
40
+ new_module_learning_rate: 1.0e-4
41
+ adam_beta1: 0.9
42
+ adam_beta2: 0.95
43
+ adam_epsilon: 1.0e-8
44
+ fused_adamw: true
45
+ freeze_gate_head: true
46
+ log_every_steps: 1
47
+ eval_every_steps: 100
48
+ checkpoint_every_steps: 500
49
+ max_train_examples:
50
+ max_validation_examples:
51
+ freeze_decoder_first_fraction: 0.0
52
+ oracle_preflight_max_decoder_loss: 3.0
53
+ decoder_loss_weight: 1.0
54
+ oracle_latent_mse_weight: 1.0
55
+ oracle_latent_cosine_weight: 0.1
56
+ oracle_first_token_kl_weight: 1.0
57
+ oracle_first_token_kl_temperature: 1.0
58
+ state_teacher_forcing_start_ratio: 1.0
59
+ state_teacher_forcing_end_ratio: 0.0
60
+ state_teacher_forcing_end_fraction: 0.7
61
+ state_teacher_forcing_seed: 17
62
+ late_turn_weight_scale: 1.0
63
+ late_turn_weight_power: 1.0
64
+ student_observation_seed: 17
65
+ student_prev_assistant_dropout_prob: 0.0
66
+ student_prev_assistant_keep_last_chars:
67
+
68
+ phase:
69
+ micro_batch_size: 16
70
+ eval_batch_size: 16
71
+ gradient_accumulation_steps: 4
72
+ num_train_epochs: 3
73
+ warmup_ratio: 0.03
74
+ shuffle_train: true
75
+
76
+ cache:
77
+ preprocessed_root: cache/preprocessed_pre_sft_multiturn_chatalpaca_self_feedback
78
+
79
+ paths:
80
+ run_root: runs_pre_sft_multiturn
81
+ export_root: exports_multiturn
82
+
83
+ inference:
84
+ format: alpaca_single_turn
85
+ use_base_chat_template: true
86
+
87
+ wandb:
88
+ enabled: true
89
+ project: samantha-pre-sft
90
+ run_name: t5gemma2-thoughtloop-pre-sft-chatalpaca-self-feedback22
91
+
92
+ hub:
93
+ model_repo_id: BRlkl/test_multiturn_chatalpaca_self_feedback3333
94
+ private: false
sft_config.json ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "teacher_model_path": "BRlkl/test",
20
+ "dtype": "bfloat16",
21
+ "attn_implementation": "sdpa",
22
+ "magicnorm_eps": 1e-06,
23
+ "z_slots": 256,
24
+ "num_time_tokens": 0,
25
+ "use_explicit_time_features": false,
26
+ "gate_attention_heads": 4,
27
+ "max_observation_tokens": 1024,
28
+ "max_decoder_tokens": 1024,
29
+ "thought_loop_proposal_mode": "observation_hidden_compression",
30
+ "preserve_observation_encoder_manifold": true,
31
+ "observation_encoder_use_state_context": true,
32
+ "latent_attention_mask_mode": "full",
33
+ "initial_update_gate_bias": 20.0
34
+ },
35
+ "training": {
36
+ "seed": 17,
37
+ "num_workers": 2,
38
+ "gradient_checkpointing": true,
39
+ "mixed_precision": "bf16",
40
+ "max_grad_norm": 1.0,
41
+ "weight_decay": 0.01,
42
+ "backbone_learning_rate": 5e-06,
43
+ "new_module_learning_rate": 0.0001,
44
+ "adam_beta1": 0.9,
45
+ "adam_beta2": 0.95,
46
+ "adam_epsilon": 1e-08,
47
+ "fused_adamw": true,
48
+ "freeze_gate_head": true,
49
+ "log_every_steps": 1,
50
+ "eval_every_steps": 100,
51
+ "checkpoint_every_steps": 500,
52
+ "max_train_examples": null,
53
+ "max_validation_examples": null,
54
+ "freeze_decoder_first_fraction": 0.0,
55
+ "oracle_preflight_max_decoder_loss": 3.0,
56
+ "decoder_loss_weight": 1.0,
57
+ "oracle_latent_mse_weight": 1.0,
58
+ "oracle_latent_cosine_weight": 0.1,
59
+ "oracle_first_token_kl_weight": 1.0,
60
+ "oracle_first_token_kl_temperature": 1.0,
61
+ "state_teacher_forcing_start_ratio": 1.0,
62
+ "state_teacher_forcing_end_ratio": 0.0,
63
+ "state_teacher_forcing_end_fraction": 0.7,
64
+ "state_teacher_forcing_seed": 17,
65
+ "late_turn_weight_scale": 1.0,
66
+ "late_turn_weight_power": 1.0,
67
+ "student_observation_seed": 17,
68
+ "student_prev_assistant_dropout_prob": 0.0,
69
+ "student_prev_assistant_keep_last_chars": null
70
+ },
71
+ "phase": {
72
+ "micro_batch_size": 16,
73
+ "eval_batch_size": 16,
74
+ "gradient_accumulation_steps": 4,
75
+ "num_train_epochs": 3,
76
+ "warmup_ratio": 0.03,
77
+ "shuffle_train": true
78
+ },
79
+ "cache": {
80
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn_chatalpaca_self_feedback"
81
+ },
82
+ "paths": {
83
+ "run_root": "runs_pre_sft_multiturn",
84
+ "export_root": "exports_multiturn"
85
+ },
86
+ "inference": {
87
+ "format": "alpaca_single_turn",
88
+ "use_base_chat_template": true
89
+ },
90
+ "wandb": {
91
+ "enabled": true,
92
+ "project": "samantha-pre-sft",
93
+ "run_name": "t5gemma2-thoughtloop-pre-sft-chatalpaca-self-feedback22"
94
+ },
95
+ "hub": {
96
+ "model_repo_id": "BRlkl/test_multiturn_chatalpaca_self_feedback3333",
97
+ "private": false
98
+ }
99
+ }
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
+ }