BRlkl commited on
Commit
94fde8f
·
verified ·
1 Parent(s): eed27f2

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:27aaa4130913fa0db867d0f8bffebf834f839c8aabda29293fb934117f72e367
3
+ size 1048656
metrics.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "phase_results": [
3
+ {
4
+ "phase": "multiturn",
5
+ "best_validation_loss": 1.263322624167903,
6
+ "best_metrics": {
7
+ "loss": 1.263322624167903,
8
+ "token_count": 13229.0,
9
+ "example_count": 119.0,
10
+ "first_token_correct": 204.0,
11
+ "first_token_count": 455.0,
12
+ "first_token_exact_match": 0.44835164835164837
13
+ },
14
+ "global_step": 72,
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:3ad9dc72db8ee60a033b93e0e0e13da36e2b020f571de02c61dd04974e89d0d8
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,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: 0.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: 2
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_multiturn3
78
+ private: false
sft_config.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 25,
49
+ "checkpoint_every_steps": 250,
50
+ "max_train_examples": null,
51
+ "max_validation_examples": null,
52
+ "freeze_decoder_first_fraction": 0.0,
53
+ "probe_extra_new_tokens": 16
54
+ },
55
+ "phase": {
56
+ "micro_batch_size": 16,
57
+ "eval_batch_size": 16,
58
+ "gradient_accumulation_steps": 4,
59
+ "num_train_epochs": 2,
60
+ "warmup_ratio": 0.03,
61
+ "shuffle_train": true
62
+ },
63
+ "cache": {
64
+ "preprocessed_root": "cache/preprocessed_pre_sft_multiturn"
65
+ },
66
+ "paths": {
67
+ "run_root": "runs_pre_sft_multiturn",
68
+ "export_root": "exports_multiturn"
69
+ },
70
+ "inference": {
71
+ "format": "alpaca_single_turn",
72
+ "use_base_chat_template": true
73
+ },
74
+ "wandb": {
75
+ "enabled": true,
76
+ "project": "samantha-pre-sft",
77
+ "run_name": "t5gemma2-thoughtloop-pre-sft-everyday-all-turns"
78
+ },
79
+ "hub": {
80
+ "model_repo_id": "BRlkl/test_multiturn3",
81
+ "private": false
82
+ }
83
+ }
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
+ }