nicholasKluge commited on
Commit
784fef8
1 Parent(s): 4c71624

Upload 15 files

Browse files
LICENSE.txt ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright Nicholas Kluge Corrêa
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
README.md CHANGED
@@ -16,11 +16,9 @@ tags:
16
  ---
17
  # RewardModel
18
 
19
- The `RewardModel` is a modified BERT model that can be used to score the quality of completion for a given prompt. It is based on a [BERT model](https://huggingface.co/bert-base-cased), modified to act as a regression model.
20
 
21
- The `RewardModel` allows the specification of an `alpha` parameter, which is a multiplier to the reward score. This multiplier is set to 1 during training (since our reward values are bounded between -1 and 1) but can be changed at inference to allow for rewards with higher bounds.
22
-
23
- The model was trained with a dataset composed of `prompt`, `completions`, and annotated `rewards`.
24
 
25
  > Note: These prompt + completions are samples of intruction datasets created via the [Self-Instruct](https://github.com/yizhongw/self-instruct) framework.
26
 
@@ -30,23 +28,30 @@ The model was trained with a dataset composed of `prompt`, `completions`, and an
30
  - **Dataset:** [Reward-Aira Dataset](https://huggingface.co/datasets/nicholasKluge/reward-aira-dataset)
31
  - **Language:** English
32
  - **Number of Epochs:** 5
33
- - **Batch size:** 64
34
- - **Optimizer:** `torch.optim.Adam`
35
- - **Learning Rate:** 1e-4
36
- - **Loss Function:** `torch.nn.MSELoss()`
37
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
38
- - **RMSE in testing:** 0.1190
39
- - **Emissions:** 0.21 KgCO2
40
- - **Total Energy Consumption:** 0.60 kWh
41
-
42
-
43
- | Epoch/Loss|Training|Validation|
44
- |---|---|---|
45
- | 1 |0.06136|0.031815|
46
- | 2 |0.030398|0.02459|
47
- | 3 |0.02389|0.026569|
48
- | 4 |0.024755|0.02109|
49
- | 5 |0.019445|0.01416|
 
 
 
 
 
 
 
 
50
 
51
  > Note: This repository has the notebook used to train this model.
52
 
@@ -55,64 +60,60 @@ The model was trained with a dataset composed of `prompt`, `completions`, and an
55
  Here's an example of how to use the `RewardModel` to score the quality of a response to a given prompt:
56
 
57
  ```python
58
- from transformers import AutoTokenizer,AutoConfig, AutoModel
59
  import torch
60
 
61
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
62
 
63
- config = AutoConfig.from_pretrained('nicholasKluge/RewardModel', trust_remote_code=True, revision='main')
64
- tokenizer = AutoTokenizer.from_pretrained('nicholasKluge/RewardModel', trust_remote_code=True, config=config, revision='main')
65
- rewardModel = AutoModel.from_pretrained('nicholasKluge/RewardModel', trust_remote_code=True, config=config, revision='main')
66
 
67
  rewardModel.eval()
68
  rewardModel.to(device)
69
 
70
  # Define the question and response
71
- question = "What is the capital of France?"
72
- response1 = "Paris, France's capital, is a major European city and a global center for art, fashion, gastronomy and culture."
73
- response2 = "Google it pal."
74
 
75
  # Tokenize the question and response
76
- tokens = tokenizer(question, response1,
 
 
77
  return_token_type_ids=False,
78
- return_tensors="pt",
79
  return_attention_mask=True)
80
 
81
- tokens.to(device)
82
-
83
- # Score the response
84
- score = rewardModel(**tokens, alpha=10).item()
85
-
86
- print(f"Question: {question} \n")
87
- print(f"Response 1: {response1} Score: {score:.3f}")
88
-
89
- tokens = tokenizer(question, response2,
90
  return_token_type_ids=False,
91
- return_tensors="pt",
92
  return_attention_mask=True)
93
 
94
- tokens.to(device)
95
-
96
- score = rewardModel(**tokens, alpha=10).item()
97
 
98
- print(f"Response 2: {response2} Score: {score:.3f}")
 
 
99
  ```
100
 
101
  This will output the following:
102
 
103
  ```markdown
104
- >>> Question: What is the capital of France?
105
 
106
- >>>Response: Paris, France's capital, is a major European city and a global center for art, fashion, gastronomy and culture. Score: 3.183
107
- >>>Response: Google it pal. Score: -5.781
108
  ```
109
 
110
  ## Performance
111
 
112
  | Acc | [WebGPT](https://huggingface.co/datasets/openai/webgpt_comparisons) |
113
  |---|---|
114
- | [Aira-RewardModel](https://huggingface.co/nicholasKluge/RewardModel) | 53.54% |
115
 
116
  ## License
117
 
118
- The `RewardModel` is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
 
16
  ---
17
  # RewardModel
18
 
19
+ The `RewardModel` is a [BERT](https://huggingface.co/bert-base-cased)model that can be used to score the quality of a completion for a given prompt.
20
 
21
+ The model was trained with a dataset composed of `prompt`, `prefered_completions`, and `rejected_completions`.
 
 
22
 
23
  > Note: These prompt + completions are samples of intruction datasets created via the [Self-Instruct](https://github.com/yizhongw/self-instruct) framework.
24
 
 
28
  - **Dataset:** [Reward-Aira Dataset](https://huggingface.co/datasets/nicholasKluge/reward-aira-dataset)
29
  - **Language:** English
30
  - **Number of Epochs:** 5
31
+ - **Batch size:** 42
32
+ - **Optimizer:** `torch.optim.AdamW`
33
+ - **Learning Rate:** 5e-5
 
34
  - **GPU:** 1 NVIDIA A100-SXM4-40GB
35
+ - **Emissions:** 0.17 KgCO2
36
+ - **Total Energy Consumption:** 0.48 kWh
37
+
38
+ | Step|Training Loss|Validation Loss|Accuracy|
39
+ |---|---|---|---|
40
+ | 200 |0.080300|0.037106|0.987499|
41
+ | 400 |0.039300|0.036421|0.988433|
42
+ | 600 |0.037200|0.041799|0.986447|
43
+ | 800 |0.011400|0.039411|0.989602|
44
+ | 1000 |0.013800|0.039781|0.989718|
45
+ | 1200 |0.012700|0.034337|0.990887|
46
+ | 1400 |0.005200|0.037403|0.991120|
47
+ | 1600 |0.001800|0.047661|0.990653|
48
+ | 1800 |0.000900|0.051354|0.991237|
49
+ | 2000 |0.001000|0.046224|0.990419|
50
+ | 2200 |0.000200|0.046582|0.991120|
51
+ | 2400 |0.000600|0.046632|0.990536|
52
+ | 2600 |0.000100|0.051437|0.990770|
53
+ | 2800 |0.000500|0.049085|0.990887|
54
+ | 3000 |0.000400|0.049938|0.991004|
55
 
56
  > Note: This repository has the notebook used to train this model.
57
 
 
60
  Here's an example of how to use the `RewardModel` to score the quality of a response to a given prompt:
61
 
62
  ```python
63
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
64
  import torch
65
 
66
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
67
 
68
+ tokenizer = AutoTokenizer.from_pretrained("nicholasKluge/RewardModel")
69
+ rewardModel = AutoModelForSequenceClassification.from_pretrained("nicholasKluge/RewardModel")
 
70
 
71
  rewardModel.eval()
72
  rewardModel.to(device)
73
 
74
  # Define the question and response
75
+ prompt = "Why is AI Ethics important?"
76
+ response_good = "The field of AI Ethics delves deeply into the intricate ethical considerations that arise with respect to AI systems. This includes the role of humanity in creating and deploying these systems, as well as the conduct of machines themselves. Broadly speaking, AI Ethics can be divided into two major categories : concerns surrounding the morality of human actions in relation to creating and using AI, and concerns regarding the moral implications of machine behavior."
77
+ response_bad = "Who cares about AI Ethics? It's just a bunch of whining about humans making and using AI and bitching about what the machines do."
78
 
79
  # Tokenize the question and response
80
+ tokens_good = tokenizer(prompt, response_good,
81
+ truncation=True,
82
+ max_length=512,
83
  return_token_type_ids=False,
84
+ return_tensors="pt",
85
  return_attention_mask=True)
86
 
87
+ tokens_bad = tokenizer(prompt, response_bad,
88
+ truncation=True,
89
+ max_length=512,
 
 
 
 
 
 
90
  return_token_type_ids=False,
91
+ return_tensors="pt",
92
  return_attention_mask=True)
93
 
94
+ score_good = rewardModel(**tokens_good)[0].item()
95
+ score_bad = rewardModel(**tokens_bad)[0].item()
 
96
 
97
+ print(f"Question: {prompt} \n")
98
+ print(f"Response 1: {response_good} Score: {score_good:.3f}")
99
+ print(f"Response 2: {response_bad} Score: {score_bad:.3f}")
100
  ```
101
 
102
  This will output the following:
103
 
104
  ```markdown
105
+ >>> Question: Why is AI Ethics important?
106
 
107
+ >>>Response 1: The field of AI Ethics delves deeply into the intricate ethical considerations that arise with respect to AI systems. This includes the role of humanity in creating and deploying these systems, as well as the conduct of machines themselves. Broadly speaking, AI Ethics can be divided into two major categories : concerns surrounding the morality of human actions in relation to creating and using AI, and concerns regarding the moral implications of machine behavior. Score: 4.777
108
+ >>>Response 2: Who cares about AI Ethics? It's just a bunch of whining about humans making and using AI and bitching about what the machines do. Score: -11.582
109
  ```
110
 
111
  ## Performance
112
 
113
  | Acc | [WebGPT](https://huggingface.co/datasets/openai/webgpt_comparisons) |
114
  |---|---|
115
+ | [Aira-RewardModel](https://huggingface.co/nicholasKluge/RewardModel) | 96.54% |
116
 
117
  ## License
118
 
119
+ The `RewardModel` is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more details.
RewardModel.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
RewardModel_emissions.csv ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ timestamp,project_name,run_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,on_cloud,pue
2
+ 2023-06-13T15:03:57,RewardModel_emissions,34e3fabc-108d-42d0-8a10-d218a32c89f6,4812.4118773937225,0.17002787857474966,3.5331115230068865e-05,42.5,273.41,31.30528450012207,0.056805772867467685,0.3882571562884012,0.04180739816835735,0.4868703273242265,United States,USA,nevada,,,Linux-5.15.107+-x86_64-with-glibc2.31,3.10.12,2.2.3,12,Intel(R) Xeon(R) CPU @ 2.20GHz,1,1 x NVIDIA A100-SXM4-40GB,-115.1164,36.1685,83.48075866699219,machine,N,1.0
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-cased",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.30.1",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 28996
32
+ }
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c52bed61e330ec59d12c04564eb6df59e95ccd9bad6cc5adf5e754358c57566
3
+ size 866606277
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41545686d6ccaf2f3efe0173dacc4c4634b0ade6710f046361ab31987f195591
3
+ size 433316981
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:008304bdd46c688bbf5feaf85cbcc083837da7f9be6bf363f309170ac62a6d4e
3
+ size 14575
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24c083a5f4303f0b59a009934c6dcb05a44520e05c10e837a7e2149a6d4a68d1
3
+ size 627
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clean_up_tokenization_spaces": true,
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 512,
7
+ "pad_token": "[PAD]",
8
+ "sep_token": "[SEP]",
9
+ "strip_accents": null,
10
+ "tokenize_chinese_chars": true,
11
+ "tokenizer_class": "BertTokenizer",
12
+ "unk_token": "[UNK]"
13
+ }
trainer_state.json ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 4.901960784313726,
5
+ "global_step": 3000,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.33,
12
+ "learning_rate": 4.673202614379085e-05,
13
+ "loss": 0.0803,
14
+ "step": 200
15
+ },
16
+ {
17
+ "epoch": 0.33,
18
+ "eval_accuracy": 0.9874985395490128,
19
+ "eval_loss": 0.03710582107305527,
20
+ "eval_runtime": 80.6999,
21
+ "eval_samples_per_second": 106.06,
22
+ "eval_steps_per_second": 2.528,
23
+ "step": 200
24
+ },
25
+ {
26
+ "epoch": 0.65,
27
+ "learning_rate": 4.3464052287581704e-05,
28
+ "loss": 0.0393,
29
+ "step": 400
30
+ },
31
+ {
32
+ "epoch": 0.65,
33
+ "eval_accuracy": 0.9884332281808622,
34
+ "eval_loss": 0.03642109036445618,
35
+ "eval_runtime": 80.6008,
36
+ "eval_samples_per_second": 106.19,
37
+ "eval_steps_per_second": 2.531,
38
+ "step": 400
39
+ },
40
+ {
41
+ "epoch": 0.98,
42
+ "learning_rate": 4.0196078431372555e-05,
43
+ "loss": 0.0372,
44
+ "step": 600
45
+ },
46
+ {
47
+ "epoch": 0.98,
48
+ "eval_accuracy": 0.986447014838182,
49
+ "eval_loss": 0.04179869592189789,
50
+ "eval_runtime": 80.6457,
51
+ "eval_samples_per_second": 106.131,
52
+ "eval_steps_per_second": 2.53,
53
+ "step": 600
54
+ },
55
+ {
56
+ "epoch": 1.31,
57
+ "learning_rate": 3.6928104575163405e-05,
58
+ "loss": 0.0114,
59
+ "step": 800
60
+ },
61
+ {
62
+ "epoch": 1.31,
63
+ "eval_accuracy": 0.9896015889706742,
64
+ "eval_loss": 0.0394107885658741,
65
+ "eval_runtime": 80.6065,
66
+ "eval_samples_per_second": 106.182,
67
+ "eval_steps_per_second": 2.531,
68
+ "step": 800
69
+ },
70
+ {
71
+ "epoch": 1.63,
72
+ "learning_rate": 3.366013071895425e-05,
73
+ "loss": 0.0138,
74
+ "step": 1000
75
+ },
76
+ {
77
+ "epoch": 1.63,
78
+ "eval_accuracy": 0.9897184250496553,
79
+ "eval_loss": 0.0397811159491539,
80
+ "eval_runtime": 80.5677,
81
+ "eval_samples_per_second": 106.234,
82
+ "eval_steps_per_second": 2.532,
83
+ "step": 1000
84
+ },
85
+ {
86
+ "epoch": 1.96,
87
+ "learning_rate": 3.0392156862745097e-05,
88
+ "loss": 0.0127,
89
+ "step": 1200
90
+ },
91
+ {
92
+ "epoch": 1.96,
93
+ "eval_accuracy": 0.9908867858394672,
94
+ "eval_loss": 0.034337081015110016,
95
+ "eval_runtime": 80.5302,
96
+ "eval_samples_per_second": 106.283,
97
+ "eval_steps_per_second": 2.533,
98
+ "step": 1200
99
+ },
100
+ {
101
+ "epoch": 2.29,
102
+ "learning_rate": 2.7124183006535947e-05,
103
+ "loss": 0.0052,
104
+ "step": 1400
105
+ },
106
+ {
107
+ "epoch": 2.29,
108
+ "eval_accuracy": 0.9911204579974296,
109
+ "eval_loss": 0.037403274327516556,
110
+ "eval_runtime": 80.6258,
111
+ "eval_samples_per_second": 106.157,
112
+ "eval_steps_per_second": 2.53,
113
+ "step": 1400
114
+ },
115
+ {
116
+ "epoch": 2.61,
117
+ "learning_rate": 2.38562091503268e-05,
118
+ "loss": 0.0018,
119
+ "step": 1600
120
+ },
121
+ {
122
+ "epoch": 2.61,
123
+ "eval_accuracy": 0.9906531136815049,
124
+ "eval_loss": 0.04766124114394188,
125
+ "eval_runtime": 80.6271,
126
+ "eval_samples_per_second": 106.155,
127
+ "eval_steps_per_second": 2.53,
128
+ "step": 1600
129
+ },
130
+ {
131
+ "epoch": 2.94,
132
+ "learning_rate": 2.058823529411765e-05,
133
+ "loss": 0.0009,
134
+ "step": 1800
135
+ },
136
+ {
137
+ "epoch": 2.94,
138
+ "eval_accuracy": 0.9912372940764108,
139
+ "eval_loss": 0.0513538159430027,
140
+ "eval_runtime": 80.6405,
141
+ "eval_samples_per_second": 106.138,
142
+ "eval_steps_per_second": 2.53,
143
+ "step": 1800
144
+ },
145
+ {
146
+ "epoch": 3.27,
147
+ "learning_rate": 1.7320261437908496e-05,
148
+ "loss": 0.001,
149
+ "step": 2000
150
+ },
151
+ {
152
+ "epoch": 3.27,
153
+ "eval_accuracy": 0.9904194415235424,
154
+ "eval_loss": 0.046223659068346024,
155
+ "eval_runtime": 80.5163,
156
+ "eval_samples_per_second": 106.301,
157
+ "eval_steps_per_second": 2.534,
158
+ "step": 2000
159
+ },
160
+ {
161
+ "epoch": 3.59,
162
+ "learning_rate": 1.4052287581699347e-05,
163
+ "loss": 0.0002,
164
+ "step": 2200
165
+ },
166
+ {
167
+ "epoch": 3.59,
168
+ "eval_accuracy": 0.9911204579974296,
169
+ "eval_loss": 0.04658184573054314,
170
+ "eval_runtime": 80.6281,
171
+ "eval_samples_per_second": 106.154,
172
+ "eval_steps_per_second": 2.53,
173
+ "step": 2200
174
+ },
175
+ {
176
+ "epoch": 3.92,
177
+ "learning_rate": 1.0784313725490197e-05,
178
+ "loss": 0.0006,
179
+ "step": 2400
180
+ },
181
+ {
182
+ "epoch": 3.92,
183
+ "eval_accuracy": 0.9905362776025236,
184
+ "eval_loss": 0.046631619334220886,
185
+ "eval_runtime": 80.5126,
186
+ "eval_samples_per_second": 106.306,
187
+ "eval_steps_per_second": 2.534,
188
+ "step": 2400
189
+ },
190
+ {
191
+ "epoch": 4.25,
192
+ "learning_rate": 7.5163398692810456e-06,
193
+ "loss": 0.0001,
194
+ "step": 2600
195
+ },
196
+ {
197
+ "epoch": 4.25,
198
+ "eval_accuracy": 0.990769949760486,
199
+ "eval_loss": 0.05143677070736885,
200
+ "eval_runtime": 80.6039,
201
+ "eval_samples_per_second": 106.186,
202
+ "eval_steps_per_second": 2.531,
203
+ "step": 2600
204
+ },
205
+ {
206
+ "epoch": 4.58,
207
+ "learning_rate": 4.2483660130718954e-06,
208
+ "loss": 0.0005,
209
+ "step": 2800
210
+ },
211
+ {
212
+ "epoch": 4.58,
213
+ "eval_accuracy": 0.9908867858394672,
214
+ "eval_loss": 0.04908544197678566,
215
+ "eval_runtime": 80.4782,
216
+ "eval_samples_per_second": 106.352,
217
+ "eval_steps_per_second": 2.535,
218
+ "step": 2800
219
+ },
220
+ {
221
+ "epoch": 4.9,
222
+ "learning_rate": 9.80392156862745e-07,
223
+ "loss": 0.0004,
224
+ "step": 3000
225
+ },
226
+ {
227
+ "epoch": 4.9,
228
+ "eval_accuracy": 0.9910036219184484,
229
+ "eval_loss": 0.049937766045331955,
230
+ "eval_runtime": 80.6026,
231
+ "eval_samples_per_second": 106.188,
232
+ "eval_steps_per_second": 2.531,
233
+ "step": 3000
234
+ }
235
+ ],
236
+ "max_steps": 3060,
237
+ "num_train_epochs": 5,
238
+ "total_flos": 0.0,
239
+ "trial_name": null,
240
+ "trial_params": null
241
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6715260d8f8dc2d9b6f203feba5b1e85999035d08e8d456813784a2d7ce39f95
3
+ size 4027
vocab.txt ADDED
The diff for this file is too large to render. See raw diff