KotshinZ commited on
Commit
8ff980e
·
verified ·
1 Parent(s): 721d585

Model save

Browse files
PreTrainedRMTConfig.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import json
3
+ from transformers import PretrainedConfig
4
+
5
+ class PreTrainedRMTConfig(PretrainedConfig):
6
+ """
7
+ Recurrent Memory Transformer の設定クラス
8
+ """
9
+
10
+ model_type = "rmt"
11
+
12
+ # マッピング情報を追加(設定クラスとモデルクラスの関連付け)
13
+ auto_map = {
14
+ "AutoModelForCausalLM": "open_r1.rmt.RecurrentMemoryTransofomer.RecurrentMemoryTransformer"
15
+ }
16
+
17
+ def __init__(
18
+ self,
19
+ base_model_config=None,
20
+ is_memory_all=True,
21
+ max_n_segments=1,
22
+ input_seg_len=512,
23
+ output_seg_len=512,
24
+ align="left",
25
+ num_mem_tokens=10,
26
+ **kwargs
27
+ ):
28
+ super().__init__(**kwargs)
29
+ self.base_model_config = base_model_config
30
+ self.is_memory_all = is_memory_all
31
+ self.max_n_segments = max_n_segments
32
+ self.input_seg_len = input_seg_len
33
+ self.output_seg_len = output_seg_len
34
+ self.align = align
35
+ self.num_mem_tokens = num_mem_tokens
36
+
37
+ if base_model_config is not None:
38
+ if type(base_model_config) is not dict:
39
+ dict_config: dict = base_model_config.to_dict()
40
+ else:
41
+ dict_config: dict = base_model_config
42
+
43
+ for key, value in dict_config.items():
44
+ setattr(self, key, value)
45
+ self.base_model_type = dict_config.get("model_type")
46
+ if self.base_model_type is None:
47
+ raise ValueError("base_model_configにmodel_typeが指定されていません。")
48
+ PreTrainedRMTConfig.model_type = "rmt_" + self.base_model_type
49
+ """
50
+ def __repr__(self):
51
+ return f"PreTrainedRMTConfig(is_memory_all={self.is_memory_all}, max_n_segments={self.max_n_segments}, " \
52
+ f"input_seg_len={self.input_seg_len}, output_seg_len={self.output_seg_len}, " \
53
+ f"align='{self.align}', num_mem_tokens={self.num_mem_tokens})"
54
+ """
55
+
56
+ PreTrainedRMTConfig.register_for_auto_class()
README.md CHANGED
@@ -1,11 +1,9 @@
1
  ---
2
  base_model: openai-community/gpt2
3
- datasets: HuggingFaceFW/fineweb-edu
4
  library_name: transformers
5
  model_name: gpt2-RMT-2
6
  tags:
7
  - generated_from_trainer
8
- - open-r1
9
  - trl
10
  - sft
11
  licence: license
@@ -13,7 +11,7 @@ licence: license
13
 
14
  # Model Card for gpt2-RMT-2
15
 
16
- This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on the [HuggingFaceFW/fineweb-edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) dataset.
17
  It has been trained using [TRL](https://github.com/huggingface/trl).
18
 
19
  ## Quick start
@@ -29,7 +27,7 @@ print(output["generated_text"])
29
 
30
  ## Training procedure
31
 
32
- [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/s18574s18574-/huggingface/runs/r46ahkkj)
33
 
34
 
35
  This model was trained with SFT.
 
1
  ---
2
  base_model: openai-community/gpt2
 
3
  library_name: transformers
4
  model_name: gpt2-RMT-2
5
  tags:
6
  - generated_from_trainer
 
7
  - trl
8
  - sft
9
  licence: license
 
11
 
12
  # Model Card for gpt2-RMT-2
13
 
14
+ This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2).
15
  It has been trained using [TRL](https://github.com/huggingface/trl).
16
 
17
  ## Quick start
 
27
 
28
  ## Training procedure
29
 
30
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/shin2021001-osaka-city-university/huggingface/runs/5xyxy6y1)
31
 
32
 
33
  This model was trained with SFT.
RecurrentMemoryTransofomer.py ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import PreTrainedModel, AutoModelForCausalLM, AutoConfig
3
+ from transformers.models.auto.auto_factory import _BaseAutoModelClass
4
+ from open_r1.rmt.MemoryCell import MemoryCell
5
+ from open_r1.rmt.RecurrentWrapper import RecurrentWrapper
6
+ from open_r1.rmt.PreTrainedRMTConfig import PreTrainedRMTConfig
7
+
8
+
9
+ # @register_for_auto_class("AutoModelForCausalLM")
10
+ class RecurrentMemoryTransformer(PreTrainedModel):
11
+ """
12
+ Recurrent Memory Transformer モデルクラス
13
+ 長い文脈をセグメント単位で処理し、メモリを使って情報を保持するトランスフォーマーモデル
14
+ """
15
+
16
+ config_class = PreTrainedRMTConfig
17
+ auto_model_class = "AutoModelForCausalLM"
18
+
19
+ # マッピングを定義してAutoクラスが適切なモデルを見つけられるようにする
20
+ _keys_to_ignore_on_load_missing = [r"position_ids"]
21
+
22
+ # AUTO_MAPを定義(モデル名からクラスへのマッピング)
23
+ AUTO_MAP = {
24
+ "AutoModelForCausalLM": "RecurrentMemoryTransformer",
25
+ }
26
+
27
+ def __init__(self, config, base_model=None):
28
+ """
29
+ 初期化
30
+
31
+ Parameters
32
+ ----------
33
+ config : PreTrainedRMTConfig
34
+ モデルの設定
35
+ base_model : PreTrainedModel, optional
36
+ ベースとなるトランスフォーマーモデル
37
+ """
38
+ super().__init__(config)
39
+
40
+ # base_modelが指定されていない場合は、configから自動生成
41
+ if base_model is None:
42
+ # ベースモデルのタイプを確認
43
+ if not hasattr(config, "base_model_type"):
44
+ raise ValueError("configにbase_model_typeが指定されていません。RMTの設定にはベースモデルタイプが必要です。")
45
+ base_model_type = config.base_model_type
46
+
47
+ # ベースモデル用の設定を作成
48
+ base_config = AutoConfig.from_pretrained(base_model_type)
49
+
50
+ # RMT固有のパラメータを除外してベースモデルの設定を作成
51
+ rmt_specific_params = ['model_type', 'is_memory_all', 'max_n_segments', 'input_seg_len',
52
+ 'output_seg_len', 'align', 'num_mem_tokens', 'base_model_type']
53
+ for key, value in config.__dict__.items():
54
+ if key not in rmt_specific_params and not key.startswith('_'):
55
+ setattr(base_config, key, value)
56
+
57
+ # ベースモデルを作成
58
+ base_model = AutoModelForCausalLM.from_config(base_config)
59
+
60
+ # MemoryCellとRecurrentWrapperの初期化
61
+ memory_cell = MemoryCell(base_model, config.num_mem_tokens)
62
+ self.recurrent_wrapper = RecurrentWrapper(
63
+ memory_cell=memory_cell,
64
+ is_memory_all=config.is_memory_all,
65
+ max_n_segments=config.max_n_segments,
66
+ input_seg_len=config.input_seg_len,
67
+ output_seg_len=config.output_seg_len,
68
+ align=config.align
69
+ )
70
+
71
+ def get_base_model(self):
72
+ """
73
+ ベースモデルを取得
74
+ """
75
+ return self.recurrent_wrapper.memory_cell.model
76
+
77
+ def forward(self, input_ids=None, attention_mask=None, labels=None, labels_mask=None,
78
+ inputs_embeds=None, output_attentions=None, output_hidden_states=None):
79
+ """
80
+ モデルの順伝播
81
+
82
+ Parameters
83
+ ----------
84
+ input_ids : torch.Tensor, optional
85
+ 入力テンソル
86
+ attention_mask : torch.Tensor, optional
87
+ アテンションマスク
88
+ labels : torch.Tensor, optional
89
+ ラベルテンソル
90
+ labels_mask : torch.Tensor, optional
91
+ ラベルマスク
92
+ inputs_embeds : torch.Tensor, optional
93
+ 入力埋め込み
94
+ output_attentions : bool, optional
95
+ アテンション重みを出力するかどうか
96
+ output_hidden_states : bool, optional
97
+ 隠れ状態を出力するかどうか
98
+ """
99
+ forward_kwargs = {}
100
+ if input_ids is not None:
101
+ forward_kwargs["input_ids"] = input_ids
102
+ if labels is not None:
103
+ forward_kwargs["labels"] = labels
104
+ if attention_mask is not None:
105
+ forward_kwargs["attention_mask"] = attention_mask
106
+ if labels_mask is not None:
107
+ forward_kwargs["labels_mask"] = labels_mask
108
+ if inputs_embeds is not None:
109
+ forward_kwargs["inputs_embeds"] = inputs_embeds
110
+ if output_attentions is not None:
111
+ forward_kwargs["output_attentions"] = output_attentions
112
+ if output_hidden_states is not None:
113
+ forward_kwargs["output_hidden_states"] = output_hidden_states
114
+
115
+ #forward_kwargs.update(kwargs)
116
+
117
+ # 通常の順伝播処理
118
+ out = self.recurrent_wrapper.forward(**forward_kwargs)
119
+ """
120
+ # デバッグ出力を削除(または必要に応じてコメント化)
121
+ # print(out["loss"])
122
+
123
+ # 分散環境で損失が二重計算されないよう、ワールドサイズで割る
124
+ # これは処理済みの場合は不要なので、環境変数などで制御することも可能
125
+ if torch.distributed.is_initialized() and "loss" in out and out["loss"] is not None:
126
+ # 既にDeepSpeedが処理している可能性があるため、確認が必要
127
+ # テスト目的で一時的に追加(実際の環境に合わせて調整が必要)
128
+ # world_size = torch.distributed.get_world_size()
129
+ # out["loss"] = out["loss"] / world_size
130
+ pass
131
+ """
132
+ return out
133
+
134
+ def generate(self, **kwargs):
135
+ """
136
+ テキスト生成
137
+ """
138
+ return self.recurrent_wrapper.generate(**kwargs)
139
+
140
+ def generate_with_tokenizer(self, tokenizer, input_text, **kwargs):
141
+ """
142
+ トークナイザーを用いたテキスト生成
143
+ """
144
+ return self.recurrent_wrapper.generate_with_tokenizer(tokenizer, input_text, **kwargs)
145
+
146
+ def get_input_embeddings(self):
147
+ """
148
+ 入力埋め込みを取得
149
+ """
150
+ return self.get_base_model().get_input_embeddings()
151
+
152
+ def set_input_embeddings(self, embeddings):
153
+ """
154
+ 入力埋め込みを設定
155
+ """
156
+ self.get_base_model().set_input_embeddings(embeddings)
157
+
158
+ def get_output_embeddings(self):
159
+ """
160
+ 出力埋め込みを取得
161
+ """
162
+ return self.get_base_model().get_output_embeddings()
163
+
164
+ def resize_token_embeddings(self, new_num_tokens):
165
+ """
166
+ トークン埋め込みのサイズを変更
167
+ """
168
+ self.get_base_model().resize_token_embeddings(new_num_tokens)
169
+ return self.get_input_embeddings()
170
+
171
+ RecurrentMemoryTransformer.register_for_auto_class("AutoModelForCausalLM")
all_results.json CHANGED
@@ -3,10 +3,10 @@
3
  "eval_samples": 100,
4
  "eval_samples_per_second": 193.544,
5
  "eval_steps_per_second": 12.097,
6
- "total_flos": 541940076511232.0,
7
- "train_loss": 11.141571969696969,
8
- "train_runtime": 94.2109,
9
  "train_samples": 19883,
10
- "train_samples_per_second": 11.221,
11
- "train_steps_per_second": 0.35
12
  }
 
3
  "eval_samples": 100,
4
  "eval_samples_per_second": 193.544,
5
  "eval_steps_per_second": 12.097,
6
+ "total_flos": 5419400756723712.0,
7
+ "train_loss": 3.615518465909091,
8
+ "train_runtime": 337.9584,
9
  "train_samples": 19883,
10
+ "train_samples_per_second": 31.279,
11
+ "train_steps_per_second": 0.976
12
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f139c841af94b44aea936b1787cdb6832e0a84c3740b43cac34d0196953244ed
3
  size 248915448
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:203c58315e462136da93aea0cc81387cd50fe8ac5e3d6dca237c751d223ab4fd
3
  size 248915448
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "total_flos": 541940076511232.0,
3
- "train_loss": 11.141571969696969,
4
- "train_runtime": 94.2109,
5
  "train_samples": 19883,
6
- "train_samples_per_second": 11.221,
7
- "train_steps_per_second": 0.35
8
  }
 
1
  {
2
+ "total_flos": 5419400756723712.0,
3
+ "train_loss": 3.615518465909091,
4
+ "train_runtime": 337.9584,
5
  "train_samples": 19883,
6
+ "train_samples_per_second": 31.279,
7
+ "train_steps_per_second": 0.976
8
  }
trainer_state.json CHANGED
@@ -1,50 +1,310 @@
1
  {
2
  "best_metric": null,
3
  "best_model_checkpoint": null,
4
- "epoch": 0.09984871406959153,
5
  "eval_steps": 100,
6
- "global_step": 33,
7
  "is_hyper_param_search": false,
8
  "is_local_process_zero": true,
9
  "is_world_process_zero": true,
10
  "log_history": [
11
  {
12
  "epoch": 0.030257186081694403,
13
- "grad_norm": 39.661752788828096,
14
- "learning_rate": 1.796093065705644e-05,
15
- "loss": 13.7688,
16
- "mean_token_accuracy": 0.14352177157998086,
17
  "step": 10
18
  },
19
  {
20
  "epoch": 0.060514372163388806,
21
- "grad_norm": 21.083752762804057,
22
- "learning_rate": 8.382180034472353e-06,
23
- "loss": 10.7016,
24
- "mean_token_accuracy": 0.18965651467442513,
25
  "step": 20
26
  },
27
  {
28
  "epoch": 0.0907715582450832,
29
- "grad_norm": 16.256136796751306,
30
- "learning_rate": 5.234682881719766e-07,
31
- "loss": 9.5031,
32
- "mean_token_accuracy": 0.23370618522167205,
33
  "step": 30
34
  },
35
  {
36
- "epoch": 0.09984871406959153,
37
- "mean_token_accuracy": 0.23802571247021356,
38
- "step": 33,
39
- "total_flos": 541940076511232.0,
40
- "train_loss": 11.141571969696969,
41
- "train_runtime": 94.2109,
42
- "train_samples_per_second": 11.221,
43
- "train_steps_per_second": 0.35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
  ],
46
  "logging_steps": 10,
47
- "max_steps": 33,
48
  "num_input_tokens_seen": 0,
49
  "num_train_epochs": 1,
50
  "save_steps": 500,
@@ -60,7 +320,7 @@
60
  "attributes": {}
61
  }
62
  },
63
- "total_flos": 541940076511232.0,
64
  "train_batch_size": 8,
65
  "trial_name": null,
66
  "trial_params": null
 
1
  {
2
  "best_metric": null,
3
  "best_model_checkpoint": null,
4
+ "epoch": 0.9984871406959153,
5
  "eval_steps": 100,
6
+ "global_step": 330,
7
  "is_hyper_param_search": false,
8
  "is_local_process_zero": true,
9
  "is_world_process_zero": true,
10
  "log_history": [
11
  {
12
  "epoch": 0.030257186081694403,
13
+ "grad_norm": 48.18317253284181,
14
+ "learning_rate": 6.060606060606061e-06,
15
+ "loss": 7.4023,
16
+ "mean_token_accuracy": 0.13559286370873452,
17
  "step": 10
18
  },
19
  {
20
  "epoch": 0.060514372163388806,
21
+ "grad_norm": 25.86717975049105,
22
+ "learning_rate": 1.2121212121212122e-05,
23
+ "loss": 6.8148,
24
+ "mean_token_accuracy": 0.14477298334240912,
25
  "step": 20
26
  },
27
  {
28
  "epoch": 0.0907715582450832,
29
+ "grad_norm": 9.978340525429944,
30
+ "learning_rate": 1.8181818181818182e-05,
31
+ "loss": 5.6102,
32
+ "mean_token_accuracy": 0.17600756287574768,
33
  "step": 30
34
  },
35
  {
36
+ "epoch": 0.12102874432677761,
37
+ "grad_norm": 4.525649385270933,
38
+ "learning_rate": 1.9972599751485225e-05,
39
+ "loss": 4.6477,
40
+ "mean_token_accuracy": 0.2445007838308811,
41
+ "step": 40
42
+ },
43
+ {
44
+ "epoch": 0.15128593040847202,
45
+ "grad_norm": 3.175409164823092,
46
+ "learning_rate": 1.9838755799290993e-05,
47
+ "loss": 4.0312,
48
+ "mean_token_accuracy": 0.30081592202186586,
49
+ "step": 50
50
+ },
51
+ {
52
+ "epoch": 0.1815431164901664,
53
+ "grad_norm": 2.010787736128858,
54
+ "learning_rate": 1.9594929736144978e-05,
55
+ "loss": 3.6578,
56
+ "mean_token_accuracy": 0.33934821784496305,
57
+ "step": 60
58
+ },
59
+ {
60
+ "epoch": 0.2118003025718608,
61
+ "grad_norm": 1.1782901971905857,
62
+ "learning_rate": 1.9243847161266924e-05,
63
+ "loss": 3.3934,
64
+ "mean_token_accuracy": 0.371051961183548,
65
+ "step": 70
66
+ },
67
+ {
68
+ "epoch": 0.24205748865355523,
69
+ "grad_norm": 0.9889630793327328,
70
+ "learning_rate": 1.8789432636206197e-05,
71
+ "loss": 3.3324,
72
+ "mean_token_accuracy": 0.378506475687027,
73
+ "step": 80
74
+ },
75
+ {
76
+ "epoch": 0.2723146747352496,
77
+ "grad_norm": 0.8299178994463533,
78
+ "learning_rate": 1.8236765814298328e-05,
79
+ "loss": 3.2738,
80
+ "mean_token_accuracy": 0.38666853606700896,
81
+ "step": 90
82
+ },
83
+ {
84
+ "epoch": 0.30257186081694404,
85
+ "grad_norm": 0.8704351270978057,
86
+ "learning_rate": 1.7592024657977432e-05,
87
+ "loss": 3.282,
88
+ "mean_token_accuracy": 0.38509487807750703,
89
+ "step": 100
90
+ },
91
+ {
92
+ "epoch": 0.30257186081694404,
93
+ "eval_runtime": 0.225,
94
+ "eval_samples_per_second": 213.326,
95
+ "eval_steps_per_second": 13.333,
96
+ "step": 100
97
+ },
98
+ {
99
+ "epoch": 0.3328290468986384,
100
+ "grad_norm": 0.7957814410722591,
101
+ "learning_rate": 1.686241637868734e-05,
102
+ "loss": 3.2516,
103
+ "mean_token_accuracy": 0.39028556644916534,
104
+ "step": 110
105
+ },
106
+ {
107
+ "epoch": 0.3630862329803328,
108
+ "grad_norm": 0.7305776403219497,
109
+ "learning_rate": 1.6056096871376667e-05,
110
+ "loss": 3.2766,
111
+ "mean_token_accuracy": 0.38682268708944323,
112
+ "step": 120
113
+ },
114
+ {
115
+ "epoch": 0.39334341906202724,
116
+ "grad_norm": 0.7140945050608877,
117
+ "learning_rate": 1.5182079544175957e-05,
118
+ "loss": 3.25,
119
+ "mean_token_accuracy": 0.39047552198171614,
120
+ "step": 130
121
+ },
122
+ {
123
+ "epoch": 0.4236006051437216,
124
+ "grad_norm": 0.7281100436036338,
125
+ "learning_rate": 1.4250134562400301e-05,
126
+ "loss": 3.2254,
127
+ "mean_token_accuracy": 0.39294967502355577,
128
+ "step": 140
129
+ },
130
+ {
131
+ "epoch": 0.45385779122541603,
132
+ "grad_norm": 0.7678124673120136,
133
+ "learning_rate": 1.3270679633174219e-05,
134
+ "loss": 3.2156,
135
+ "mean_token_accuracy": 0.39464686065912247,
136
+ "step": 150
137
+ },
138
+ {
139
+ "epoch": 0.48411497730711045,
140
+ "grad_norm": 0.7134325713906087,
141
+ "learning_rate": 1.2254663551538047e-05,
142
+ "loss": 3.1895,
143
+ "mean_token_accuracy": 0.39698781073093414,
144
+ "step": 160
145
+ },
146
+ {
147
+ "epoch": 0.5143721633888049,
148
+ "grad_norm": 0.723513310530251,
149
+ "learning_rate": 1.121344380981082e-05,
150
+ "loss": 3.2254,
151
+ "mean_token_accuracy": 0.39353512674570085,
152
+ "step": 170
153
+ },
154
+ {
155
+ "epoch": 0.5446293494704992,
156
+ "grad_norm": 0.7185772760297996,
157
+ "learning_rate": 1.015865963834808e-05,
158
+ "loss": 3.1977,
159
+ "mean_token_accuracy": 0.39701825082302095,
160
+ "step": 180
161
+ },
162
+ {
163
+ "epoch": 0.5748865355521936,
164
+ "grad_norm": 0.6834580433094664,
165
+ "learning_rate": 9.102101896903084e-06,
166
+ "loss": 3.2086,
167
+ "mean_token_accuracy": 0.39654194712638857,
168
+ "step": 190
169
+ },
170
+ {
171
+ "epoch": 0.6051437216338881,
172
+ "grad_norm": 0.7155622236506424,
173
+ "learning_rate": 8.055581271005292e-06,
174
+ "loss": 3.2094,
175
+ "mean_token_accuracy": 0.3948154032230377,
176
+ "step": 200
177
+ },
178
+ {
179
+ "epoch": 0.6051437216338881,
180
+ "eval_runtime": 0.2213,
181
+ "eval_samples_per_second": 216.915,
182
+ "eval_steps_per_second": 13.557,
183
+ "step": 200
184
+ },
185
+ {
186
+ "epoch": 0.6354009077155824,
187
+ "grad_norm": 0.6809195871075517,
188
+ "learning_rate": 7.0307962467172555e-06,
189
+ "loss": 3.1988,
190
+ "mean_token_accuracy": 0.3979633778333664,
191
+ "step": 210
192
+ },
193
+ {
194
+ "epoch": 0.6656580937972768,
195
+ "grad_norm": 0.707315821198318,
196
+ "learning_rate": 6.039202339608432e-06,
197
+ "loss": 3.202,
198
+ "mean_token_accuracy": 0.3954067021608353,
199
+ "step": 220
200
+ },
201
+ {
202
+ "epoch": 0.6959152798789713,
203
+ "grad_norm": 0.6904494791556431,
204
+ "learning_rate": 5.091884039764321e-06,
205
+ "loss": 3.1965,
206
+ "mean_token_accuracy": 0.39610737562179565,
207
+ "step": 230
208
+ },
209
+ {
210
+ "epoch": 0.7261724659606656,
211
+ "grad_norm": 0.6699258512413571,
212
+ "learning_rate": 4.19943090428802e-06,
213
+ "loss": 3.2105,
214
+ "mean_token_accuracy": 0.39350710064172745,
215
+ "step": 240
216
+ },
217
+ {
218
+ "epoch": 0.75642965204236,
219
+ "grad_norm": 0.74188228093062,
220
+ "learning_rate": 3.37181918238904e-06,
221
+ "loss": 3.2074,
222
+ "mean_token_accuracy": 0.39521674066782,
223
+ "step": 250
224
+ },
225
+ {
226
+ "epoch": 0.7866868381240545,
227
+ "grad_norm": 0.6872378478922624,
228
+ "learning_rate": 2.618300296308135e-06,
229
+ "loss": 3.2215,
230
+ "mean_token_accuracy": 0.3938901349902153,
231
+ "step": 260
232
+ },
233
+ {
234
+ "epoch": 0.8169440242057489,
235
+ "grad_norm": 0.7136188203818471,
236
+ "learning_rate": 1.947297424689414e-06,
237
+ "loss": 3.1988,
238
+ "mean_token_accuracy": 0.39579751938581464,
239
+ "step": 270
240
+ },
241
+ {
242
+ "epoch": 0.8472012102874432,
243
+ "grad_norm": 0.6657712543261404,
244
+ "learning_rate": 1.3663113444380905e-06,
245
+ "loss": 3.202,
246
+ "mean_token_accuracy": 0.3932719826698303,
247
+ "step": 280
248
+ },
249
+ {
250
+ "epoch": 0.8774583963691377,
251
+ "grad_norm": 0.72900722083696,
252
+ "learning_rate": 8.818365836066101e-07,
253
+ "loss": 3.1625,
254
+ "mean_token_accuracy": 0.4012471452355385,
255
+ "step": 290
256
+ },
257
+ {
258
+ "epoch": 0.9077155824508321,
259
+ "grad_norm": 0.6725834304571868,
260
+ "learning_rate": 4.992888225905467e-07,
261
+ "loss": 3.2246,
262
+ "mean_token_accuracy": 0.3945300817489624,
263
+ "step": 300
264
+ },
265
+ {
266
+ "epoch": 0.9077155824508321,
267
+ "eval_runtime": 0.2212,
268
+ "eval_samples_per_second": 217.045,
269
+ "eval_steps_per_second": 13.565,
270
+ "step": 300
271
+ },
272
+ {
273
+ "epoch": 0.9379727685325264,
274
+ "grad_norm": 0.7015653789891463,
275
+ "learning_rate": 2.2294435517691504e-07,
276
+ "loss": 3.1926,
277
+ "mean_token_accuracy": 0.3973464578390121,
278
+ "step": 310
279
+ },
280
+ {
281
+ "epoch": 0.9682299546142209,
282
+ "grad_norm": 0.6744365913859031,
283
+ "learning_rate": 5.5892286176932875e-08,
284
+ "loss": 3.1965,
285
+ "mean_token_accuracy": 0.39635206162929537,
286
+ "step": 320
287
+ },
288
+ {
289
+ "epoch": 0.9984871406959153,
290
+ "grad_norm": 0.6617082977205768,
291
+ "learning_rate": 0.0,
292
+ "loss": 3.2031,
293
+ "mean_token_accuracy": 0.3948866441845894,
294
+ "step": 330
295
+ },
296
+ {
297
+ "epoch": 0.9984871406959153,
298
+ "step": 330,
299
+ "total_flos": 5419400756723712.0,
300
+ "train_loss": 3.615518465909091,
301
+ "train_runtime": 337.9584,
302
+ "train_samples_per_second": 31.279,
303
+ "train_steps_per_second": 0.976
304
  }
305
  ],
306
  "logging_steps": 10,
307
+ "max_steps": 330,
308
  "num_input_tokens_seen": 0,
309
  "num_train_epochs": 1,
310
  "save_steps": 500,
 
320
  "attributes": {}
321
  }
322
  },
323
+ "total_flos": 5419400756723712.0,
324
  "train_batch_size": 8,
325
  "trial_name": null,
326
  "trial_params": null
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e730128fa97641e51393b5facdd56eec2c7c21fa8e4909ab7c389ef5e29c0f5
3
  size 7352
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88757a2b8b1c49ba8b8f97161dacdb95ca6b6fd7a56d93df7f7c1df11e238bd7
3
  size 7352