wangrongsheng
commited on
Commit
·
030ec9c
1
Parent(s):
5944a68
add EN
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- LLM-Detector-44w-EN/README.md +56 -0
- LLM-Detector-44w-EN/adapter_config.json +22 -0
- LLM-Detector-44w-EN/adapter_model.bin +3 -0
- LLM-Detector-44w-EN/all_results.json +7 -0
- LLM-Detector-44w-EN/checkpoint-10000/README.md +207 -0
- LLM-Detector-44w-EN/checkpoint-10000/adapter_config.json +22 -0
- LLM-Detector-44w-EN/checkpoint-10000/adapter_model.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-10000/optimizer.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-10000/qwen.tiktoken +0 -0
- LLM-Detector-44w-EN/checkpoint-10000/rng_state.pth +3 -0
- LLM-Detector-44w-EN/checkpoint-10000/scheduler.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-10000/special_tokens_map.json +7 -0
- LLM-Detector-44w-EN/checkpoint-10000/tokenization_qwen.py +276 -0
- LLM-Detector-44w-EN/checkpoint-10000/tokenizer_config.json +13 -0
- LLM-Detector-44w-EN/checkpoint-10000/trainer_state.json +619 -0
- LLM-Detector-44w-EN/checkpoint-10000/training_args.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-15000/README.md +207 -0
- LLM-Detector-44w-EN/checkpoint-15000/adapter_config.json +22 -0
- LLM-Detector-44w-EN/checkpoint-15000/adapter_model.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-15000/optimizer.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-15000/qwen.tiktoken +0 -0
- LLM-Detector-44w-EN/checkpoint-15000/rng_state.pth +3 -0
- LLM-Detector-44w-EN/checkpoint-15000/scheduler.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-15000/special_tokens_map.json +7 -0
- LLM-Detector-44w-EN/checkpoint-15000/tokenization_qwen.py +276 -0
- LLM-Detector-44w-EN/checkpoint-15000/tokenizer_config.json +13 -0
- LLM-Detector-44w-EN/checkpoint-15000/trainer_state.json +919 -0
- LLM-Detector-44w-EN/checkpoint-15000/training_args.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-20000/README.md +207 -0
- LLM-Detector-44w-EN/checkpoint-20000/adapter_config.json +22 -0
- LLM-Detector-44w-EN/checkpoint-20000/adapter_model.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-20000/optimizer.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-20000/qwen.tiktoken +0 -0
- LLM-Detector-44w-EN/checkpoint-20000/rng_state.pth +3 -0
- LLM-Detector-44w-EN/checkpoint-20000/scheduler.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-20000/special_tokens_map.json +7 -0
- LLM-Detector-44w-EN/checkpoint-20000/tokenization_qwen.py +276 -0
- LLM-Detector-44w-EN/checkpoint-20000/tokenizer_config.json +13 -0
- LLM-Detector-44w-EN/checkpoint-20000/trainer_state.json +1219 -0
- LLM-Detector-44w-EN/checkpoint-20000/training_args.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-25000/README.md +207 -0
- LLM-Detector-44w-EN/checkpoint-25000/adapter_config.json +22 -0
- LLM-Detector-44w-EN/checkpoint-25000/adapter_model.bin +3 -0
- LLM-Detector-44w-EN/checkpoint-25000/optimizer.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-25000/qwen.tiktoken +0 -0
- LLM-Detector-44w-EN/checkpoint-25000/rng_state.pth +3 -0
- LLM-Detector-44w-EN/checkpoint-25000/scheduler.pt +3 -0
- LLM-Detector-44w-EN/checkpoint-25000/special_tokens_map.json +7 -0
- LLM-Detector-44w-EN/checkpoint-25000/tokenization_qwen.py +276 -0
- LLM-Detector-44w-EN/checkpoint-25000/tokenizer_config.json +13 -0
LLM-Detector-44w-EN/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
base_model: ./Qwen-1_8B-Chat
|
4 |
+
tags:
|
5 |
+
- llama-factory
|
6 |
+
- lora
|
7 |
+
- generated_from_trainer
|
8 |
+
model-index:
|
9 |
+
- name: qwen-1.8b-deepfake
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# qwen-1.8b-deepfake
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [./Qwen-1_8B-Chat](https://huggingface.co/./Qwen-1_8B-Chat) on the df dataset.
|
19 |
+
|
20 |
+
## Model description
|
21 |
+
|
22 |
+
More information needed
|
23 |
+
|
24 |
+
## Intended uses & limitations
|
25 |
+
|
26 |
+
More information needed
|
27 |
+
|
28 |
+
## Training and evaluation data
|
29 |
+
|
30 |
+
More information needed
|
31 |
+
|
32 |
+
## Training procedure
|
33 |
+
|
34 |
+
### Training hyperparameters
|
35 |
+
|
36 |
+
The following hyperparameters were used during training:
|
37 |
+
- learning_rate: 5e-05
|
38 |
+
- train_batch_size: 8
|
39 |
+
- eval_batch_size: 8
|
40 |
+
- seed: 42
|
41 |
+
- gradient_accumulation_steps: 4
|
42 |
+
- total_train_batch_size: 32
|
43 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
44 |
+
- lr_scheduler_type: cosine
|
45 |
+
- num_epochs: 3.0
|
46 |
+
|
47 |
+
### Training results
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
### Framework versions
|
52 |
+
|
53 |
+
- Transformers 4.33.0
|
54 |
+
- Pytorch 2.1.1+cu121
|
55 |
+
- Datasets 2.14.7
|
56 |
+
- Tokenizers 0.13.3
|
LLM-Detector-44w-EN/adapter_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "./Qwen-1_8B-Chat",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"lora_alpha": 16.0,
|
12 |
+
"lora_dropout": 0.1,
|
13 |
+
"modules_to_save": null,
|
14 |
+
"peft_type": "LORA",
|
15 |
+
"r": 8,
|
16 |
+
"rank_pattern": {},
|
17 |
+
"revision": null,
|
18 |
+
"target_modules": [
|
19 |
+
"c_attn"
|
20 |
+
],
|
21 |
+
"task_type": "CAUSAL_LM"
|
22 |
+
}
|
LLM-Detector-44w-EN/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7313389f2f7fe453280142487569a71a98cce4c20f6ba8b25f2f9a10d6f0a10a
|
3 |
+
size 6308670
|
LLM-Detector-44w-EN/all_results.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"train_loss": 0.05192308982466081,
|
4 |
+
"train_runtime": 264704.0502,
|
5 |
+
"train_samples_per_second": 4.904,
|
6 |
+
"train_steps_per_second": 0.153
|
7 |
+
}
|
LLM-Detector-44w-EN/checkpoint-10000/README.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
base_model: ./Qwen-1_8B-Chat
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Shared by [optional]:** [More Information Needed]
|
22 |
+
- **Model type:** [More Information Needed]
|
23 |
+
- **Language(s) (NLP):** [More Information Needed]
|
24 |
+
- **License:** [More Information Needed]
|
25 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
26 |
+
|
27 |
+
### Model Sources [optional]
|
28 |
+
|
29 |
+
<!-- Provide the basic links for the model. -->
|
30 |
+
|
31 |
+
- **Repository:** [More Information Needed]
|
32 |
+
- **Paper [optional]:** [More Information Needed]
|
33 |
+
- **Demo [optional]:** [More Information Needed]
|
34 |
+
|
35 |
+
## Uses
|
36 |
+
|
37 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
+
|
39 |
+
### Direct Use
|
40 |
+
|
41 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
+
|
43 |
+
[More Information Needed]
|
44 |
+
|
45 |
+
### Downstream Use [optional]
|
46 |
+
|
47 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
+
|
49 |
+
[More Information Needed]
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
+
|
55 |
+
[More Information Needed]
|
56 |
+
|
57 |
+
## Bias, Risks, and Limitations
|
58 |
+
|
59 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
+
|
61 |
+
[More Information Needed]
|
62 |
+
|
63 |
+
### Recommendations
|
64 |
+
|
65 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
+
|
67 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
68 |
+
|
69 |
+
## How to Get Started with the Model
|
70 |
+
|
71 |
+
Use the code below to get started with the model.
|
72 |
+
|
73 |
+
[More Information Needed]
|
74 |
+
|
75 |
+
## Training Details
|
76 |
+
|
77 |
+
### Training Data
|
78 |
+
|
79 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
### Training Procedure
|
84 |
+
|
85 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
+
|
87 |
+
#### Preprocessing [optional]
|
88 |
+
|
89 |
+
[More Information Needed]
|
90 |
+
|
91 |
+
|
92 |
+
#### Training Hyperparameters
|
93 |
+
|
94 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
95 |
+
|
96 |
+
#### Speeds, Sizes, Times [optional]
|
97 |
+
|
98 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
## Evaluation
|
103 |
+
|
104 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
105 |
+
|
106 |
+
### Testing Data, Factors & Metrics
|
107 |
+
|
108 |
+
#### Testing Data
|
109 |
+
|
110 |
+
<!-- This should link to a Data Card if possible. -->
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Factors
|
115 |
+
|
116 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
#### Metrics
|
121 |
+
|
122 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Results
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
#### Summary
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
## Model Examination [optional]
|
135 |
+
|
136 |
+
<!-- Relevant interpretability work for the model goes here -->
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
## Environmental Impact
|
141 |
+
|
142 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
143 |
+
|
144 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
145 |
+
|
146 |
+
- **Hardware Type:** [More Information Needed]
|
147 |
+
- **Hours used:** [More Information Needed]
|
148 |
+
- **Cloud Provider:** [More Information Needed]
|
149 |
+
- **Compute Region:** [More Information Needed]
|
150 |
+
- **Carbon Emitted:** [More Information Needed]
|
151 |
+
|
152 |
+
## Technical Specifications [optional]
|
153 |
+
|
154 |
+
### Model Architecture and Objective
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
### Compute Infrastructure
|
159 |
+
|
160 |
+
[More Information Needed]
|
161 |
+
|
162 |
+
#### Hardware
|
163 |
+
|
164 |
+
[More Information Needed]
|
165 |
+
|
166 |
+
#### Software
|
167 |
+
|
168 |
+
[More Information Needed]
|
169 |
+
|
170 |
+
## Citation [optional]
|
171 |
+
|
172 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
173 |
+
|
174 |
+
**BibTeX:**
|
175 |
+
|
176 |
+
[More Information Needed]
|
177 |
+
|
178 |
+
**APA:**
|
179 |
+
|
180 |
+
[More Information Needed]
|
181 |
+
|
182 |
+
## Glossary [optional]
|
183 |
+
|
184 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
185 |
+
|
186 |
+
[More Information Needed]
|
187 |
+
|
188 |
+
## More Information [optional]
|
189 |
+
|
190 |
+
[More Information Needed]
|
191 |
+
|
192 |
+
## Model Card Authors [optional]
|
193 |
+
|
194 |
+
[More Information Needed]
|
195 |
+
|
196 |
+
## Model Card Contact
|
197 |
+
|
198 |
+
[More Information Needed]
|
199 |
+
|
200 |
+
|
201 |
+
## Training procedure
|
202 |
+
|
203 |
+
|
204 |
+
### Framework versions
|
205 |
+
|
206 |
+
|
207 |
+
- PEFT 0.6.2
|
LLM-Detector-44w-EN/checkpoint-10000/adapter_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "./Qwen-1_8B-Chat",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"lora_alpha": 16.0,
|
12 |
+
"lora_dropout": 0.1,
|
13 |
+
"modules_to_save": null,
|
14 |
+
"peft_type": "LORA",
|
15 |
+
"r": 8,
|
16 |
+
"rank_pattern": {},
|
17 |
+
"revision": null,
|
18 |
+
"target_modules": [
|
19 |
+
"c_attn"
|
20 |
+
],
|
21 |
+
"task_type": "CAUSAL_LM"
|
22 |
+
}
|
LLM-Detector-44w-EN/checkpoint-10000/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:78608cfbb6ea330c0e64fbd48525138e3ac4323e39f7eab19edfdd566ba2962e
|
3 |
+
size 6308670
|
LLM-Detector-44w-EN/checkpoint-10000/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16f2adcf695963a604c175611a7f7a5c592a789764ce264e138f125d610ad9a4
|
3 |
+
size 12623610
|
LLM-Detector-44w-EN/checkpoint-10000/qwen.tiktoken
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LLM-Detector-44w-EN/checkpoint-10000/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce73e53cece6c81c88f4ba1fbf614a65143e271e5eb8ef956133078ca0c21a69
|
3 |
+
size 14244
|
LLM-Detector-44w-EN/checkpoint-10000/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:837d56630b1e5c783a00e38f82bd5ffd484240d093f73e7220e094b83452858b
|
3 |
+
size 1064
|
LLM-Detector-44w-EN/checkpoint-10000/special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_end|>"
|
4 |
+
],
|
5 |
+
"eos_token": "<|endoftext|>",
|
6 |
+
"pad_token": "<|endoftext|>"
|
7 |
+
}
|
LLM-Detector-44w-EN/checkpoint-10000/tokenization_qwen.py
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Alibaba Cloud.
|
2 |
+
#
|
3 |
+
# This source code is licensed under the license found in the
|
4 |
+
# LICENSE file in the root directory of this source tree.
|
5 |
+
|
6 |
+
"""Tokenization classes for QWen."""
|
7 |
+
|
8 |
+
import base64
|
9 |
+
import logging
|
10 |
+
import os
|
11 |
+
import unicodedata
|
12 |
+
from typing import Collection, Dict, List, Set, Tuple, Union
|
13 |
+
|
14 |
+
import tiktoken
|
15 |
+
from transformers import PreTrainedTokenizer, AddedToken
|
16 |
+
|
17 |
+
logger = logging.getLogger(__name__)
|
18 |
+
|
19 |
+
|
20 |
+
VOCAB_FILES_NAMES = {"vocab_file": "qwen.tiktoken"}
|
21 |
+
|
22 |
+
PAT_STR = r"""(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"""
|
23 |
+
ENDOFTEXT = "<|endoftext|>"
|
24 |
+
IMSTART = "<|im_start|>"
|
25 |
+
IMEND = "<|im_end|>"
|
26 |
+
# as the default behavior is changed to allow special tokens in
|
27 |
+
# regular texts, the surface forms of special tokens need to be
|
28 |
+
# as different as possible to minimize the impact
|
29 |
+
EXTRAS = tuple((f"<|extra_{i}|>" for i in range(205)))
|
30 |
+
# changed to use actual index to avoid misconfiguration with vocabulary expansion
|
31 |
+
SPECIAL_START_ID = 151643
|
32 |
+
SPECIAL_TOKENS = tuple(
|
33 |
+
enumerate(
|
34 |
+
(
|
35 |
+
(
|
36 |
+
ENDOFTEXT,
|
37 |
+
IMSTART,
|
38 |
+
IMEND,
|
39 |
+
)
|
40 |
+
+ EXTRAS
|
41 |
+
),
|
42 |
+
start=SPECIAL_START_ID,
|
43 |
+
)
|
44 |
+
)
|
45 |
+
SPECIAL_TOKENS_SET = set(t for i, t in SPECIAL_TOKENS)
|
46 |
+
|
47 |
+
|
48 |
+
def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]:
|
49 |
+
with open(tiktoken_bpe_file, "rb") as f:
|
50 |
+
contents = f.read()
|
51 |
+
return {
|
52 |
+
base64.b64decode(token): int(rank)
|
53 |
+
for token, rank in (line.split() for line in contents.splitlines() if line)
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
class QWenTokenizer(PreTrainedTokenizer):
|
58 |
+
"""QWen tokenizer."""
|
59 |
+
|
60 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
61 |
+
|
62 |
+
def __init__(
|
63 |
+
self,
|
64 |
+
vocab_file,
|
65 |
+
errors="replace",
|
66 |
+
extra_vocab_file=None,
|
67 |
+
**kwargs,
|
68 |
+
):
|
69 |
+
super().__init__(**kwargs)
|
70 |
+
|
71 |
+
# how to handle errors in decoding UTF-8 byte sequences
|
72 |
+
# use ignore if you are in streaming inference
|
73 |
+
self.errors = errors
|
74 |
+
|
75 |
+
self.mergeable_ranks = _load_tiktoken_bpe(vocab_file) # type: Dict[bytes, int]
|
76 |
+
self.special_tokens = {
|
77 |
+
token: index
|
78 |
+
for index, token in SPECIAL_TOKENS
|
79 |
+
}
|
80 |
+
|
81 |
+
# try load extra vocab from file
|
82 |
+
if extra_vocab_file is not None:
|
83 |
+
used_ids = set(self.mergeable_ranks.values()) | set(self.special_tokens.values())
|
84 |
+
extra_mergeable_ranks = _load_tiktoken_bpe(extra_vocab_file)
|
85 |
+
for token, index in extra_mergeable_ranks.items():
|
86 |
+
if token in self.mergeable_ranks:
|
87 |
+
logger.info(f"extra token {token} exists, skipping")
|
88 |
+
continue
|
89 |
+
if index in used_ids:
|
90 |
+
logger.info(f'the index {index} for extra token {token} exists, skipping')
|
91 |
+
continue
|
92 |
+
self.mergeable_ranks[token] = index
|
93 |
+
# the index may be sparse after this, but don't worry tiktoken.Encoding will handle this
|
94 |
+
|
95 |
+
enc = tiktoken.Encoding(
|
96 |
+
"Qwen",
|
97 |
+
pat_str=PAT_STR,
|
98 |
+
mergeable_ranks=self.mergeable_ranks,
|
99 |
+
special_tokens=self.special_tokens,
|
100 |
+
)
|
101 |
+
assert (
|
102 |
+
len(self.mergeable_ranks) + len(self.special_tokens) == enc.n_vocab
|
103 |
+
), f"{len(self.mergeable_ranks) + len(self.special_tokens)} != {enc.n_vocab} in encoding"
|
104 |
+
|
105 |
+
self.decoder = {
|
106 |
+
v: k for k, v in self.mergeable_ranks.items()
|
107 |
+
} # type: dict[int, bytes|str]
|
108 |
+
self.decoder.update({v: k for k, v in self.special_tokens.items()})
|
109 |
+
|
110 |
+
self.tokenizer = enc # type: tiktoken.Encoding
|
111 |
+
|
112 |
+
self.eod_id = self.tokenizer.eot_token
|
113 |
+
self.im_start_id = self.special_tokens[IMSTART]
|
114 |
+
self.im_end_id = self.special_tokens[IMEND]
|
115 |
+
|
116 |
+
def __getstate__(self):
|
117 |
+
# for pickle lovers
|
118 |
+
state = self.__dict__.copy()
|
119 |
+
del state["tokenizer"]
|
120 |
+
return state
|
121 |
+
|
122 |
+
def __setstate__(self, state):
|
123 |
+
# tokenizer is not python native; don't pass it; rebuild it
|
124 |
+
self.__dict__.update(state)
|
125 |
+
enc = tiktoken.Encoding(
|
126 |
+
"Qwen",
|
127 |
+
pat_str=PAT_STR,
|
128 |
+
mergeable_ranks=self.mergeable_ranks,
|
129 |
+
special_tokens=self.special_tokens,
|
130 |
+
)
|
131 |
+
self.tokenizer = enc
|
132 |
+
|
133 |
+
def __len__(self) -> int:
|
134 |
+
return self.tokenizer.n_vocab
|
135 |
+
|
136 |
+
def get_vocab(self) -> Dict[bytes, int]:
|
137 |
+
return self.mergeable_ranks
|
138 |
+
|
139 |
+
def convert_tokens_to_ids(
|
140 |
+
self, tokens: Union[bytes, str, List[Union[bytes, str]]]
|
141 |
+
) -> List[int]:
|
142 |
+
ids = []
|
143 |
+
if isinstance(tokens, (str, bytes)):
|
144 |
+
if tokens in self.special_tokens:
|
145 |
+
return self.special_tokens[tokens]
|
146 |
+
else:
|
147 |
+
return self.mergeable_ranks.get(tokens)
|
148 |
+
for token in tokens:
|
149 |
+
if token in self.special_tokens:
|
150 |
+
ids.append(self.special_tokens[token])
|
151 |
+
else:
|
152 |
+
ids.append(self.mergeable_ranks.get(token))
|
153 |
+
return ids
|
154 |
+
|
155 |
+
def _add_tokens(
|
156 |
+
self,
|
157 |
+
new_tokens: Union[List[str], List[AddedToken]],
|
158 |
+
special_tokens: bool = False,
|
159 |
+
) -> int:
|
160 |
+
if not special_tokens and new_tokens:
|
161 |
+
raise ValueError("Adding regular tokens is not supported")
|
162 |
+
for token in new_tokens:
|
163 |
+
surface_form = token.content if isinstance(token, AddedToken) else token
|
164 |
+
if surface_form not in SPECIAL_TOKENS_SET:
|
165 |
+
raise ValueError("Adding unknown special tokens is not supported")
|
166 |
+
return 0
|
167 |
+
|
168 |
+
def save_vocabulary(self, save_directory: str, **kwargs) -> Tuple[str]:
|
169 |
+
"""
|
170 |
+
Save only the vocabulary of the tokenizer (vocabulary).
|
171 |
+
|
172 |
+
Returns:
|
173 |
+
`Tuple(str)`: Paths to the files saved.
|
174 |
+
"""
|
175 |
+
file_path = os.path.join(save_directory, "qwen.tiktoken")
|
176 |
+
with open(file_path, "w", encoding="utf8") as w:
|
177 |
+
for k, v in self.mergeable_ranks.items():
|
178 |
+
line = base64.b64encode(k).decode("utf8") + " " + str(v) + "\n"
|
179 |
+
w.write(line)
|
180 |
+
return (file_path,)
|
181 |
+
|
182 |
+
def tokenize(
|
183 |
+
self,
|
184 |
+
text: str,
|
185 |
+
allowed_special: Union[Set, str] = "all",
|
186 |
+
disallowed_special: Union[Collection, str] = (),
|
187 |
+
**kwargs,
|
188 |
+
) -> List[Union[bytes, str]]:
|
189 |
+
"""
|
190 |
+
Converts a string in a sequence of tokens.
|
191 |
+
|
192 |
+
Args:
|
193 |
+
text (`str`):
|
194 |
+
The sequence to be encoded.
|
195 |
+
allowed_special (`Literal["all"]` or `set`):
|
196 |
+
The surface forms of the tokens to be encoded as special tokens in regular texts.
|
197 |
+
Default to "all".
|
198 |
+
disallowed_special (`Literal["all"]` or `Collection`):
|
199 |
+
The surface forms of the tokens that should not be in regular texts and trigger errors.
|
200 |
+
Default to an empty tuple.
|
201 |
+
|
202 |
+
kwargs (additional keyword arguments, *optional*):
|
203 |
+
Will be passed to the underlying model specific encode method.
|
204 |
+
|
205 |
+
Returns:
|
206 |
+
`List[bytes|str]`: The list of tokens.
|
207 |
+
"""
|
208 |
+
tokens = []
|
209 |
+
text = unicodedata.normalize("NFC", text)
|
210 |
+
|
211 |
+
# this implementation takes a detour: text -> token id -> token surface forms
|
212 |
+
for t in self.tokenizer.encode(
|
213 |
+
text, allowed_special=allowed_special, disallowed_special=disallowed_special
|
214 |
+
):
|
215 |
+
tokens.append(self.decoder[t])
|
216 |
+
return tokens
|
217 |
+
|
218 |
+
def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) -> str:
|
219 |
+
"""
|
220 |
+
Converts a sequence of tokens in a single string.
|
221 |
+
"""
|
222 |
+
text = ""
|
223 |
+
temp = b""
|
224 |
+
for t in tokens:
|
225 |
+
if isinstance(t, str):
|
226 |
+
if temp:
|
227 |
+
text += temp.decode("utf-8", errors=self.errors)
|
228 |
+
temp = b""
|
229 |
+
text += t
|
230 |
+
elif isinstance(t, bytes):
|
231 |
+
temp += t
|
232 |
+
else:
|
233 |
+
raise TypeError("token should only be of type types or str")
|
234 |
+
if temp:
|
235 |
+
text += temp.decode("utf-8", errors=self.errors)
|
236 |
+
return text
|
237 |
+
|
238 |
+
@property
|
239 |
+
def vocab_size(self):
|
240 |
+
return self.tokenizer.n_vocab
|
241 |
+
|
242 |
+
def _convert_id_to_token(self, index: int) -> Union[bytes, str]:
|
243 |
+
"""Converts an id to a token, special tokens included"""
|
244 |
+
if index in self.decoder:
|
245 |
+
return self.decoder[index]
|
246 |
+
raise ValueError("unknown ids")
|
247 |
+
|
248 |
+
def _convert_token_to_id(self, token: Union[bytes, str]) -> int:
|
249 |
+
"""Converts a token to an id using the vocab, special tokens included"""
|
250 |
+
if token in self.special_tokens:
|
251 |
+
return self.special_tokens[token]
|
252 |
+
if token in self.mergeable_ranks:
|
253 |
+
return self.mergeable_ranks[token]
|
254 |
+
raise ValueError("unknown token")
|
255 |
+
|
256 |
+
def _tokenize(self, text: str, **kwargs):
|
257 |
+
"""
|
258 |
+
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based
|
259 |
+
vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).
|
260 |
+
|
261 |
+
Do NOT take care of added tokens.
|
262 |
+
"""
|
263 |
+
raise NotImplementedError
|
264 |
+
|
265 |
+
def _decode(
|
266 |
+
self,
|
267 |
+
token_ids: Union[int, List[int]],
|
268 |
+
skip_special_tokens: bool = False,
|
269 |
+
errors: str = None,
|
270 |
+
**kwargs,
|
271 |
+
) -> str:
|
272 |
+
if isinstance(token_ids, int):
|
273 |
+
token_ids = [token_ids]
|
274 |
+
if skip_special_tokens:
|
275 |
+
token_ids = [i for i in token_ids if i < self.eod_id]
|
276 |
+
return self.tokenizer.decode(token_ids, errors=errors or self.errors)
|
LLM-Detector-44w-EN/checkpoint-10000/tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoTokenizer": [
|
4 |
+
"tokenization_qwen.QWenTokenizer",
|
5 |
+
null
|
6 |
+
]
|
7 |
+
},
|
8 |
+
"clean_up_tokenization_spaces": true,
|
9 |
+
"model_max_length": 8192,
|
10 |
+
"padding_side": "right",
|
11 |
+
"split_special_tokens": false,
|
12 |
+
"tokenizer_class": "QWenTokenizer"
|
13 |
+
}
|
LLM-Detector-44w-EN/checkpoint-10000/trainer_state.json
ADDED
@@ -0,0 +1,619 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 0.7395629183152757,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 10000,
|
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.01,
|
13 |
+
"learning_rate": 4.999925019651876e-05,
|
14 |
+
"loss": 3.2124,
|
15 |
+
"step": 100
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.01,
|
19 |
+
"learning_rate": 4.9997000831051485e-05,
|
20 |
+
"loss": 0.2834,
|
21 |
+
"step": 200
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.02,
|
25 |
+
"learning_rate": 4.999325203852471e-05,
|
26 |
+
"loss": 0.2178,
|
27 |
+
"step": 300
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.03,
|
31 |
+
"learning_rate": 4.998800404380707e-05,
|
32 |
+
"loss": 0.1782,
|
33 |
+
"step": 400
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.04,
|
37 |
+
"learning_rate": 4.9981257161695735e-05,
|
38 |
+
"loss": 0.1501,
|
39 |
+
"step": 500
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.04,
|
43 |
+
"learning_rate": 4.997301179689756e-05,
|
44 |
+
"loss": 0.1376,
|
45 |
+
"step": 600
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 0.05,
|
49 |
+
"learning_rate": 4.996326844400481e-05,
|
50 |
+
"loss": 0.1161,
|
51 |
+
"step": 700
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.06,
|
55 |
+
"learning_rate": 4.9952027687465465e-05,
|
56 |
+
"loss": 0.1163,
|
57 |
+
"step": 800
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 0.07,
|
61 |
+
"learning_rate": 4.9939290201548214e-05,
|
62 |
+
"loss": 0.1157,
|
63 |
+
"step": 900
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 0.07,
|
67 |
+
"learning_rate": 4.992505675030195e-05,
|
68 |
+
"loss": 0.1048,
|
69 |
+
"step": 1000
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 0.08,
|
73 |
+
"learning_rate": 4.9909328187509964e-05,
|
74 |
+
"loss": 0.1073,
|
75 |
+
"step": 1100
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"epoch": 0.09,
|
79 |
+
"learning_rate": 4.989210545663877e-05,
|
80 |
+
"loss": 0.1047,
|
81 |
+
"step": 1200
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"epoch": 0.1,
|
85 |
+
"learning_rate": 4.987338959078144e-05,
|
86 |
+
"loss": 0.1066,
|
87 |
+
"step": 1300
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"epoch": 0.1,
|
91 |
+
"learning_rate": 4.9853181712595686e-05,
|
92 |
+
"loss": 0.1011,
|
93 |
+
"step": 1400
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 0.11,
|
97 |
+
"learning_rate": 4.98314830342365e-05,
|
98 |
+
"loss": 0.0947,
|
99 |
+
"step": 1500
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 0.12,
|
103 |
+
"learning_rate": 4.9808294857283454e-05,
|
104 |
+
"loss": 0.0916,
|
105 |
+
"step": 1600
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"epoch": 0.13,
|
109 |
+
"learning_rate": 4.97836185726626e-05,
|
110 |
+
"loss": 0.0933,
|
111 |
+
"step": 1700
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"epoch": 0.13,
|
115 |
+
"learning_rate": 4.9757455660563085e-05,
|
116 |
+
"loss": 0.089,
|
117 |
+
"step": 1800
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"epoch": 0.14,
|
121 |
+
"learning_rate": 4.9729807690348297e-05,
|
122 |
+
"loss": 0.0872,
|
123 |
+
"step": 1900
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"epoch": 0.15,
|
127 |
+
"learning_rate": 4.9700676320461794e-05,
|
128 |
+
"loss": 0.0898,
|
129 |
+
"step": 2000
|
130 |
+
},
|
131 |
+
{
|
132 |
+
"epoch": 0.16,
|
133 |
+
"learning_rate": 4.9670376756771875e-05,
|
134 |
+
"loss": 0.0894,
|
135 |
+
"step": 2100
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 0.16,
|
139 |
+
"learning_rate": 4.963829870746861e-05,
|
140 |
+
"loss": 0.0859,
|
141 |
+
"step": 2200
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"epoch": 0.17,
|
145 |
+
"learning_rate": 4.960474274759395e-05,
|
146 |
+
"loss": 0.0826,
|
147 |
+
"step": 2300
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 0.18,
|
151 |
+
"learning_rate": 4.956971088997792e-05,
|
152 |
+
"loss": 0.0816,
|
153 |
+
"step": 2400
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 0.18,
|
157 |
+
"learning_rate": 4.953320523598123e-05,
|
158 |
+
"loss": 0.074,
|
159 |
+
"step": 2500
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 0.19,
|
163 |
+
"learning_rate": 4.9495227975369186e-05,
|
164 |
+
"loss": 0.0896,
|
165 |
+
"step": 2600
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 0.2,
|
169 |
+
"learning_rate": 4.945578138618039e-05,
|
170 |
+
"loss": 0.0768,
|
171 |
+
"step": 2700
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 0.21,
|
175 |
+
"learning_rate": 4.941486783459001e-05,
|
176 |
+
"loss": 0.0779,
|
177 |
+
"step": 2800
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 0.21,
|
181 |
+
"learning_rate": 4.937248977476793e-05,
|
182 |
+
"loss": 0.0814,
|
183 |
+
"step": 2900
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 0.22,
|
187 |
+
"learning_rate": 4.9328649748731495e-05,
|
188 |
+
"loss": 0.0727,
|
189 |
+
"step": 3000
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"epoch": 0.23,
|
193 |
+
"learning_rate": 4.928335038619302e-05,
|
194 |
+
"loss": 0.0806,
|
195 |
+
"step": 3100
|
196 |
+
},
|
197 |
+
{
|
198 |
+
"epoch": 0.24,
|
199 |
+
"learning_rate": 4.9236594404402104e-05,
|
200 |
+
"loss": 0.0709,
|
201 |
+
"step": 3200
|
202 |
+
},
|
203 |
+
{
|
204 |
+
"epoch": 0.24,
|
205 |
+
"learning_rate": 4.9188384607982565e-05,
|
206 |
+
"loss": 0.0746,
|
207 |
+
"step": 3300
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"epoch": 0.25,
|
211 |
+
"learning_rate": 4.913872388876427e-05,
|
212 |
+
"loss": 0.0805,
|
213 |
+
"step": 3400
|
214 |
+
},
|
215 |
+
{
|
216 |
+
"epoch": 0.26,
|
217 |
+
"learning_rate": 4.908761522560962e-05,
|
218 |
+
"loss": 0.0726,
|
219 |
+
"step": 3500
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"epoch": 0.27,
|
223 |
+
"learning_rate": 4.903506168423491e-05,
|
224 |
+
"loss": 0.0715,
|
225 |
+
"step": 3600
|
226 |
+
},
|
227 |
+
{
|
228 |
+
"epoch": 0.27,
|
229 |
+
"learning_rate": 4.898106641702639e-05,
|
230 |
+
"loss": 0.0751,
|
231 |
+
"step": 3700
|
232 |
+
},
|
233 |
+
{
|
234 |
+
"epoch": 0.28,
|
235 |
+
"learning_rate": 4.892563266285121e-05,
|
236 |
+
"loss": 0.0818,
|
237 |
+
"step": 3800
|
238 |
+
},
|
239 |
+
{
|
240 |
+
"epoch": 0.29,
|
241 |
+
"learning_rate": 4.886876374686313e-05,
|
242 |
+
"loss": 0.0651,
|
243 |
+
"step": 3900
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"epoch": 0.3,
|
247 |
+
"learning_rate": 4.881046308030303e-05,
|
248 |
+
"loss": 0.0806,
|
249 |
+
"step": 4000
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"epoch": 0.3,
|
253 |
+
"learning_rate": 4.87513385076558e-05,
|
254 |
+
"loss": 0.0803,
|
255 |
+
"step": 4100
|
256 |
+
},
|
257 |
+
{
|
258 |
+
"epoch": 0.31,
|
259 |
+
"learning_rate": 4.869019914568559e-05,
|
260 |
+
"loss": 0.0717,
|
261 |
+
"step": 4200
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"epoch": 0.32,
|
265 |
+
"learning_rate": 4.8627638744212125e-05,
|
266 |
+
"loss": 0.0678,
|
267 |
+
"step": 4300
|
268 |
+
},
|
269 |
+
{
|
270 |
+
"epoch": 0.33,
|
271 |
+
"learning_rate": 4.8563661055875955e-05,
|
272 |
+
"loss": 0.0681,
|
273 |
+
"step": 4400
|
274 |
+
},
|
275 |
+
{
|
276 |
+
"epoch": 0.33,
|
277 |
+
"learning_rate": 4.849826991833256e-05,
|
278 |
+
"loss": 0.0668,
|
279 |
+
"step": 4500
|
280 |
+
},
|
281 |
+
{
|
282 |
+
"epoch": 0.34,
|
283 |
+
"learning_rate": 4.8431469254022146e-05,
|
284 |
+
"loss": 0.0717,
|
285 |
+
"step": 4600
|
286 |
+
},
|
287 |
+
{
|
288 |
+
"epoch": 0.35,
|
289 |
+
"learning_rate": 4.8363263069934364e-05,
|
290 |
+
"loss": 0.0681,
|
291 |
+
"step": 4700
|
292 |
+
},
|
293 |
+
{
|
294 |
+
"epoch": 0.35,
|
295 |
+
"learning_rate": 4.829365545736794e-05,
|
296 |
+
"loss": 0.0703,
|
297 |
+
"step": 4800
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"epoch": 0.36,
|
301 |
+
"learning_rate": 4.8222650591685316e-05,
|
302 |
+
"loss": 0.0625,
|
303 |
+
"step": 4900
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"epoch": 0.37,
|
307 |
+
"learning_rate": 4.815025273206212e-05,
|
308 |
+
"loss": 0.066,
|
309 |
+
"step": 5000
|
310 |
+
},
|
311 |
+
{
|
312 |
+
"epoch": 0.38,
|
313 |
+
"learning_rate": 4.807646622123172e-05,
|
314 |
+
"loss": 0.0707,
|
315 |
+
"step": 5100
|
316 |
+
},
|
317 |
+
{
|
318 |
+
"epoch": 0.38,
|
319 |
+
"learning_rate": 4.800129548522474e-05,
|
320 |
+
"loss": 0.061,
|
321 |
+
"step": 5200
|
322 |
+
},
|
323 |
+
{
|
324 |
+
"epoch": 0.39,
|
325 |
+
"learning_rate": 4.7924745033103533e-05,
|
326 |
+
"loss": 0.0645,
|
327 |
+
"step": 5300
|
328 |
+
},
|
329 |
+
{
|
330 |
+
"epoch": 0.4,
|
331 |
+
"learning_rate": 4.784681945669176e-05,
|
332 |
+
"loss": 0.0669,
|
333 |
+
"step": 5400
|
334 |
+
},
|
335 |
+
{
|
336 |
+
"epoch": 0.41,
|
337 |
+
"learning_rate": 4.776752343029888e-05,
|
338 |
+
"loss": 0.059,
|
339 |
+
"step": 5500
|
340 |
+
},
|
341 |
+
{
|
342 |
+
"epoch": 0.41,
|
343 |
+
"learning_rate": 4.768686171043982e-05,
|
344 |
+
"loss": 0.0641,
|
345 |
+
"step": 5600
|
346 |
+
},
|
347 |
+
{
|
348 |
+
"epoch": 0.42,
|
349 |
+
"learning_rate": 4.760483913554966e-05,
|
350 |
+
"loss": 0.0619,
|
351 |
+
"step": 5700
|
352 |
+
},
|
353 |
+
{
|
354 |
+
"epoch": 0.43,
|
355 |
+
"learning_rate": 4.7522301106315205e-05,
|
356 |
+
"loss": 0.0616,
|
357 |
+
"step": 5800
|
358 |
+
},
|
359 |
+
{
|
360 |
+
"epoch": 0.44,
|
361 |
+
"learning_rate": 4.7437585147204955e-05,
|
362 |
+
"loss": 0.0625,
|
363 |
+
"step": 5900
|
364 |
+
},
|
365 |
+
{
|
366 |
+
"epoch": 0.44,
|
367 |
+
"learning_rate": 4.7351523285738384e-05,
|
368 |
+
"loss": 0.0594,
|
369 |
+
"step": 6000
|
370 |
+
},
|
371 |
+
{
|
372 |
+
"epoch": 0.45,
|
373 |
+
"learning_rate": 4.726412068427418e-05,
|
374 |
+
"loss": 0.0616,
|
375 |
+
"step": 6100
|
376 |
+
},
|
377 |
+
{
|
378 |
+
"epoch": 0.46,
|
379 |
+
"learning_rate": 4.717538258559431e-05,
|
380 |
+
"loss": 0.0657,
|
381 |
+
"step": 6200
|
382 |
+
},
|
383 |
+
{
|
384 |
+
"epoch": 0.47,
|
385 |
+
"learning_rate": 4.7085314312589614e-05,
|
386 |
+
"loss": 0.0631,
|
387 |
+
"step": 6300
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"epoch": 0.47,
|
391 |
+
"learning_rate": 4.699392126794045e-05,
|
392 |
+
"loss": 0.0503,
|
393 |
+
"step": 6400
|
394 |
+
},
|
395 |
+
{
|
396 |
+
"epoch": 0.48,
|
397 |
+
"learning_rate": 4.6901208933792675e-05,
|
398 |
+
"loss": 0.0652,
|
399 |
+
"step": 6500
|
400 |
+
},
|
401 |
+
{
|
402 |
+
"epoch": 0.49,
|
403 |
+
"learning_rate": 4.680718287142875e-05,
|
404 |
+
"loss": 0.0571,
|
405 |
+
"step": 6600
|
406 |
+
},
|
407 |
+
{
|
408 |
+
"epoch": 0.5,
|
409 |
+
"learning_rate": 4.671184872093419e-05,
|
410 |
+
"loss": 0.054,
|
411 |
+
"step": 6700
|
412 |
+
},
|
413 |
+
{
|
414 |
+
"epoch": 0.5,
|
415 |
+
"learning_rate": 4.661521220085923e-05,
|
416 |
+
"loss": 0.0628,
|
417 |
+
"step": 6800
|
418 |
+
},
|
419 |
+
{
|
420 |
+
"epoch": 0.51,
|
421 |
+
"learning_rate": 4.65172791078758e-05,
|
422 |
+
"loss": 0.0554,
|
423 |
+
"step": 6900
|
424 |
+
},
|
425 |
+
{
|
426 |
+
"epoch": 0.52,
|
427 |
+
"learning_rate": 4.641805531642983e-05,
|
428 |
+
"loss": 0.059,
|
429 |
+
"step": 7000
|
430 |
+
},
|
431 |
+
{
|
432 |
+
"epoch": 0.53,
|
433 |
+
"learning_rate": 4.631754677838885e-05,
|
434 |
+
"loss": 0.0557,
|
435 |
+
"step": 7100
|
436 |
+
},
|
437 |
+
{
|
438 |
+
"epoch": 0.53,
|
439 |
+
"learning_rate": 4.621575952268501e-05,
|
440 |
+
"loss": 0.0579,
|
441 |
+
"step": 7200
|
442 |
+
},
|
443 |
+
{
|
444 |
+
"epoch": 0.54,
|
445 |
+
"learning_rate": 4.6112699654953394e-05,
|
446 |
+
"loss": 0.0594,
|
447 |
+
"step": 7300
|
448 |
+
},
|
449 |
+
{
|
450 |
+
"epoch": 0.55,
|
451 |
+
"learning_rate": 4.600837335716581e-05,
|
452 |
+
"loss": 0.0652,
|
453 |
+
"step": 7400
|
454 |
+
},
|
455 |
+
{
|
456 |
+
"epoch": 0.55,
|
457 |
+
"learning_rate": 4.590278688725998e-05,
|
458 |
+
"loss": 0.0509,
|
459 |
+
"step": 7500
|
460 |
+
},
|
461 |
+
{
|
462 |
+
"epoch": 0.56,
|
463 |
+
"learning_rate": 4.579594657876408e-05,
|
464 |
+
"loss": 0.0658,
|
465 |
+
"step": 7600
|
466 |
+
},
|
467 |
+
{
|
468 |
+
"epoch": 0.57,
|
469 |
+
"learning_rate": 4.568785884041696e-05,
|
470 |
+
"loss": 0.054,
|
471 |
+
"step": 7700
|
472 |
+
},
|
473 |
+
{
|
474 |
+
"epoch": 0.58,
|
475 |
+
"learning_rate": 4.557853015578361e-05,
|
476 |
+
"loss": 0.0543,
|
477 |
+
"step": 7800
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"epoch": 0.58,
|
481 |
+
"learning_rate": 4.5467967082866306e-05,
|
482 |
+
"loss": 0.0552,
|
483 |
+
"step": 7900
|
484 |
+
},
|
485 |
+
{
|
486 |
+
"epoch": 0.59,
|
487 |
+
"learning_rate": 4.535730021743883e-05,
|
488 |
+
"loss": 0.0615,
|
489 |
+
"step": 8000
|
490 |
+
},
|
491 |
+
{
|
492 |
+
"epoch": 0.6,
|
493 |
+
"learning_rate": 4.52443005148096e-05,
|
494 |
+
"loss": 0.0567,
|
495 |
+
"step": 8100
|
496 |
+
},
|
497 |
+
{
|
498 |
+
"epoch": 0.61,
|
499 |
+
"learning_rate": 4.5130086472420265e-05,
|
500 |
+
"loss": 0.0519,
|
501 |
+
"step": 8200
|
502 |
+
},
|
503 |
+
{
|
504 |
+
"epoch": 0.61,
|
505 |
+
"learning_rate": 4.5014664941317766e-05,
|
506 |
+
"loss": 0.0573,
|
507 |
+
"step": 8300
|
508 |
+
},
|
509 |
+
{
|
510 |
+
"epoch": 0.62,
|
511 |
+
"learning_rate": 4.489804284497936e-05,
|
512 |
+
"loss": 0.053,
|
513 |
+
"step": 8400
|
514 |
+
},
|
515 |
+
{
|
516 |
+
"epoch": 0.63,
|
517 |
+
"learning_rate": 4.4780227178897366e-05,
|
518 |
+
"loss": 0.0658,
|
519 |
+
"step": 8500
|
520 |
+
},
|
521 |
+
{
|
522 |
+
"epoch": 0.64,
|
523 |
+
"learning_rate": 4.46612250101595e-05,
|
524 |
+
"loss": 0.0574,
|
525 |
+
"step": 8600
|
526 |
+
},
|
527 |
+
{
|
528 |
+
"epoch": 0.64,
|
529 |
+
"learning_rate": 4.4541043477025e-05,
|
530 |
+
"loss": 0.0608,
|
531 |
+
"step": 8700
|
532 |
+
},
|
533 |
+
{
|
534 |
+
"epoch": 0.65,
|
535 |
+
"learning_rate": 4.441968978849641e-05,
|
536 |
+
"loss": 0.0471,
|
537 |
+
"step": 8800
|
538 |
+
},
|
539 |
+
{
|
540 |
+
"epoch": 0.66,
|
541 |
+
"learning_rate": 4.4297171223887194e-05,
|
542 |
+
"loss": 0.0598,
|
543 |
+
"step": 8900
|
544 |
+
},
|
545 |
+
{
|
546 |
+
"epoch": 0.67,
|
547 |
+
"learning_rate": 4.4173495132385035e-05,
|
548 |
+
"loss": 0.0549,
|
549 |
+
"step": 9000
|
550 |
+
},
|
551 |
+
{
|
552 |
+
"epoch": 0.67,
|
553 |
+
"learning_rate": 4.404866893261106e-05,
|
554 |
+
"loss": 0.0529,
|
555 |
+
"step": 9100
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"epoch": 0.68,
|
559 |
+
"learning_rate": 4.39227001121748e-05,
|
560 |
+
"loss": 0.0529,
|
561 |
+
"step": 9200
|
562 |
+
},
|
563 |
+
{
|
564 |
+
"epoch": 0.69,
|
565 |
+
"learning_rate": 4.3795596227225066e-05,
|
566 |
+
"loss": 0.0568,
|
567 |
+
"step": 9300
|
568 |
+
},
|
569 |
+
{
|
570 |
+
"epoch": 0.7,
|
571 |
+
"learning_rate": 4.366736490199668e-05,
|
572 |
+
"loss": 0.0602,
|
573 |
+
"step": 9400
|
574 |
+
},
|
575 |
+
{
|
576 |
+
"epoch": 0.7,
|
577 |
+
"learning_rate": 4.353801382835318e-05,
|
578 |
+
"loss": 0.053,
|
579 |
+
"step": 9500
|
580 |
+
},
|
581 |
+
{
|
582 |
+
"epoch": 0.71,
|
583 |
+
"learning_rate": 4.340755076532538e-05,
|
584 |
+
"loss": 0.0498,
|
585 |
+
"step": 9600
|
586 |
+
},
|
587 |
+
{
|
588 |
+
"epoch": 0.72,
|
589 |
+
"learning_rate": 4.3275983538645995e-05,
|
590 |
+
"loss": 0.0509,
|
591 |
+
"step": 9700
|
592 |
+
},
|
593 |
+
{
|
594 |
+
"epoch": 0.72,
|
595 |
+
"learning_rate": 4.314332004028019e-05,
|
596 |
+
"loss": 0.0552,
|
597 |
+
"step": 9800
|
598 |
+
},
|
599 |
+
{
|
600 |
+
"epoch": 0.73,
|
601 |
+
"learning_rate": 4.3009568227952194e-05,
|
602 |
+
"loss": 0.0565,
|
603 |
+
"step": 9900
|
604 |
+
},
|
605 |
+
{
|
606 |
+
"epoch": 0.74,
|
607 |
+
"learning_rate": 4.287473612466796e-05,
|
608 |
+
"loss": 0.0573,
|
609 |
+
"step": 10000
|
610 |
+
}
|
611 |
+
],
|
612 |
+
"logging_steps": 100,
|
613 |
+
"max_steps": 40563,
|
614 |
+
"num_train_epochs": 3,
|
615 |
+
"save_steps": 5000,
|
616 |
+
"total_flos": 2.2312434217439724e+18,
|
617 |
+
"trial_name": null,
|
618 |
+
"trial_params": null
|
619 |
+
}
|
LLM-Detector-44w-EN/checkpoint-10000/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:207ad05ea260ffab22b19df12f661a83e61f91ab639a8553b2202d5916732318
|
3 |
+
size 4664
|
LLM-Detector-44w-EN/checkpoint-15000/README.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
base_model: ./Qwen-1_8B-Chat
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Shared by [optional]:** [More Information Needed]
|
22 |
+
- **Model type:** [More Information Needed]
|
23 |
+
- **Language(s) (NLP):** [More Information Needed]
|
24 |
+
- **License:** [More Information Needed]
|
25 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
26 |
+
|
27 |
+
### Model Sources [optional]
|
28 |
+
|
29 |
+
<!-- Provide the basic links for the model. -->
|
30 |
+
|
31 |
+
- **Repository:** [More Information Needed]
|
32 |
+
- **Paper [optional]:** [More Information Needed]
|
33 |
+
- **Demo [optional]:** [More Information Needed]
|
34 |
+
|
35 |
+
## Uses
|
36 |
+
|
37 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
+
|
39 |
+
### Direct Use
|
40 |
+
|
41 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
+
|
43 |
+
[More Information Needed]
|
44 |
+
|
45 |
+
### Downstream Use [optional]
|
46 |
+
|
47 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
+
|
49 |
+
[More Information Needed]
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
+
|
55 |
+
[More Information Needed]
|
56 |
+
|
57 |
+
## Bias, Risks, and Limitations
|
58 |
+
|
59 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
+
|
61 |
+
[More Information Needed]
|
62 |
+
|
63 |
+
### Recommendations
|
64 |
+
|
65 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
+
|
67 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
68 |
+
|
69 |
+
## How to Get Started with the Model
|
70 |
+
|
71 |
+
Use the code below to get started with the model.
|
72 |
+
|
73 |
+
[More Information Needed]
|
74 |
+
|
75 |
+
## Training Details
|
76 |
+
|
77 |
+
### Training Data
|
78 |
+
|
79 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
### Training Procedure
|
84 |
+
|
85 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
+
|
87 |
+
#### Preprocessing [optional]
|
88 |
+
|
89 |
+
[More Information Needed]
|
90 |
+
|
91 |
+
|
92 |
+
#### Training Hyperparameters
|
93 |
+
|
94 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
95 |
+
|
96 |
+
#### Speeds, Sizes, Times [optional]
|
97 |
+
|
98 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
## Evaluation
|
103 |
+
|
104 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
105 |
+
|
106 |
+
### Testing Data, Factors & Metrics
|
107 |
+
|
108 |
+
#### Testing Data
|
109 |
+
|
110 |
+
<!-- This should link to a Data Card if possible. -->
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Factors
|
115 |
+
|
116 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
#### Metrics
|
121 |
+
|
122 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Results
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
#### Summary
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
## Model Examination [optional]
|
135 |
+
|
136 |
+
<!-- Relevant interpretability work for the model goes here -->
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
## Environmental Impact
|
141 |
+
|
142 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
143 |
+
|
144 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
145 |
+
|
146 |
+
- **Hardware Type:** [More Information Needed]
|
147 |
+
- **Hours used:** [More Information Needed]
|
148 |
+
- **Cloud Provider:** [More Information Needed]
|
149 |
+
- **Compute Region:** [More Information Needed]
|
150 |
+
- **Carbon Emitted:** [More Information Needed]
|
151 |
+
|
152 |
+
## Technical Specifications [optional]
|
153 |
+
|
154 |
+
### Model Architecture and Objective
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
### Compute Infrastructure
|
159 |
+
|
160 |
+
[More Information Needed]
|
161 |
+
|
162 |
+
#### Hardware
|
163 |
+
|
164 |
+
[More Information Needed]
|
165 |
+
|
166 |
+
#### Software
|
167 |
+
|
168 |
+
[More Information Needed]
|
169 |
+
|
170 |
+
## Citation [optional]
|
171 |
+
|
172 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
173 |
+
|
174 |
+
**BibTeX:**
|
175 |
+
|
176 |
+
[More Information Needed]
|
177 |
+
|
178 |
+
**APA:**
|
179 |
+
|
180 |
+
[More Information Needed]
|
181 |
+
|
182 |
+
## Glossary [optional]
|
183 |
+
|
184 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
185 |
+
|
186 |
+
[More Information Needed]
|
187 |
+
|
188 |
+
## More Information [optional]
|
189 |
+
|
190 |
+
[More Information Needed]
|
191 |
+
|
192 |
+
## Model Card Authors [optional]
|
193 |
+
|
194 |
+
[More Information Needed]
|
195 |
+
|
196 |
+
## Model Card Contact
|
197 |
+
|
198 |
+
[More Information Needed]
|
199 |
+
|
200 |
+
|
201 |
+
## Training procedure
|
202 |
+
|
203 |
+
|
204 |
+
### Framework versions
|
205 |
+
|
206 |
+
|
207 |
+
- PEFT 0.6.2
|
LLM-Detector-44w-EN/checkpoint-15000/adapter_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "./Qwen-1_8B-Chat",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"lora_alpha": 16.0,
|
12 |
+
"lora_dropout": 0.1,
|
13 |
+
"modules_to_save": null,
|
14 |
+
"peft_type": "LORA",
|
15 |
+
"r": 8,
|
16 |
+
"rank_pattern": {},
|
17 |
+
"revision": null,
|
18 |
+
"target_modules": [
|
19 |
+
"c_attn"
|
20 |
+
],
|
21 |
+
"task_type": "CAUSAL_LM"
|
22 |
+
}
|
LLM-Detector-44w-EN/checkpoint-15000/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8e9328bcaf2d8ae8b0b8433b28702a985fa756bfd86d7d7adc25956a25db851c
|
3 |
+
size 6308670
|
LLM-Detector-44w-EN/checkpoint-15000/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:664e91079cdddce5ea1a018f569a2ae51b1a35ebed161f89ed193d9c51a21bd7
|
3 |
+
size 12623610
|
LLM-Detector-44w-EN/checkpoint-15000/qwen.tiktoken
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LLM-Detector-44w-EN/checkpoint-15000/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81e137f4596972ee86e52aca8e40aa1b0c41f3ecd6da8878e985c8cd4dd6c344
|
3 |
+
size 14244
|
LLM-Detector-44w-EN/checkpoint-15000/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6d27af7c1cb6ccfba45767401ba2d56a3189ead973f5bb014df36bc378d6002
|
3 |
+
size 1064
|
LLM-Detector-44w-EN/checkpoint-15000/special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Alibaba Cloud.
|
2 |
+
#
|
3 |
+
# This source code is licensed under the license found in the
|
4 |
+
# LICENSE file in the root directory of this source tree.
|
5 |
+
|
6 |
+
"""Tokenization classes for QWen."""
|
7 |
+
|
8 |
+
import base64
|
9 |
+
import logging
|
10 |
+
import os
|
11 |
+
import unicodedata
|
12 |
+
from typing import Collection, Dict, List, Set, Tuple, Union
|
13 |
+
|
14 |
+
import tiktoken
|
15 |
+
from transformers import PreTrainedTokenizer, AddedToken
|
16 |
+
|
17 |
+
logger = logging.getLogger(__name__)
|
18 |
+
|
19 |
+
|
20 |
+
VOCAB_FILES_NAMES = {"vocab_file": "qwen.tiktoken"}
|
21 |
+
|
22 |
+
PAT_STR = r"""(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"""
|
23 |
+
ENDOFTEXT = "<|endoftext|>"
|
24 |
+
IMSTART = "<|im_start|>"
|
25 |
+
IMEND = "<|im_end|>"
|
26 |
+
# as the default behavior is changed to allow special tokens in
|
27 |
+
# regular texts, the surface forms of special tokens need to be
|
28 |
+
# as different as possible to minimize the impact
|
29 |
+
EXTRAS = tuple((f"<|extra_{i}|>" for i in range(205)))
|
30 |
+
# changed to use actual index to avoid misconfiguration with vocabulary expansion
|
31 |
+
SPECIAL_START_ID = 151643
|
32 |
+
SPECIAL_TOKENS = tuple(
|
33 |
+
enumerate(
|
34 |
+
(
|
35 |
+
(
|
36 |
+
ENDOFTEXT,
|
37 |
+
IMSTART,
|
38 |
+
IMEND,
|
39 |
+
)
|
40 |
+
+ EXTRAS
|
41 |
+
),
|
42 |
+
start=SPECIAL_START_ID,
|
43 |
+
)
|
44 |
+
)
|
45 |
+
SPECIAL_TOKENS_SET = set(t for i, t in SPECIAL_TOKENS)
|
46 |
+
|
47 |
+
|
48 |
+
def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]:
|
49 |
+
with open(tiktoken_bpe_file, "rb") as f:
|
50 |
+
contents = f.read()
|
51 |
+
return {
|
52 |
+
base64.b64decode(token): int(rank)
|
53 |
+
for token, rank in (line.split() for line in contents.splitlines() if line)
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
class QWenTokenizer(PreTrainedTokenizer):
|
58 |
+
"""QWen tokenizer."""
|
59 |
+
|
60 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
61 |
+
|
62 |
+
def __init__(
|
63 |
+
self,
|
64 |
+
vocab_file,
|
65 |
+
errors="replace",
|
66 |
+
extra_vocab_file=None,
|
67 |
+
**kwargs,
|
68 |
+
):
|
69 |
+
super().__init__(**kwargs)
|
70 |
+
|
71 |
+
# how to handle errors in decoding UTF-8 byte sequences
|
72 |
+
# use ignore if you are in streaming inference
|
73 |
+
self.errors = errors
|
74 |
+
|
75 |
+
self.mergeable_ranks = _load_tiktoken_bpe(vocab_file) # type: Dict[bytes, int]
|
76 |
+
self.special_tokens = {
|
77 |
+
token: index
|
78 |
+
for index, token in SPECIAL_TOKENS
|
79 |
+
}
|
80 |
+
|
81 |
+
# try load extra vocab from file
|
82 |
+
if extra_vocab_file is not None:
|
83 |
+
used_ids = set(self.mergeable_ranks.values()) | set(self.special_tokens.values())
|
84 |
+
extra_mergeable_ranks = _load_tiktoken_bpe(extra_vocab_file)
|
85 |
+
for token, index in extra_mergeable_ranks.items():
|
86 |
+
if token in self.mergeable_ranks:
|
87 |
+
logger.info(f"extra token {token} exists, skipping")
|
88 |
+
continue
|
89 |
+
if index in used_ids:
|
90 |
+
logger.info(f'the index {index} for extra token {token} exists, skipping')
|
91 |
+
continue
|
92 |
+
self.mergeable_ranks[token] = index
|
93 |
+
# the index may be sparse after this, but don't worry tiktoken.Encoding will handle this
|
94 |
+
|
95 |
+
enc = tiktoken.Encoding(
|
96 |
+
"Qwen",
|
97 |
+
pat_str=PAT_STR,
|
98 |
+
mergeable_ranks=self.mergeable_ranks,
|
99 |
+
special_tokens=self.special_tokens,
|
100 |
+
)
|
101 |
+
assert (
|
102 |
+
len(self.mergeable_ranks) + len(self.special_tokens) == enc.n_vocab
|
103 |
+
), f"{len(self.mergeable_ranks) + len(self.special_tokens)} != {enc.n_vocab} in encoding"
|
104 |
+
|
105 |
+
self.decoder = {
|
106 |
+
v: k for k, v in self.mergeable_ranks.items()
|
107 |
+
} # type: dict[int, bytes|str]
|
108 |
+
self.decoder.update({v: k for k, v in self.special_tokens.items()})
|
109 |
+
|
110 |
+
self.tokenizer = enc # type: tiktoken.Encoding
|
111 |
+
|
112 |
+
self.eod_id = self.tokenizer.eot_token
|
113 |
+
self.im_start_id = self.special_tokens[IMSTART]
|
114 |
+
self.im_end_id = self.special_tokens[IMEND]
|
115 |
+
|
116 |
+
def __getstate__(self):
|
117 |
+
# for pickle lovers
|
118 |
+
state = self.__dict__.copy()
|
119 |
+
del state["tokenizer"]
|
120 |
+
return state
|
121 |
+
|
122 |
+
def __setstate__(self, state):
|
123 |
+
# tokenizer is not python native; don't pass it; rebuild it
|
124 |
+
self.__dict__.update(state)
|
125 |
+
enc = tiktoken.Encoding(
|
126 |
+
"Qwen",
|
127 |
+
pat_str=PAT_STR,
|
128 |
+
mergeable_ranks=self.mergeable_ranks,
|
129 |
+
special_tokens=self.special_tokens,
|
130 |
+
)
|
131 |
+
self.tokenizer = enc
|
132 |
+
|
133 |
+
def __len__(self) -> int:
|
134 |
+
return self.tokenizer.n_vocab
|
135 |
+
|
136 |
+
def get_vocab(self) -> Dict[bytes, int]:
|
137 |
+
return self.mergeable_ranks
|
138 |
+
|
139 |
+
def convert_tokens_to_ids(
|
140 |
+
self, tokens: Union[bytes, str, List[Union[bytes, str]]]
|
141 |
+
) -> List[int]:
|
142 |
+
ids = []
|
143 |
+
if isinstance(tokens, (str, bytes)):
|
144 |
+
if tokens in self.special_tokens:
|
145 |
+
return self.special_tokens[tokens]
|
146 |
+
else:
|
147 |
+
return self.mergeable_ranks.get(tokens)
|
148 |
+
for token in tokens:
|
149 |
+
if token in self.special_tokens:
|
150 |
+
ids.append(self.special_tokens[token])
|
151 |
+
else:
|
152 |
+
ids.append(self.mergeable_ranks.get(token))
|
153 |
+
return ids
|
154 |
+
|
155 |
+
def _add_tokens(
|
156 |
+
self,
|
157 |
+
new_tokens: Union[List[str], List[AddedToken]],
|
158 |
+
special_tokens: bool = False,
|
159 |
+
) -> int:
|
160 |
+
if not special_tokens and new_tokens:
|
161 |
+
raise ValueError("Adding regular tokens is not supported")
|
162 |
+
for token in new_tokens:
|
163 |
+
surface_form = token.content if isinstance(token, AddedToken) else token
|
164 |
+
if surface_form not in SPECIAL_TOKENS_SET:
|
165 |
+
raise ValueError("Adding unknown special tokens is not supported")
|
166 |
+
return 0
|
167 |
+
|
168 |
+
def save_vocabulary(self, save_directory: str, **kwargs) -> Tuple[str]:
|
169 |
+
"""
|
170 |
+
Save only the vocabulary of the tokenizer (vocabulary).
|
171 |
+
|
172 |
+
Returns:
|
173 |
+
`Tuple(str)`: Paths to the files saved.
|
174 |
+
"""
|
175 |
+
file_path = os.path.join(save_directory, "qwen.tiktoken")
|
176 |
+
with open(file_path, "w", encoding="utf8") as w:
|
177 |
+
for k, v in self.mergeable_ranks.items():
|
178 |
+
line = base64.b64encode(k).decode("utf8") + " " + str(v) + "\n"
|
179 |
+
w.write(line)
|
180 |
+
return (file_path,)
|
181 |
+
|
182 |
+
def tokenize(
|
183 |
+
self,
|
184 |
+
text: str,
|
185 |
+
allowed_special: Union[Set, str] = "all",
|
186 |
+
disallowed_special: Union[Collection, str] = (),
|
187 |
+
**kwargs,
|
188 |
+
) -> List[Union[bytes, str]]:
|
189 |
+
"""
|
190 |
+
Converts a string in a sequence of tokens.
|
191 |
+
|
192 |
+
Args:
|
193 |
+
text (`str`):
|
194 |
+
The sequence to be encoded.
|
195 |
+
allowed_special (`Literal["all"]` or `set`):
|
196 |
+
The surface forms of the tokens to be encoded as special tokens in regular texts.
|
197 |
+
Default to "all".
|
198 |
+
disallowed_special (`Literal["all"]` or `Collection`):
|
199 |
+
The surface forms of the tokens that should not be in regular texts and trigger errors.
|
200 |
+
Default to an empty tuple.
|
201 |
+
|
202 |
+
kwargs (additional keyword arguments, *optional*):
|
203 |
+
Will be passed to the underlying model specific encode method.
|
204 |
+
|
205 |
+
Returns:
|
206 |
+
`List[bytes|str]`: The list of tokens.
|
207 |
+
"""
|
208 |
+
tokens = []
|
209 |
+
text = unicodedata.normalize("NFC", text)
|
210 |
+
|
211 |
+
# this implementation takes a detour: text -> token id -> token surface forms
|
212 |
+
for t in self.tokenizer.encode(
|
213 |
+
text, allowed_special=allowed_special, disallowed_special=disallowed_special
|
214 |
+
):
|
215 |
+
tokens.append(self.decoder[t])
|
216 |
+
return tokens
|
217 |
+
|
218 |
+
def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) -> str:
|
219 |
+
"""
|
220 |
+
Converts a sequence of tokens in a single string.
|
221 |
+
"""
|
222 |
+
text = ""
|
223 |
+
temp = b""
|
224 |
+
for t in tokens:
|
225 |
+
if isinstance(t, str):
|
226 |
+
if temp:
|
227 |
+
text += temp.decode("utf-8", errors=self.errors)
|
228 |
+
temp = b""
|
229 |
+
text += t
|
230 |
+
elif isinstance(t, bytes):
|
231 |
+
temp += t
|
232 |
+
else:
|
233 |
+
raise TypeError("token should only be of type types or str")
|
234 |
+
if temp:
|
235 |
+
text += temp.decode("utf-8", errors=self.errors)
|
236 |
+
return text
|
237 |
+
|
238 |
+
@property
|
239 |
+
def vocab_size(self):
|
240 |
+
return self.tokenizer.n_vocab
|
241 |
+
|
242 |
+
def _convert_id_to_token(self, index: int) -> Union[bytes, str]:
|
243 |
+
"""Converts an id to a token, special tokens included"""
|
244 |
+
if index in self.decoder:
|
245 |
+
return self.decoder[index]
|
246 |
+
raise ValueError("unknown ids")
|
247 |
+
|
248 |
+
def _convert_token_to_id(self, token: Union[bytes, str]) -> int:
|
249 |
+
"""Converts a token to an id using the vocab, special tokens included"""
|
250 |
+
if token in self.special_tokens:
|
251 |
+
return self.special_tokens[token]
|
252 |
+
if token in self.mergeable_ranks:
|
253 |
+
return self.mergeable_ranks[token]
|
254 |
+
raise ValueError("unknown token")
|
255 |
+
|
256 |
+
def _tokenize(self, text: str, **kwargs):
|
257 |
+
"""
|
258 |
+
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based
|
259 |
+
vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).
|
260 |
+
|
261 |
+
Do NOT take care of added tokens.
|
262 |
+
"""
|
263 |
+
raise NotImplementedError
|
264 |
+
|
265 |
+
def _decode(
|
266 |
+
self,
|
267 |
+
token_ids: Union[int, List[int]],
|
268 |
+
skip_special_tokens: bool = False,
|
269 |
+
errors: str = None,
|
270 |
+
**kwargs,
|
271 |
+
) -> str:
|
272 |
+
if isinstance(token_ids, int):
|
273 |
+
token_ids = [token_ids]
|
274 |
+
if skip_special_tokens:
|
275 |
+
token_ids = [i for i in token_ids if i < self.eod_id]
|
276 |
+
return self.tokenizer.decode(token_ids, errors=errors or self.errors)
|
LLM-Detector-44w-EN/checkpoint-15000/tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoTokenizer": [
|
4 |
+
"tokenization_qwen.QWenTokenizer",
|
5 |
+
null
|
6 |
+
]
|
7 |
+
},
|
8 |
+
"clean_up_tokenization_spaces": true,
|
9 |
+
"model_max_length": 8192,
|
10 |
+
"padding_side": "right",
|
11 |
+
"split_special_tokens": false,
|
12 |
+
"tokenizer_class": "QWenTokenizer"
|
13 |
+
}
|
LLM-Detector-44w-EN/checkpoint-15000/trainer_state.json
ADDED
@@ -0,0 +1,919 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.1093443774729135,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 15000,
|
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.01,
|
13 |
+
"learning_rate": 4.999925019651876e-05,
|
14 |
+
"loss": 3.2124,
|
15 |
+
"step": 100
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.01,
|
19 |
+
"learning_rate": 4.9997000831051485e-05,
|
20 |
+
"loss": 0.2834,
|
21 |
+
"step": 200
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.02,
|
25 |
+
"learning_rate": 4.999325203852471e-05,
|
26 |
+
"loss": 0.2178,
|
27 |
+
"step": 300
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.03,
|
31 |
+
"learning_rate": 4.998800404380707e-05,
|
32 |
+
"loss": 0.1782,
|
33 |
+
"step": 400
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.04,
|
37 |
+
"learning_rate": 4.9981257161695735e-05,
|
38 |
+
"loss": 0.1501,
|
39 |
+
"step": 500
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.04,
|
43 |
+
"learning_rate": 4.997301179689756e-05,
|
44 |
+
"loss": 0.1376,
|
45 |
+
"step": 600
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 0.05,
|
49 |
+
"learning_rate": 4.996326844400481e-05,
|
50 |
+
"loss": 0.1161,
|
51 |
+
"step": 700
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.06,
|
55 |
+
"learning_rate": 4.9952027687465465e-05,
|
56 |
+
"loss": 0.1163,
|
57 |
+
"step": 800
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 0.07,
|
61 |
+
"learning_rate": 4.9939290201548214e-05,
|
62 |
+
"loss": 0.1157,
|
63 |
+
"step": 900
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 0.07,
|
67 |
+
"learning_rate": 4.992505675030195e-05,
|
68 |
+
"loss": 0.1048,
|
69 |
+
"step": 1000
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 0.08,
|
73 |
+
"learning_rate": 4.9909328187509964e-05,
|
74 |
+
"loss": 0.1073,
|
75 |
+
"step": 1100
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"epoch": 0.09,
|
79 |
+
"learning_rate": 4.989210545663877e-05,
|
80 |
+
"loss": 0.1047,
|
81 |
+
"step": 1200
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"epoch": 0.1,
|
85 |
+
"learning_rate": 4.987338959078144e-05,
|
86 |
+
"loss": 0.1066,
|
87 |
+
"step": 1300
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"epoch": 0.1,
|
91 |
+
"learning_rate": 4.9853181712595686e-05,
|
92 |
+
"loss": 0.1011,
|
93 |
+
"step": 1400
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 0.11,
|
97 |
+
"learning_rate": 4.98314830342365e-05,
|
98 |
+
"loss": 0.0947,
|
99 |
+
"step": 1500
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 0.12,
|
103 |
+
"learning_rate": 4.9808294857283454e-05,
|
104 |
+
"loss": 0.0916,
|
105 |
+
"step": 1600
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"epoch": 0.13,
|
109 |
+
"learning_rate": 4.97836185726626e-05,
|
110 |
+
"loss": 0.0933,
|
111 |
+
"step": 1700
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"epoch": 0.13,
|
115 |
+
"learning_rate": 4.9757455660563085e-05,
|
116 |
+
"loss": 0.089,
|
117 |
+
"step": 1800
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"epoch": 0.14,
|
121 |
+
"learning_rate": 4.9729807690348297e-05,
|
122 |
+
"loss": 0.0872,
|
123 |
+
"step": 1900
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"epoch": 0.15,
|
127 |
+
"learning_rate": 4.9700676320461794e-05,
|
128 |
+
"loss": 0.0898,
|
129 |
+
"step": 2000
|
130 |
+
},
|
131 |
+
{
|
132 |
+
"epoch": 0.16,
|
133 |
+
"learning_rate": 4.9670376756771875e-05,
|
134 |
+
"loss": 0.0894,
|
135 |
+
"step": 2100
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 0.16,
|
139 |
+
"learning_rate": 4.963829870746861e-05,
|
140 |
+
"loss": 0.0859,
|
141 |
+
"step": 2200
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"epoch": 0.17,
|
145 |
+
"learning_rate": 4.960474274759395e-05,
|
146 |
+
"loss": 0.0826,
|
147 |
+
"step": 2300
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 0.18,
|
151 |
+
"learning_rate": 4.956971088997792e-05,
|
152 |
+
"loss": 0.0816,
|
153 |
+
"step": 2400
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 0.18,
|
157 |
+
"learning_rate": 4.953320523598123e-05,
|
158 |
+
"loss": 0.074,
|
159 |
+
"step": 2500
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 0.19,
|
163 |
+
"learning_rate": 4.9495227975369186e-05,
|
164 |
+
"loss": 0.0896,
|
165 |
+
"step": 2600
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 0.2,
|
169 |
+
"learning_rate": 4.945578138618039e-05,
|
170 |
+
"loss": 0.0768,
|
171 |
+
"step": 2700
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 0.21,
|
175 |
+
"learning_rate": 4.941486783459001e-05,
|
176 |
+
"loss": 0.0779,
|
177 |
+
"step": 2800
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 0.21,
|
181 |
+
"learning_rate": 4.937248977476793e-05,
|
182 |
+
"loss": 0.0814,
|
183 |
+
"step": 2900
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 0.22,
|
187 |
+
"learning_rate": 4.9328649748731495e-05,
|
188 |
+
"loss": 0.0727,
|
189 |
+
"step": 3000
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"epoch": 0.23,
|
193 |
+
"learning_rate": 4.928335038619302e-05,
|
194 |
+
"loss": 0.0806,
|
195 |
+
"step": 3100
|
196 |
+
},
|
197 |
+
{
|
198 |
+
"epoch": 0.24,
|
199 |
+
"learning_rate": 4.9236594404402104e-05,
|
200 |
+
"loss": 0.0709,
|
201 |
+
"step": 3200
|
202 |
+
},
|
203 |
+
{
|
204 |
+
"epoch": 0.24,
|
205 |
+
"learning_rate": 4.9188384607982565e-05,
|
206 |
+
"loss": 0.0746,
|
207 |
+
"step": 3300
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"epoch": 0.25,
|
211 |
+
"learning_rate": 4.913872388876427e-05,
|
212 |
+
"loss": 0.0805,
|
213 |
+
"step": 3400
|
214 |
+
},
|
215 |
+
{
|
216 |
+
"epoch": 0.26,
|
217 |
+
"learning_rate": 4.908761522560962e-05,
|
218 |
+
"loss": 0.0726,
|
219 |
+
"step": 3500
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"epoch": 0.27,
|
223 |
+
"learning_rate": 4.903506168423491e-05,
|
224 |
+
"loss": 0.0715,
|
225 |
+
"step": 3600
|
226 |
+
},
|
227 |
+
{
|
228 |
+
"epoch": 0.27,
|
229 |
+
"learning_rate": 4.898106641702639e-05,
|
230 |
+
"loss": 0.0751,
|
231 |
+
"step": 3700
|
232 |
+
},
|
233 |
+
{
|
234 |
+
"epoch": 0.28,
|
235 |
+
"learning_rate": 4.892563266285121e-05,
|
236 |
+
"loss": 0.0818,
|
237 |
+
"step": 3800
|
238 |
+
},
|
239 |
+
{
|
240 |
+
"epoch": 0.29,
|
241 |
+
"learning_rate": 4.886876374686313e-05,
|
242 |
+
"loss": 0.0651,
|
243 |
+
"step": 3900
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"epoch": 0.3,
|
247 |
+
"learning_rate": 4.881046308030303e-05,
|
248 |
+
"loss": 0.0806,
|
249 |
+
"step": 4000
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"epoch": 0.3,
|
253 |
+
"learning_rate": 4.87513385076558e-05,
|
254 |
+
"loss": 0.0803,
|
255 |
+
"step": 4100
|
256 |
+
},
|
257 |
+
{
|
258 |
+
"epoch": 0.31,
|
259 |
+
"learning_rate": 4.869019914568559e-05,
|
260 |
+
"loss": 0.0717,
|
261 |
+
"step": 4200
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"epoch": 0.32,
|
265 |
+
"learning_rate": 4.8627638744212125e-05,
|
266 |
+
"loss": 0.0678,
|
267 |
+
"step": 4300
|
268 |
+
},
|
269 |
+
{
|
270 |
+
"epoch": 0.33,
|
271 |
+
"learning_rate": 4.8563661055875955e-05,
|
272 |
+
"loss": 0.0681,
|
273 |
+
"step": 4400
|
274 |
+
},
|
275 |
+
{
|
276 |
+
"epoch": 0.33,
|
277 |
+
"learning_rate": 4.849826991833256e-05,
|
278 |
+
"loss": 0.0668,
|
279 |
+
"step": 4500
|
280 |
+
},
|
281 |
+
{
|
282 |
+
"epoch": 0.34,
|
283 |
+
"learning_rate": 4.8431469254022146e-05,
|
284 |
+
"loss": 0.0717,
|
285 |
+
"step": 4600
|
286 |
+
},
|
287 |
+
{
|
288 |
+
"epoch": 0.35,
|
289 |
+
"learning_rate": 4.8363263069934364e-05,
|
290 |
+
"loss": 0.0681,
|
291 |
+
"step": 4700
|
292 |
+
},
|
293 |
+
{
|
294 |
+
"epoch": 0.35,
|
295 |
+
"learning_rate": 4.829365545736794e-05,
|
296 |
+
"loss": 0.0703,
|
297 |
+
"step": 4800
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"epoch": 0.36,
|
301 |
+
"learning_rate": 4.8222650591685316e-05,
|
302 |
+
"loss": 0.0625,
|
303 |
+
"step": 4900
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"epoch": 0.37,
|
307 |
+
"learning_rate": 4.815025273206212e-05,
|
308 |
+
"loss": 0.066,
|
309 |
+
"step": 5000
|
310 |
+
},
|
311 |
+
{
|
312 |
+
"epoch": 0.38,
|
313 |
+
"learning_rate": 4.807646622123172e-05,
|
314 |
+
"loss": 0.0707,
|
315 |
+
"step": 5100
|
316 |
+
},
|
317 |
+
{
|
318 |
+
"epoch": 0.38,
|
319 |
+
"learning_rate": 4.800129548522474e-05,
|
320 |
+
"loss": 0.061,
|
321 |
+
"step": 5200
|
322 |
+
},
|
323 |
+
{
|
324 |
+
"epoch": 0.39,
|
325 |
+
"learning_rate": 4.7924745033103533e-05,
|
326 |
+
"loss": 0.0645,
|
327 |
+
"step": 5300
|
328 |
+
},
|
329 |
+
{
|
330 |
+
"epoch": 0.4,
|
331 |
+
"learning_rate": 4.784681945669176e-05,
|
332 |
+
"loss": 0.0669,
|
333 |
+
"step": 5400
|
334 |
+
},
|
335 |
+
{
|
336 |
+
"epoch": 0.41,
|
337 |
+
"learning_rate": 4.776752343029888e-05,
|
338 |
+
"loss": 0.059,
|
339 |
+
"step": 5500
|
340 |
+
},
|
341 |
+
{
|
342 |
+
"epoch": 0.41,
|
343 |
+
"learning_rate": 4.768686171043982e-05,
|
344 |
+
"loss": 0.0641,
|
345 |
+
"step": 5600
|
346 |
+
},
|
347 |
+
{
|
348 |
+
"epoch": 0.42,
|
349 |
+
"learning_rate": 4.760483913554966e-05,
|
350 |
+
"loss": 0.0619,
|
351 |
+
"step": 5700
|
352 |
+
},
|
353 |
+
{
|
354 |
+
"epoch": 0.43,
|
355 |
+
"learning_rate": 4.7522301106315205e-05,
|
356 |
+
"loss": 0.0616,
|
357 |
+
"step": 5800
|
358 |
+
},
|
359 |
+
{
|
360 |
+
"epoch": 0.44,
|
361 |
+
"learning_rate": 4.7437585147204955e-05,
|
362 |
+
"loss": 0.0625,
|
363 |
+
"step": 5900
|
364 |
+
},
|
365 |
+
{
|
366 |
+
"epoch": 0.44,
|
367 |
+
"learning_rate": 4.7351523285738384e-05,
|
368 |
+
"loss": 0.0594,
|
369 |
+
"step": 6000
|
370 |
+
},
|
371 |
+
{
|
372 |
+
"epoch": 0.45,
|
373 |
+
"learning_rate": 4.726412068427418e-05,
|
374 |
+
"loss": 0.0616,
|
375 |
+
"step": 6100
|
376 |
+
},
|
377 |
+
{
|
378 |
+
"epoch": 0.46,
|
379 |
+
"learning_rate": 4.717538258559431e-05,
|
380 |
+
"loss": 0.0657,
|
381 |
+
"step": 6200
|
382 |
+
},
|
383 |
+
{
|
384 |
+
"epoch": 0.47,
|
385 |
+
"learning_rate": 4.7085314312589614e-05,
|
386 |
+
"loss": 0.0631,
|
387 |
+
"step": 6300
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"epoch": 0.47,
|
391 |
+
"learning_rate": 4.699392126794045e-05,
|
392 |
+
"loss": 0.0503,
|
393 |
+
"step": 6400
|
394 |
+
},
|
395 |
+
{
|
396 |
+
"epoch": 0.48,
|
397 |
+
"learning_rate": 4.6901208933792675e-05,
|
398 |
+
"loss": 0.0652,
|
399 |
+
"step": 6500
|
400 |
+
},
|
401 |
+
{
|
402 |
+
"epoch": 0.49,
|
403 |
+
"learning_rate": 4.680718287142875e-05,
|
404 |
+
"loss": 0.0571,
|
405 |
+
"step": 6600
|
406 |
+
},
|
407 |
+
{
|
408 |
+
"epoch": 0.5,
|
409 |
+
"learning_rate": 4.671184872093419e-05,
|
410 |
+
"loss": 0.054,
|
411 |
+
"step": 6700
|
412 |
+
},
|
413 |
+
{
|
414 |
+
"epoch": 0.5,
|
415 |
+
"learning_rate": 4.661521220085923e-05,
|
416 |
+
"loss": 0.0628,
|
417 |
+
"step": 6800
|
418 |
+
},
|
419 |
+
{
|
420 |
+
"epoch": 0.51,
|
421 |
+
"learning_rate": 4.65172791078758e-05,
|
422 |
+
"loss": 0.0554,
|
423 |
+
"step": 6900
|
424 |
+
},
|
425 |
+
{
|
426 |
+
"epoch": 0.52,
|
427 |
+
"learning_rate": 4.641805531642983e-05,
|
428 |
+
"loss": 0.059,
|
429 |
+
"step": 7000
|
430 |
+
},
|
431 |
+
{
|
432 |
+
"epoch": 0.53,
|
433 |
+
"learning_rate": 4.631754677838885e-05,
|
434 |
+
"loss": 0.0557,
|
435 |
+
"step": 7100
|
436 |
+
},
|
437 |
+
{
|
438 |
+
"epoch": 0.53,
|
439 |
+
"learning_rate": 4.621575952268501e-05,
|
440 |
+
"loss": 0.0579,
|
441 |
+
"step": 7200
|
442 |
+
},
|
443 |
+
{
|
444 |
+
"epoch": 0.54,
|
445 |
+
"learning_rate": 4.6112699654953394e-05,
|
446 |
+
"loss": 0.0594,
|
447 |
+
"step": 7300
|
448 |
+
},
|
449 |
+
{
|
450 |
+
"epoch": 0.55,
|
451 |
+
"learning_rate": 4.600837335716581e-05,
|
452 |
+
"loss": 0.0652,
|
453 |
+
"step": 7400
|
454 |
+
},
|
455 |
+
{
|
456 |
+
"epoch": 0.55,
|
457 |
+
"learning_rate": 4.590278688725998e-05,
|
458 |
+
"loss": 0.0509,
|
459 |
+
"step": 7500
|
460 |
+
},
|
461 |
+
{
|
462 |
+
"epoch": 0.56,
|
463 |
+
"learning_rate": 4.579594657876408e-05,
|
464 |
+
"loss": 0.0658,
|
465 |
+
"step": 7600
|
466 |
+
},
|
467 |
+
{
|
468 |
+
"epoch": 0.57,
|
469 |
+
"learning_rate": 4.568785884041696e-05,
|
470 |
+
"loss": 0.054,
|
471 |
+
"step": 7700
|
472 |
+
},
|
473 |
+
{
|
474 |
+
"epoch": 0.58,
|
475 |
+
"learning_rate": 4.557853015578361e-05,
|
476 |
+
"loss": 0.0543,
|
477 |
+
"step": 7800
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"epoch": 0.58,
|
481 |
+
"learning_rate": 4.5467967082866306e-05,
|
482 |
+
"loss": 0.0552,
|
483 |
+
"step": 7900
|
484 |
+
},
|
485 |
+
{
|
486 |
+
"epoch": 0.59,
|
487 |
+
"learning_rate": 4.535730021743883e-05,
|
488 |
+
"loss": 0.0615,
|
489 |
+
"step": 8000
|
490 |
+
},
|
491 |
+
{
|
492 |
+
"epoch": 0.6,
|
493 |
+
"learning_rate": 4.52443005148096e-05,
|
494 |
+
"loss": 0.0567,
|
495 |
+
"step": 8100
|
496 |
+
},
|
497 |
+
{
|
498 |
+
"epoch": 0.61,
|
499 |
+
"learning_rate": 4.5130086472420265e-05,
|
500 |
+
"loss": 0.0519,
|
501 |
+
"step": 8200
|
502 |
+
},
|
503 |
+
{
|
504 |
+
"epoch": 0.61,
|
505 |
+
"learning_rate": 4.5014664941317766e-05,
|
506 |
+
"loss": 0.0573,
|
507 |
+
"step": 8300
|
508 |
+
},
|
509 |
+
{
|
510 |
+
"epoch": 0.62,
|
511 |
+
"learning_rate": 4.489804284497936e-05,
|
512 |
+
"loss": 0.053,
|
513 |
+
"step": 8400
|
514 |
+
},
|
515 |
+
{
|
516 |
+
"epoch": 0.63,
|
517 |
+
"learning_rate": 4.4780227178897366e-05,
|
518 |
+
"loss": 0.0658,
|
519 |
+
"step": 8500
|
520 |
+
},
|
521 |
+
{
|
522 |
+
"epoch": 0.64,
|
523 |
+
"learning_rate": 4.46612250101595e-05,
|
524 |
+
"loss": 0.0574,
|
525 |
+
"step": 8600
|
526 |
+
},
|
527 |
+
{
|
528 |
+
"epoch": 0.64,
|
529 |
+
"learning_rate": 4.4541043477025e-05,
|
530 |
+
"loss": 0.0608,
|
531 |
+
"step": 8700
|
532 |
+
},
|
533 |
+
{
|
534 |
+
"epoch": 0.65,
|
535 |
+
"learning_rate": 4.441968978849641e-05,
|
536 |
+
"loss": 0.0471,
|
537 |
+
"step": 8800
|
538 |
+
},
|
539 |
+
{
|
540 |
+
"epoch": 0.66,
|
541 |
+
"learning_rate": 4.4297171223887194e-05,
|
542 |
+
"loss": 0.0598,
|
543 |
+
"step": 8900
|
544 |
+
},
|
545 |
+
{
|
546 |
+
"epoch": 0.67,
|
547 |
+
"learning_rate": 4.4173495132385035e-05,
|
548 |
+
"loss": 0.0549,
|
549 |
+
"step": 9000
|
550 |
+
},
|
551 |
+
{
|
552 |
+
"epoch": 0.67,
|
553 |
+
"learning_rate": 4.404866893261106e-05,
|
554 |
+
"loss": 0.0529,
|
555 |
+
"step": 9100
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"epoch": 0.68,
|
559 |
+
"learning_rate": 4.39227001121748e-05,
|
560 |
+
"loss": 0.0529,
|
561 |
+
"step": 9200
|
562 |
+
},
|
563 |
+
{
|
564 |
+
"epoch": 0.69,
|
565 |
+
"learning_rate": 4.3795596227225066e-05,
|
566 |
+
"loss": 0.0568,
|
567 |
+
"step": 9300
|
568 |
+
},
|
569 |
+
{
|
570 |
+
"epoch": 0.7,
|
571 |
+
"learning_rate": 4.366736490199668e-05,
|
572 |
+
"loss": 0.0602,
|
573 |
+
"step": 9400
|
574 |
+
},
|
575 |
+
{
|
576 |
+
"epoch": 0.7,
|
577 |
+
"learning_rate": 4.353801382835318e-05,
|
578 |
+
"loss": 0.053,
|
579 |
+
"step": 9500
|
580 |
+
},
|
581 |
+
{
|
582 |
+
"epoch": 0.71,
|
583 |
+
"learning_rate": 4.340755076532538e-05,
|
584 |
+
"loss": 0.0498,
|
585 |
+
"step": 9600
|
586 |
+
},
|
587 |
+
{
|
588 |
+
"epoch": 0.72,
|
589 |
+
"learning_rate": 4.3275983538645995e-05,
|
590 |
+
"loss": 0.0509,
|
591 |
+
"step": 9700
|
592 |
+
},
|
593 |
+
{
|
594 |
+
"epoch": 0.72,
|
595 |
+
"learning_rate": 4.314332004028019e-05,
|
596 |
+
"loss": 0.0552,
|
597 |
+
"step": 9800
|
598 |
+
},
|
599 |
+
{
|
600 |
+
"epoch": 0.73,
|
601 |
+
"learning_rate": 4.3009568227952194e-05,
|
602 |
+
"loss": 0.0565,
|
603 |
+
"step": 9900
|
604 |
+
},
|
605 |
+
{
|
606 |
+
"epoch": 0.74,
|
607 |
+
"learning_rate": 4.287473612466796e-05,
|
608 |
+
"loss": 0.0573,
|
609 |
+
"step": 10000
|
610 |
+
},
|
611 |
+
{
|
612 |
+
"epoch": 0.75,
|
613 |
+
"learning_rate": 4.273883181823394e-05,
|
614 |
+
"loss": 0.0477,
|
615 |
+
"step": 10100
|
616 |
+
},
|
617 |
+
{
|
618 |
+
"epoch": 0.75,
|
619 |
+
"learning_rate": 4.2603238384474695e-05,
|
620 |
+
"loss": 0.0522,
|
621 |
+
"step": 10200
|
622 |
+
},
|
623 |
+
{
|
624 |
+
"epoch": 0.76,
|
625 |
+
"learning_rate": 4.24652247094062e-05,
|
626 |
+
"loss": 0.0515,
|
627 |
+
"step": 10300
|
628 |
+
},
|
629 |
+
{
|
630 |
+
"epoch": 0.77,
|
631 |
+
"learning_rate": 4.23261633954347e-05,
|
632 |
+
"loss": 0.0478,
|
633 |
+
"step": 10400
|
634 |
+
},
|
635 |
+
{
|
636 |
+
"epoch": 0.78,
|
637 |
+
"learning_rate": 4.218606278405277e-05,
|
638 |
+
"loss": 0.0535,
|
639 |
+
"step": 10500
|
640 |
+
},
|
641 |
+
{
|
642 |
+
"epoch": 0.78,
|
643 |
+
"learning_rate": 4.20449312790945e-05,
|
644 |
+
"loss": 0.0481,
|
645 |
+
"step": 10600
|
646 |
+
},
|
647 |
+
{
|
648 |
+
"epoch": 0.79,
|
649 |
+
"learning_rate": 4.1902777346231383e-05,
|
650 |
+
"loss": 0.0487,
|
651 |
+
"step": 10700
|
652 |
+
},
|
653 |
+
{
|
654 |
+
"epoch": 0.8,
|
655 |
+
"learning_rate": 4.175960951246454e-05,
|
656 |
+
"loss": 0.0429,
|
657 |
+
"step": 10800
|
658 |
+
},
|
659 |
+
{
|
660 |
+
"epoch": 0.81,
|
661 |
+
"learning_rate": 4.161543636561316e-05,
|
662 |
+
"loss": 0.0485,
|
663 |
+
"step": 10900
|
664 |
+
},
|
665 |
+
{
|
666 |
+
"epoch": 0.81,
|
667 |
+
"learning_rate": 4.147026655379945e-05,
|
668 |
+
"loss": 0.0486,
|
669 |
+
"step": 11000
|
670 |
+
},
|
671 |
+
{
|
672 |
+
"epoch": 0.82,
|
673 |
+
"learning_rate": 4.132410878492983e-05,
|
674 |
+
"loss": 0.0484,
|
675 |
+
"step": 11100
|
676 |
+
},
|
677 |
+
{
|
678 |
+
"epoch": 0.83,
|
679 |
+
"learning_rate": 4.1176971826172596e-05,
|
680 |
+
"loss": 0.0485,
|
681 |
+
"step": 11200
|
682 |
+
},
|
683 |
+
{
|
684 |
+
"epoch": 0.84,
|
685 |
+
"learning_rate": 4.1028864503432085e-05,
|
686 |
+
"loss": 0.0545,
|
687 |
+
"step": 11300
|
688 |
+
},
|
689 |
+
{
|
690 |
+
"epoch": 0.84,
|
691 |
+
"learning_rate": 4.087979570081917e-05,
|
692 |
+
"loss": 0.0436,
|
693 |
+
"step": 11400
|
694 |
+
},
|
695 |
+
{
|
696 |
+
"epoch": 0.85,
|
697 |
+
"learning_rate": 4.072977436011844e-05,
|
698 |
+
"loss": 0.0492,
|
699 |
+
"step": 11500
|
700 |
+
},
|
701 |
+
{
|
702 |
+
"epoch": 0.86,
|
703 |
+
"learning_rate": 4.057880948025177e-05,
|
704 |
+
"loss": 0.0534,
|
705 |
+
"step": 11600
|
706 |
+
},
|
707 |
+
{
|
708 |
+
"epoch": 0.87,
|
709 |
+
"learning_rate": 4.042691011673855e-05,
|
710 |
+
"loss": 0.0551,
|
711 |
+
"step": 11700
|
712 |
+
},
|
713 |
+
{
|
714 |
+
"epoch": 0.87,
|
715 |
+
"learning_rate": 4.027408538115252e-05,
|
716 |
+
"loss": 0.0488,
|
717 |
+
"step": 11800
|
718 |
+
},
|
719 |
+
{
|
720 |
+
"epoch": 0.88,
|
721 |
+
"learning_rate": 4.0120344440575165e-05,
|
722 |
+
"loss": 0.0525,
|
723 |
+
"step": 11900
|
724 |
+
},
|
725 |
+
{
|
726 |
+
"epoch": 0.89,
|
727 |
+
"learning_rate": 3.996569651704589e-05,
|
728 |
+
"loss": 0.0458,
|
729 |
+
"step": 12000
|
730 |
+
},
|
731 |
+
{
|
732 |
+
"epoch": 0.89,
|
733 |
+
"learning_rate": 3.9810150887008806e-05,
|
734 |
+
"loss": 0.0492,
|
735 |
+
"step": 12100
|
736 |
+
},
|
737 |
+
{
|
738 |
+
"epoch": 0.9,
|
739 |
+
"learning_rate": 3.965528558751401e-05,
|
740 |
+
"loss": 0.0489,
|
741 |
+
"step": 12200
|
742 |
+
},
|
743 |
+
{
|
744 |
+
"epoch": 0.91,
|
745 |
+
"learning_rate": 3.949798133193112e-05,
|
746 |
+
"loss": 0.0465,
|
747 |
+
"step": 12300
|
748 |
+
},
|
749 |
+
{
|
750 |
+
"epoch": 0.92,
|
751 |
+
"learning_rate": 3.933980742539834e-05,
|
752 |
+
"loss": 0.0502,
|
753 |
+
"step": 12400
|
754 |
+
},
|
755 |
+
{
|
756 |
+
"epoch": 0.92,
|
757 |
+
"learning_rate": 3.9180773355863344e-05,
|
758 |
+
"loss": 0.0506,
|
759 |
+
"step": 12500
|
760 |
+
},
|
761 |
+
{
|
762 |
+
"epoch": 0.93,
|
763 |
+
"learning_rate": 3.902088866287004e-05,
|
764 |
+
"loss": 0.0525,
|
765 |
+
"step": 12600
|
766 |
+
},
|
767 |
+
{
|
768 |
+
"epoch": 0.94,
|
769 |
+
"learning_rate": 3.886016293698637e-05,
|
770 |
+
"loss": 0.0472,
|
771 |
+
"step": 12700
|
772 |
+
},
|
773 |
+
{
|
774 |
+
"epoch": 0.95,
|
775 |
+
"learning_rate": 3.869860581922905e-05,
|
776 |
+
"loss": 0.0443,
|
777 |
+
"step": 12800
|
778 |
+
},
|
779 |
+
{
|
780 |
+
"epoch": 0.95,
|
781 |
+
"learning_rate": 3.8536227000485234e-05,
|
782 |
+
"loss": 0.042,
|
783 |
+
"step": 12900
|
784 |
+
},
|
785 |
+
{
|
786 |
+
"epoch": 0.96,
|
787 |
+
"learning_rate": 3.837303622093119e-05,
|
788 |
+
"loss": 0.0447,
|
789 |
+
"step": 13000
|
790 |
+
},
|
791 |
+
{
|
792 |
+
"epoch": 0.97,
|
793 |
+
"learning_rate": 3.8209043269448096e-05,
|
794 |
+
"loss": 0.046,
|
795 |
+
"step": 13100
|
796 |
+
},
|
797 |
+
{
|
798 |
+
"epoch": 0.98,
|
799 |
+
"learning_rate": 3.804425798303483e-05,
|
800 |
+
"loss": 0.0434,
|
801 |
+
"step": 13200
|
802 |
+
},
|
803 |
+
{
|
804 |
+
"epoch": 0.98,
|
805 |
+
"learning_rate": 3.787869024621789e-05,
|
806 |
+
"loss": 0.0479,
|
807 |
+
"step": 13300
|
808 |
+
},
|
809 |
+
{
|
810 |
+
"epoch": 0.99,
|
811 |
+
"learning_rate": 3.7712349990458524e-05,
|
812 |
+
"loss": 0.0484,
|
813 |
+
"step": 13400
|
814 |
+
},
|
815 |
+
{
|
816 |
+
"epoch": 1.0,
|
817 |
+
"learning_rate": 3.754524719355695e-05,
|
818 |
+
"loss": 0.0506,
|
819 |
+
"step": 13500
|
820 |
+
},
|
821 |
+
{
|
822 |
+
"epoch": 1.01,
|
823 |
+
"learning_rate": 3.737739187905389e-05,
|
824 |
+
"loss": 0.0449,
|
825 |
+
"step": 13600
|
826 |
+
},
|
827 |
+
{
|
828 |
+
"epoch": 1.01,
|
829 |
+
"learning_rate": 3.7208794115629266e-05,
|
830 |
+
"loss": 0.0419,
|
831 |
+
"step": 13700
|
832 |
+
},
|
833 |
+
{
|
834 |
+
"epoch": 1.02,
|
835 |
+
"learning_rate": 3.703946401649827e-05,
|
836 |
+
"loss": 0.0356,
|
837 |
+
"step": 13800
|
838 |
+
},
|
839 |
+
{
|
840 |
+
"epoch": 1.03,
|
841 |
+
"learning_rate": 3.6869411738804735e-05,
|
842 |
+
"loss": 0.0433,
|
843 |
+
"step": 13900
|
844 |
+
},
|
845 |
+
{
|
846 |
+
"epoch": 1.04,
|
847 |
+
"learning_rate": 3.669864748301185e-05,
|
848 |
+
"loss": 0.0408,
|
849 |
+
"step": 14000
|
850 |
+
},
|
851 |
+
{
|
852 |
+
"epoch": 1.04,
|
853 |
+
"learning_rate": 3.6527181492290277e-05,
|
854 |
+
"loss": 0.0435,
|
855 |
+
"step": 14100
|
856 |
+
},
|
857 |
+
{
|
858 |
+
"epoch": 1.05,
|
859 |
+
"learning_rate": 3.635502405190375e-05,
|
860 |
+
"loss": 0.0394,
|
861 |
+
"step": 14200
|
862 |
+
},
|
863 |
+
{
|
864 |
+
"epoch": 1.06,
|
865 |
+
"learning_rate": 3.618391721177532e-05,
|
866 |
+
"loss": 0.0442,
|
867 |
+
"step": 14300
|
868 |
+
},
|
869 |
+
{
|
870 |
+
"epoch": 1.06,
|
871 |
+
"learning_rate": 3.601041454923619e-05,
|
872 |
+
"loss": 0.0448,
|
873 |
+
"step": 14400
|
874 |
+
},
|
875 |
+
{
|
876 |
+
"epoch": 1.07,
|
877 |
+
"learning_rate": 3.583625143492436e-05,
|
878 |
+
"loss": 0.047,
|
879 |
+
"step": 14500
|
880 |
+
},
|
881 |
+
{
|
882 |
+
"epoch": 1.08,
|
883 |
+
"learning_rate": 3.5661438315888565e-05,
|
884 |
+
"loss": 0.0374,
|
885 |
+
"step": 14600
|
886 |
+
},
|
887 |
+
{
|
888 |
+
"epoch": 1.09,
|
889 |
+
"learning_rate": 3.5485985678167643e-05,
|
890 |
+
"loss": 0.0397,
|
891 |
+
"step": 14700
|
892 |
+
},
|
893 |
+
{
|
894 |
+
"epoch": 1.09,
|
895 |
+
"learning_rate": 3.530990404616147e-05,
|
896 |
+
"loss": 0.0398,
|
897 |
+
"step": 14800
|
898 |
+
},
|
899 |
+
{
|
900 |
+
"epoch": 1.1,
|
901 |
+
"learning_rate": 3.5133203981999684e-05,
|
902 |
+
"loss": 0.0461,
|
903 |
+
"step": 14900
|
904 |
+
},
|
905 |
+
{
|
906 |
+
"epoch": 1.11,
|
907 |
+
"learning_rate": 3.4955896084908166e-05,
|
908 |
+
"loss": 0.0374,
|
909 |
+
"step": 15000
|
910 |
+
}
|
911 |
+
],
|
912 |
+
"logging_steps": 100,
|
913 |
+
"max_steps": 40563,
|
914 |
+
"num_train_epochs": 3,
|
915 |
+
"save_steps": 5000,
|
916 |
+
"total_flos": 3.3477356574825185e+18,
|
917 |
+
"trial_name": null,
|
918 |
+
"trial_params": null
|
919 |
+
}
|
LLM-Detector-44w-EN/checkpoint-15000/training_args.bin
ADDED
@@ -0,0 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
3 |
+
base_model: ./Qwen-1_8B-Chat
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Shared by [optional]:** [More Information Needed]
|
22 |
+
- **Model type:** [More Information Needed]
|
23 |
+
- **Language(s) (NLP):** [More Information Needed]
|
24 |
+
- **License:** [More Information Needed]
|
25 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
26 |
+
|
27 |
+
### Model Sources [optional]
|
28 |
+
|
29 |
+
<!-- Provide the basic links for the model. -->
|
30 |
+
|
31 |
+
- **Repository:** [More Information Needed]
|
32 |
+
- **Paper [optional]:** [More Information Needed]
|
33 |
+
- **Demo [optional]:** [More Information Needed]
|
34 |
+
|
35 |
+
## Uses
|
36 |
+
|
37 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
+
|
39 |
+
### Direct Use
|
40 |
+
|
41 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
+
|
43 |
+
[More Information Needed]
|
44 |
+
|
45 |
+
### Downstream Use [optional]
|
46 |
+
|
47 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
+
|
49 |
+
[More Information Needed]
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
+
|
55 |
+
[More Information Needed]
|
56 |
+
|
57 |
+
## Bias, Risks, and Limitations
|
58 |
+
|
59 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
+
|
61 |
+
[More Information Needed]
|
62 |
+
|
63 |
+
### Recommendations
|
64 |
+
|
65 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
+
|
67 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
68 |
+
|
69 |
+
## How to Get Started with the Model
|
70 |
+
|
71 |
+
Use the code below to get started with the model.
|
72 |
+
|
73 |
+
[More Information Needed]
|
74 |
+
|
75 |
+
## Training Details
|
76 |
+
|
77 |
+
### Training Data
|
78 |
+
|
79 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
### Training Procedure
|
84 |
+
|
85 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
+
|
87 |
+
#### Preprocessing [optional]
|
88 |
+
|
89 |
+
[More Information Needed]
|
90 |
+
|
91 |
+
|
92 |
+
#### Training Hyperparameters
|
93 |
+
|
94 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
95 |
+
|
96 |
+
#### Speeds, Sizes, Times [optional]
|
97 |
+
|
98 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
## Evaluation
|
103 |
+
|
104 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
105 |
+
|
106 |
+
### Testing Data, Factors & Metrics
|
107 |
+
|
108 |
+
#### Testing Data
|
109 |
+
|
110 |
+
<!-- This should link to a Data Card if possible. -->
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Factors
|
115 |
+
|
116 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
#### Metrics
|
121 |
+
|
122 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Results
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
#### Summary
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
## Model Examination [optional]
|
135 |
+
|
136 |
+
<!-- Relevant interpretability work for the model goes here -->
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
## Environmental Impact
|
141 |
+
|
142 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
143 |
+
|
144 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
145 |
+
|
146 |
+
- **Hardware Type:** [More Information Needed]
|
147 |
+
- **Hours used:** [More Information Needed]
|
148 |
+
- **Cloud Provider:** [More Information Needed]
|
149 |
+
- **Compute Region:** [More Information Needed]
|
150 |
+
- **Carbon Emitted:** [More Information Needed]
|
151 |
+
|
152 |
+
## Technical Specifications [optional]
|
153 |
+
|
154 |
+
### Model Architecture and Objective
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
### Compute Infrastructure
|
159 |
+
|
160 |
+
[More Information Needed]
|
161 |
+
|
162 |
+
#### Hardware
|
163 |
+
|
164 |
+
[More Information Needed]
|
165 |
+
|
166 |
+
#### Software
|
167 |
+
|
168 |
+
[More Information Needed]
|
169 |
+
|
170 |
+
## Citation [optional]
|
171 |
+
|
172 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
173 |
+
|
174 |
+
**BibTeX:**
|
175 |
+
|
176 |
+
[More Information Needed]
|
177 |
+
|
178 |
+
**APA:**
|
179 |
+
|
180 |
+
[More Information Needed]
|
181 |
+
|
182 |
+
## Glossary [optional]
|
183 |
+
|
184 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
185 |
+
|
186 |
+
[More Information Needed]
|
187 |
+
|
188 |
+
## More Information [optional]
|
189 |
+
|
190 |
+
[More Information Needed]
|
191 |
+
|
192 |
+
## Model Card Authors [optional]
|
193 |
+
|
194 |
+
[More Information Needed]
|
195 |
+
|
196 |
+
## Model Card Contact
|
197 |
+
|
198 |
+
[More Information Needed]
|
199 |
+
|
200 |
+
|
201 |
+
## Training procedure
|
202 |
+
|
203 |
+
|
204 |
+
### Framework versions
|
205 |
+
|
206 |
+
|
207 |
+
- PEFT 0.6.2
|
LLM-Detector-44w-EN/checkpoint-20000/adapter_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "./Qwen-1_8B-Chat",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"lora_alpha": 16.0,
|
12 |
+
"lora_dropout": 0.1,
|
13 |
+
"modules_to_save": null,
|
14 |
+
"peft_type": "LORA",
|
15 |
+
"r": 8,
|
16 |
+
"rank_pattern": {},
|
17 |
+
"revision": null,
|
18 |
+
"target_modules": [
|
19 |
+
"c_attn"
|
20 |
+
],
|
21 |
+
"task_type": "CAUSAL_LM"
|
22 |
+
}
|
LLM-Detector-44w-EN/checkpoint-20000/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54aa4209357e0e092a924b8931d84311ab742706f8d12247fbb01ddd6ad1e191
|
3 |
+
size 6308670
|
LLM-Detector-44w-EN/checkpoint-20000/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8376c90a899e06dbba730be00352928f4ab55dcfc80eebcbf30d591d556ee51c
|
3 |
+
size 12623610
|
LLM-Detector-44w-EN/checkpoint-20000/qwen.tiktoken
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LLM-Detector-44w-EN/checkpoint-20000/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:669139e3d9745b87e9f2b66b1e696b22d8259c50c520380073d1d2e82fe53b8f
|
3 |
+
size 14244
|
LLM-Detector-44w-EN/checkpoint-20000/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:592afe39d005c6878933be2e25e00543d1542ce13e6db95ff894694639adfd9b
|
3 |
+
size 1064
|
LLM-Detector-44w-EN/checkpoint-20000/special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_end|>"
|
4 |
+
],
|
5 |
+
"eos_token": "<|endoftext|>",
|
6 |
+
"pad_token": "<|endoftext|>"
|
7 |
+
}
|
LLM-Detector-44w-EN/checkpoint-20000/tokenization_qwen.py
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
5 |
+
|
6 |
+
"""Tokenization classes for QWen."""
|
7 |
+
|
8 |
+
import base64
|
9 |
+
import logging
|
10 |
+
import os
|
11 |
+
import unicodedata
|
12 |
+
from typing import Collection, Dict, List, Set, Tuple, Union
|
13 |
+
|
14 |
+
import tiktoken
|
15 |
+
from transformers import PreTrainedTokenizer, AddedToken
|
16 |
+
|
17 |
+
logger = logging.getLogger(__name__)
|
18 |
+
|
19 |
+
|
20 |
+
VOCAB_FILES_NAMES = {"vocab_file": "qwen.tiktoken"}
|
21 |
+
|
22 |
+
PAT_STR = r"""(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"""
|
23 |
+
ENDOFTEXT = "<|endoftext|>"
|
24 |
+
IMSTART = "<|im_start|>"
|
25 |
+
IMEND = "<|im_end|>"
|
26 |
+
# as the default behavior is changed to allow special tokens in
|
27 |
+
# regular texts, the surface forms of special tokens need to be
|
28 |
+
# as different as possible to minimize the impact
|
29 |
+
EXTRAS = tuple((f"<|extra_{i}|>" for i in range(205)))
|
30 |
+
# changed to use actual index to avoid misconfiguration with vocabulary expansion
|
31 |
+
SPECIAL_START_ID = 151643
|
32 |
+
SPECIAL_TOKENS = tuple(
|
33 |
+
enumerate(
|
34 |
+
(
|
35 |
+
(
|
36 |
+
ENDOFTEXT,
|
37 |
+
IMSTART,
|
38 |
+
IMEND,
|
39 |
+
)
|
40 |
+
+ EXTRAS
|
41 |
+
),
|
42 |
+
start=SPECIAL_START_ID,
|
43 |
+
)
|
44 |
+
)
|
45 |
+
SPECIAL_TOKENS_SET = set(t for i, t in SPECIAL_TOKENS)
|
46 |
+
|
47 |
+
|
48 |
+
def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]:
|
49 |
+
with open(tiktoken_bpe_file, "rb") as f:
|
50 |
+
contents = f.read()
|
51 |
+
return {
|
52 |
+
base64.b64decode(token): int(rank)
|
53 |
+
for token, rank in (line.split() for line in contents.splitlines() if line)
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
class QWenTokenizer(PreTrainedTokenizer):
|
58 |
+
"""QWen tokenizer."""
|
59 |
+
|
60 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
61 |
+
|
62 |
+
def __init__(
|
63 |
+
self,
|
64 |
+
vocab_file,
|
65 |
+
errors="replace",
|
66 |
+
extra_vocab_file=None,
|
67 |
+
**kwargs,
|
68 |
+
):
|
69 |
+
super().__init__(**kwargs)
|
70 |
+
|
71 |
+
# how to handle errors in decoding UTF-8 byte sequences
|
72 |
+
# use ignore if you are in streaming inference
|
73 |
+
self.errors = errors
|
74 |
+
|
75 |
+
self.mergeable_ranks = _load_tiktoken_bpe(vocab_file) # type: Dict[bytes, int]
|
76 |
+
self.special_tokens = {
|
77 |
+
token: index
|
78 |
+
for index, token in SPECIAL_TOKENS
|
79 |
+
}
|
80 |
+
|
81 |
+
# try load extra vocab from file
|
82 |
+
if extra_vocab_file is not None:
|
83 |
+
used_ids = set(self.mergeable_ranks.values()) | set(self.special_tokens.values())
|
84 |
+
extra_mergeable_ranks = _load_tiktoken_bpe(extra_vocab_file)
|
85 |
+
for token, index in extra_mergeable_ranks.items():
|
86 |
+
if token in self.mergeable_ranks:
|
87 |
+
logger.info(f"extra token {token} exists, skipping")
|
88 |
+
continue
|
89 |
+
if index in used_ids:
|
90 |
+
logger.info(f'the index {index} for extra token {token} exists, skipping')
|
91 |
+
continue
|
92 |
+
self.mergeable_ranks[token] = index
|
93 |
+
# the index may be sparse after this, but don't worry tiktoken.Encoding will handle this
|
94 |
+
|
95 |
+
enc = tiktoken.Encoding(
|
96 |
+
"Qwen",
|
97 |
+
pat_str=PAT_STR,
|
98 |
+
mergeable_ranks=self.mergeable_ranks,
|
99 |
+
special_tokens=self.special_tokens,
|
100 |
+
)
|
101 |
+
assert (
|
102 |
+
len(self.mergeable_ranks) + len(self.special_tokens) == enc.n_vocab
|
103 |
+
), f"{len(self.mergeable_ranks) + len(self.special_tokens)} != {enc.n_vocab} in encoding"
|
104 |
+
|
105 |
+
self.decoder = {
|
106 |
+
v: k for k, v in self.mergeable_ranks.items()
|
107 |
+
} # type: dict[int, bytes|str]
|
108 |
+
self.decoder.update({v: k for k, v in self.special_tokens.items()})
|
109 |
+
|
110 |
+
self.tokenizer = enc # type: tiktoken.Encoding
|
111 |
+
|
112 |
+
self.eod_id = self.tokenizer.eot_token
|
113 |
+
self.im_start_id = self.special_tokens[IMSTART]
|
114 |
+
self.im_end_id = self.special_tokens[IMEND]
|
115 |
+
|
116 |
+
def __getstate__(self):
|
117 |
+
# for pickle lovers
|
118 |
+
state = self.__dict__.copy()
|
119 |
+
del state["tokenizer"]
|
120 |
+
return state
|
121 |
+
|
122 |
+
def __setstate__(self, state):
|
123 |
+
# tokenizer is not python native; don't pass it; rebuild it
|
124 |
+
self.__dict__.update(state)
|
125 |
+
enc = tiktoken.Encoding(
|
126 |
+
"Qwen",
|
127 |
+
pat_str=PAT_STR,
|
128 |
+
mergeable_ranks=self.mergeable_ranks,
|
129 |
+
special_tokens=self.special_tokens,
|
130 |
+
)
|
131 |
+
self.tokenizer = enc
|
132 |
+
|
133 |
+
def __len__(self) -> int:
|
134 |
+
return self.tokenizer.n_vocab
|
135 |
+
|
136 |
+
def get_vocab(self) -> Dict[bytes, int]:
|
137 |
+
return self.mergeable_ranks
|
138 |
+
|
139 |
+
def convert_tokens_to_ids(
|
140 |
+
self, tokens: Union[bytes, str, List[Union[bytes, str]]]
|
141 |
+
) -> List[int]:
|
142 |
+
ids = []
|
143 |
+
if isinstance(tokens, (str, bytes)):
|
144 |
+
if tokens in self.special_tokens:
|
145 |
+
return self.special_tokens[tokens]
|
146 |
+
else:
|
147 |
+
return self.mergeable_ranks.get(tokens)
|
148 |
+
for token in tokens:
|
149 |
+
if token in self.special_tokens:
|
150 |
+
ids.append(self.special_tokens[token])
|
151 |
+
else:
|
152 |
+
ids.append(self.mergeable_ranks.get(token))
|
153 |
+
return ids
|
154 |
+
|
155 |
+
def _add_tokens(
|
156 |
+
self,
|
157 |
+
new_tokens: Union[List[str], List[AddedToken]],
|
158 |
+
special_tokens: bool = False,
|
159 |
+
) -> int:
|
160 |
+
if not special_tokens and new_tokens:
|
161 |
+
raise ValueError("Adding regular tokens is not supported")
|
162 |
+
for token in new_tokens:
|
163 |
+
surface_form = token.content if isinstance(token, AddedToken) else token
|
164 |
+
if surface_form not in SPECIAL_TOKENS_SET:
|
165 |
+
raise ValueError("Adding unknown special tokens is not supported")
|
166 |
+
return 0
|
167 |
+
|
168 |
+
def save_vocabulary(self, save_directory: str, **kwargs) -> Tuple[str]:
|
169 |
+
"""
|
170 |
+
Save only the vocabulary of the tokenizer (vocabulary).
|
171 |
+
|
172 |
+
Returns:
|
173 |
+
`Tuple(str)`: Paths to the files saved.
|
174 |
+
"""
|
175 |
+
file_path = os.path.join(save_directory, "qwen.tiktoken")
|
176 |
+
with open(file_path, "w", encoding="utf8") as w:
|
177 |
+
for k, v in self.mergeable_ranks.items():
|
178 |
+
line = base64.b64encode(k).decode("utf8") + " " + str(v) + "\n"
|
179 |
+
w.write(line)
|
180 |
+
return (file_path,)
|
181 |
+
|
182 |
+
def tokenize(
|
183 |
+
self,
|
184 |
+
text: str,
|
185 |
+
allowed_special: Union[Set, str] = "all",
|
186 |
+
disallowed_special: Union[Collection, str] = (),
|
187 |
+
**kwargs,
|
188 |
+
) -> List[Union[bytes, str]]:
|
189 |
+
"""
|
190 |
+
Converts a string in a sequence of tokens.
|
191 |
+
|
192 |
+
Args:
|
193 |
+
text (`str`):
|
194 |
+
The sequence to be encoded.
|
195 |
+
allowed_special (`Literal["all"]` or `set`):
|
196 |
+
The surface forms of the tokens to be encoded as special tokens in regular texts.
|
197 |
+
Default to "all".
|
198 |
+
disallowed_special (`Literal["all"]` or `Collection`):
|
199 |
+
The surface forms of the tokens that should not be in regular texts and trigger errors.
|
200 |
+
Default to an empty tuple.
|
201 |
+
|
202 |
+
kwargs (additional keyword arguments, *optional*):
|
203 |
+
Will be passed to the underlying model specific encode method.
|
204 |
+
|
205 |
+
Returns:
|
206 |
+
`List[bytes|str]`: The list of tokens.
|
207 |
+
"""
|
208 |
+
tokens = []
|
209 |
+
text = unicodedata.normalize("NFC", text)
|
210 |
+
|
211 |
+
# this implementation takes a detour: text -> token id -> token surface forms
|
212 |
+
for t in self.tokenizer.encode(
|
213 |
+
text, allowed_special=allowed_special, disallowed_special=disallowed_special
|
214 |
+
):
|
215 |
+
tokens.append(self.decoder[t])
|
216 |
+
return tokens
|
217 |
+
|
218 |
+
def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) -> str:
|
219 |
+
"""
|
220 |
+
Converts a sequence of tokens in a single string.
|
221 |
+
"""
|
222 |
+
text = ""
|
223 |
+
temp = b""
|
224 |
+
for t in tokens:
|
225 |
+
if isinstance(t, str):
|
226 |
+
if temp:
|
227 |
+
text += temp.decode("utf-8", errors=self.errors)
|
228 |
+
temp = b""
|
229 |
+
text += t
|
230 |
+
elif isinstance(t, bytes):
|
231 |
+
temp += t
|
232 |
+
else:
|
233 |
+
raise TypeError("token should only be of type types or str")
|
234 |
+
if temp:
|
235 |
+
text += temp.decode("utf-8", errors=self.errors)
|
236 |
+
return text
|
237 |
+
|
238 |
+
@property
|
239 |
+
def vocab_size(self):
|
240 |
+
return self.tokenizer.n_vocab
|
241 |
+
|
242 |
+
def _convert_id_to_token(self, index: int) -> Union[bytes, str]:
|
243 |
+
"""Converts an id to a token, special tokens included"""
|
244 |
+
if index in self.decoder:
|
245 |
+
return self.decoder[index]
|
246 |
+
raise ValueError("unknown ids")
|
247 |
+
|
248 |
+
def _convert_token_to_id(self, token: Union[bytes, str]) -> int:
|
249 |
+
"""Converts a token to an id using the vocab, special tokens included"""
|
250 |
+
if token in self.special_tokens:
|
251 |
+
return self.special_tokens[token]
|
252 |
+
if token in self.mergeable_ranks:
|
253 |
+
return self.mergeable_ranks[token]
|
254 |
+
raise ValueError("unknown token")
|
255 |
+
|
256 |
+
def _tokenize(self, text: str, **kwargs):
|
257 |
+
"""
|
258 |
+
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based
|
259 |
+
vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).
|
260 |
+
|
261 |
+
Do NOT take care of added tokens.
|
262 |
+
"""
|
263 |
+
raise NotImplementedError
|
264 |
+
|
265 |
+
def _decode(
|
266 |
+
self,
|
267 |
+
token_ids: Union[int, List[int]],
|
268 |
+
skip_special_tokens: bool = False,
|
269 |
+
errors: str = None,
|
270 |
+
**kwargs,
|
271 |
+
) -> str:
|
272 |
+
if isinstance(token_ids, int):
|
273 |
+
token_ids = [token_ids]
|
274 |
+
if skip_special_tokens:
|
275 |
+
token_ids = [i for i in token_ids if i < self.eod_id]
|
276 |
+
return self.tokenizer.decode(token_ids, errors=errors or self.errors)
|
LLM-Detector-44w-EN/checkpoint-20000/tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoTokenizer": [
|
4 |
+
"tokenization_qwen.QWenTokenizer",
|
5 |
+
null
|
6 |
+
]
|
7 |
+
},
|
8 |
+
"clean_up_tokenization_spaces": true,
|
9 |
+
"model_max_length": 8192,
|
10 |
+
"padding_side": "right",
|
11 |
+
"split_special_tokens": false,
|
12 |
+
"tokenizer_class": "QWenTokenizer"
|
13 |
+
}
|
LLM-Detector-44w-EN/checkpoint-20000/trainer_state.json
ADDED
@@ -0,0 +1,1219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.4791258366305513,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 20000,
|
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.01,
|
13 |
+
"learning_rate": 4.999925019651876e-05,
|
14 |
+
"loss": 3.2124,
|
15 |
+
"step": 100
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"epoch": 0.01,
|
19 |
+
"learning_rate": 4.9997000831051485e-05,
|
20 |
+
"loss": 0.2834,
|
21 |
+
"step": 200
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"epoch": 0.02,
|
25 |
+
"learning_rate": 4.999325203852471e-05,
|
26 |
+
"loss": 0.2178,
|
27 |
+
"step": 300
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 0.03,
|
31 |
+
"learning_rate": 4.998800404380707e-05,
|
32 |
+
"loss": 0.1782,
|
33 |
+
"step": 400
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"epoch": 0.04,
|
37 |
+
"learning_rate": 4.9981257161695735e-05,
|
38 |
+
"loss": 0.1501,
|
39 |
+
"step": 500
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.04,
|
43 |
+
"learning_rate": 4.997301179689756e-05,
|
44 |
+
"loss": 0.1376,
|
45 |
+
"step": 600
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 0.05,
|
49 |
+
"learning_rate": 4.996326844400481e-05,
|
50 |
+
"loss": 0.1161,
|
51 |
+
"step": 700
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.06,
|
55 |
+
"learning_rate": 4.9952027687465465e-05,
|
56 |
+
"loss": 0.1163,
|
57 |
+
"step": 800
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"epoch": 0.07,
|
61 |
+
"learning_rate": 4.9939290201548214e-05,
|
62 |
+
"loss": 0.1157,
|
63 |
+
"step": 900
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"epoch": 0.07,
|
67 |
+
"learning_rate": 4.992505675030195e-05,
|
68 |
+
"loss": 0.1048,
|
69 |
+
"step": 1000
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 0.08,
|
73 |
+
"learning_rate": 4.9909328187509964e-05,
|
74 |
+
"loss": 0.1073,
|
75 |
+
"step": 1100
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"epoch": 0.09,
|
79 |
+
"learning_rate": 4.989210545663877e-05,
|
80 |
+
"loss": 0.1047,
|
81 |
+
"step": 1200
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"epoch": 0.1,
|
85 |
+
"learning_rate": 4.987338959078144e-05,
|
86 |
+
"loss": 0.1066,
|
87 |
+
"step": 1300
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"epoch": 0.1,
|
91 |
+
"learning_rate": 4.9853181712595686e-05,
|
92 |
+
"loss": 0.1011,
|
93 |
+
"step": 1400
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 0.11,
|
97 |
+
"learning_rate": 4.98314830342365e-05,
|
98 |
+
"loss": 0.0947,
|
99 |
+
"step": 1500
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 0.12,
|
103 |
+
"learning_rate": 4.9808294857283454e-05,
|
104 |
+
"loss": 0.0916,
|
105 |
+
"step": 1600
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"epoch": 0.13,
|
109 |
+
"learning_rate": 4.97836185726626e-05,
|
110 |
+
"loss": 0.0933,
|
111 |
+
"step": 1700
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"epoch": 0.13,
|
115 |
+
"learning_rate": 4.9757455660563085e-05,
|
116 |
+
"loss": 0.089,
|
117 |
+
"step": 1800
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"epoch": 0.14,
|
121 |
+
"learning_rate": 4.9729807690348297e-05,
|
122 |
+
"loss": 0.0872,
|
123 |
+
"step": 1900
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"epoch": 0.15,
|
127 |
+
"learning_rate": 4.9700676320461794e-05,
|
128 |
+
"loss": 0.0898,
|
129 |
+
"step": 2000
|
130 |
+
},
|
131 |
+
{
|
132 |
+
"epoch": 0.16,
|
133 |
+
"learning_rate": 4.9670376756771875e-05,
|
134 |
+
"loss": 0.0894,
|
135 |
+
"step": 2100
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 0.16,
|
139 |
+
"learning_rate": 4.963829870746861e-05,
|
140 |
+
"loss": 0.0859,
|
141 |
+
"step": 2200
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"epoch": 0.17,
|
145 |
+
"learning_rate": 4.960474274759395e-05,
|
146 |
+
"loss": 0.0826,
|
147 |
+
"step": 2300
|
148 |
+
},
|
149 |
+
{
|
150 |
+
"epoch": 0.18,
|
151 |
+
"learning_rate": 4.956971088997792e-05,
|
152 |
+
"loss": 0.0816,
|
153 |
+
"step": 2400
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"epoch": 0.18,
|
157 |
+
"learning_rate": 4.953320523598123e-05,
|
158 |
+
"loss": 0.074,
|
159 |
+
"step": 2500
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"epoch": 0.19,
|
163 |
+
"learning_rate": 4.9495227975369186e-05,
|
164 |
+
"loss": 0.0896,
|
165 |
+
"step": 2600
|
166 |
+
},
|
167 |
+
{
|
168 |
+
"epoch": 0.2,
|
169 |
+
"learning_rate": 4.945578138618039e-05,
|
170 |
+
"loss": 0.0768,
|
171 |
+
"step": 2700
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"epoch": 0.21,
|
175 |
+
"learning_rate": 4.941486783459001e-05,
|
176 |
+
"loss": 0.0779,
|
177 |
+
"step": 2800
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 0.21,
|
181 |
+
"learning_rate": 4.937248977476793e-05,
|
182 |
+
"loss": 0.0814,
|
183 |
+
"step": 2900
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"epoch": 0.22,
|
187 |
+
"learning_rate": 4.9328649748731495e-05,
|
188 |
+
"loss": 0.0727,
|
189 |
+
"step": 3000
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"epoch": 0.23,
|
193 |
+
"learning_rate": 4.928335038619302e-05,
|
194 |
+
"loss": 0.0806,
|
195 |
+
"step": 3100
|
196 |
+
},
|
197 |
+
{
|
198 |
+
"epoch": 0.24,
|
199 |
+
"learning_rate": 4.9236594404402104e-05,
|
200 |
+
"loss": 0.0709,
|
201 |
+
"step": 3200
|
202 |
+
},
|
203 |
+
{
|
204 |
+
"epoch": 0.24,
|
205 |
+
"learning_rate": 4.9188384607982565e-05,
|
206 |
+
"loss": 0.0746,
|
207 |
+
"step": 3300
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"epoch": 0.25,
|
211 |
+
"learning_rate": 4.913872388876427e-05,
|
212 |
+
"loss": 0.0805,
|
213 |
+
"step": 3400
|
214 |
+
},
|
215 |
+
{
|
216 |
+
"epoch": 0.26,
|
217 |
+
"learning_rate": 4.908761522560962e-05,
|
218 |
+
"loss": 0.0726,
|
219 |
+
"step": 3500
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"epoch": 0.27,
|
223 |
+
"learning_rate": 4.903506168423491e-05,
|
224 |
+
"loss": 0.0715,
|
225 |
+
"step": 3600
|
226 |
+
},
|
227 |
+
{
|
228 |
+
"epoch": 0.27,
|
229 |
+
"learning_rate": 4.898106641702639e-05,
|
230 |
+
"loss": 0.0751,
|
231 |
+
"step": 3700
|
232 |
+
},
|
233 |
+
{
|
234 |
+
"epoch": 0.28,
|
235 |
+
"learning_rate": 4.892563266285121e-05,
|
236 |
+
"loss": 0.0818,
|
237 |
+
"step": 3800
|
238 |
+
},
|
239 |
+
{
|
240 |
+
"epoch": 0.29,
|
241 |
+
"learning_rate": 4.886876374686313e-05,
|
242 |
+
"loss": 0.0651,
|
243 |
+
"step": 3900
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"epoch": 0.3,
|
247 |
+
"learning_rate": 4.881046308030303e-05,
|
248 |
+
"loss": 0.0806,
|
249 |
+
"step": 4000
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"epoch": 0.3,
|
253 |
+
"learning_rate": 4.87513385076558e-05,
|
254 |
+
"loss": 0.0803,
|
255 |
+
"step": 4100
|
256 |
+
},
|
257 |
+
{
|
258 |
+
"epoch": 0.31,
|
259 |
+
"learning_rate": 4.869019914568559e-05,
|
260 |
+
"loss": 0.0717,
|
261 |
+
"step": 4200
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"epoch": 0.32,
|
265 |
+
"learning_rate": 4.8627638744212125e-05,
|
266 |
+
"loss": 0.0678,
|
267 |
+
"step": 4300
|
268 |
+
},
|
269 |
+
{
|
270 |
+
"epoch": 0.33,
|
271 |
+
"learning_rate": 4.8563661055875955e-05,
|
272 |
+
"loss": 0.0681,
|
273 |
+
"step": 4400
|
274 |
+
},
|
275 |
+
{
|
276 |
+
"epoch": 0.33,
|
277 |
+
"learning_rate": 4.849826991833256e-05,
|
278 |
+
"loss": 0.0668,
|
279 |
+
"step": 4500
|
280 |
+
},
|
281 |
+
{
|
282 |
+
"epoch": 0.34,
|
283 |
+
"learning_rate": 4.8431469254022146e-05,
|
284 |
+
"loss": 0.0717,
|
285 |
+
"step": 4600
|
286 |
+
},
|
287 |
+
{
|
288 |
+
"epoch": 0.35,
|
289 |
+
"learning_rate": 4.8363263069934364e-05,
|
290 |
+
"loss": 0.0681,
|
291 |
+
"step": 4700
|
292 |
+
},
|
293 |
+
{
|
294 |
+
"epoch": 0.35,
|
295 |
+
"learning_rate": 4.829365545736794e-05,
|
296 |
+
"loss": 0.0703,
|
297 |
+
"step": 4800
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"epoch": 0.36,
|
301 |
+
"learning_rate": 4.8222650591685316e-05,
|
302 |
+
"loss": 0.0625,
|
303 |
+
"step": 4900
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"epoch": 0.37,
|
307 |
+
"learning_rate": 4.815025273206212e-05,
|
308 |
+
"loss": 0.066,
|
309 |
+
"step": 5000
|
310 |
+
},
|
311 |
+
{
|
312 |
+
"epoch": 0.38,
|
313 |
+
"learning_rate": 4.807646622123172e-05,
|
314 |
+
"loss": 0.0707,
|
315 |
+
"step": 5100
|
316 |
+
},
|
317 |
+
{
|
318 |
+
"epoch": 0.38,
|
319 |
+
"learning_rate": 4.800129548522474e-05,
|
320 |
+
"loss": 0.061,
|
321 |
+
"step": 5200
|
322 |
+
},
|
323 |
+
{
|
324 |
+
"epoch": 0.39,
|
325 |
+
"learning_rate": 4.7924745033103533e-05,
|
326 |
+
"loss": 0.0645,
|
327 |
+
"step": 5300
|
328 |
+
},
|
329 |
+
{
|
330 |
+
"epoch": 0.4,
|
331 |
+
"learning_rate": 4.784681945669176e-05,
|
332 |
+
"loss": 0.0669,
|
333 |
+
"step": 5400
|
334 |
+
},
|
335 |
+
{
|
336 |
+
"epoch": 0.41,
|
337 |
+
"learning_rate": 4.776752343029888e-05,
|
338 |
+
"loss": 0.059,
|
339 |
+
"step": 5500
|
340 |
+
},
|
341 |
+
{
|
342 |
+
"epoch": 0.41,
|
343 |
+
"learning_rate": 4.768686171043982e-05,
|
344 |
+
"loss": 0.0641,
|
345 |
+
"step": 5600
|
346 |
+
},
|
347 |
+
{
|
348 |
+
"epoch": 0.42,
|
349 |
+
"learning_rate": 4.760483913554966e-05,
|
350 |
+
"loss": 0.0619,
|
351 |
+
"step": 5700
|
352 |
+
},
|
353 |
+
{
|
354 |
+
"epoch": 0.43,
|
355 |
+
"learning_rate": 4.7522301106315205e-05,
|
356 |
+
"loss": 0.0616,
|
357 |
+
"step": 5800
|
358 |
+
},
|
359 |
+
{
|
360 |
+
"epoch": 0.44,
|
361 |
+
"learning_rate": 4.7437585147204955e-05,
|
362 |
+
"loss": 0.0625,
|
363 |
+
"step": 5900
|
364 |
+
},
|
365 |
+
{
|
366 |
+
"epoch": 0.44,
|
367 |
+
"learning_rate": 4.7351523285738384e-05,
|
368 |
+
"loss": 0.0594,
|
369 |
+
"step": 6000
|
370 |
+
},
|
371 |
+
{
|
372 |
+
"epoch": 0.45,
|
373 |
+
"learning_rate": 4.726412068427418e-05,
|
374 |
+
"loss": 0.0616,
|
375 |
+
"step": 6100
|
376 |
+
},
|
377 |
+
{
|
378 |
+
"epoch": 0.46,
|
379 |
+
"learning_rate": 4.717538258559431e-05,
|
380 |
+
"loss": 0.0657,
|
381 |
+
"step": 6200
|
382 |
+
},
|
383 |
+
{
|
384 |
+
"epoch": 0.47,
|
385 |
+
"learning_rate": 4.7085314312589614e-05,
|
386 |
+
"loss": 0.0631,
|
387 |
+
"step": 6300
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"epoch": 0.47,
|
391 |
+
"learning_rate": 4.699392126794045e-05,
|
392 |
+
"loss": 0.0503,
|
393 |
+
"step": 6400
|
394 |
+
},
|
395 |
+
{
|
396 |
+
"epoch": 0.48,
|
397 |
+
"learning_rate": 4.6901208933792675e-05,
|
398 |
+
"loss": 0.0652,
|
399 |
+
"step": 6500
|
400 |
+
},
|
401 |
+
{
|
402 |
+
"epoch": 0.49,
|
403 |
+
"learning_rate": 4.680718287142875e-05,
|
404 |
+
"loss": 0.0571,
|
405 |
+
"step": 6600
|
406 |
+
},
|
407 |
+
{
|
408 |
+
"epoch": 0.5,
|
409 |
+
"learning_rate": 4.671184872093419e-05,
|
410 |
+
"loss": 0.054,
|
411 |
+
"step": 6700
|
412 |
+
},
|
413 |
+
{
|
414 |
+
"epoch": 0.5,
|
415 |
+
"learning_rate": 4.661521220085923e-05,
|
416 |
+
"loss": 0.0628,
|
417 |
+
"step": 6800
|
418 |
+
},
|
419 |
+
{
|
420 |
+
"epoch": 0.51,
|
421 |
+
"learning_rate": 4.65172791078758e-05,
|
422 |
+
"loss": 0.0554,
|
423 |
+
"step": 6900
|
424 |
+
},
|
425 |
+
{
|
426 |
+
"epoch": 0.52,
|
427 |
+
"learning_rate": 4.641805531642983e-05,
|
428 |
+
"loss": 0.059,
|
429 |
+
"step": 7000
|
430 |
+
},
|
431 |
+
{
|
432 |
+
"epoch": 0.53,
|
433 |
+
"learning_rate": 4.631754677838885e-05,
|
434 |
+
"loss": 0.0557,
|
435 |
+
"step": 7100
|
436 |
+
},
|
437 |
+
{
|
438 |
+
"epoch": 0.53,
|
439 |
+
"learning_rate": 4.621575952268501e-05,
|
440 |
+
"loss": 0.0579,
|
441 |
+
"step": 7200
|
442 |
+
},
|
443 |
+
{
|
444 |
+
"epoch": 0.54,
|
445 |
+
"learning_rate": 4.6112699654953394e-05,
|
446 |
+
"loss": 0.0594,
|
447 |
+
"step": 7300
|
448 |
+
},
|
449 |
+
{
|
450 |
+
"epoch": 0.55,
|
451 |
+
"learning_rate": 4.600837335716581e-05,
|
452 |
+
"loss": 0.0652,
|
453 |
+
"step": 7400
|
454 |
+
},
|
455 |
+
{
|
456 |
+
"epoch": 0.55,
|
457 |
+
"learning_rate": 4.590278688725998e-05,
|
458 |
+
"loss": 0.0509,
|
459 |
+
"step": 7500
|
460 |
+
},
|
461 |
+
{
|
462 |
+
"epoch": 0.56,
|
463 |
+
"learning_rate": 4.579594657876408e-05,
|
464 |
+
"loss": 0.0658,
|
465 |
+
"step": 7600
|
466 |
+
},
|
467 |
+
{
|
468 |
+
"epoch": 0.57,
|
469 |
+
"learning_rate": 4.568785884041696e-05,
|
470 |
+
"loss": 0.054,
|
471 |
+
"step": 7700
|
472 |
+
},
|
473 |
+
{
|
474 |
+
"epoch": 0.58,
|
475 |
+
"learning_rate": 4.557853015578361e-05,
|
476 |
+
"loss": 0.0543,
|
477 |
+
"step": 7800
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"epoch": 0.58,
|
481 |
+
"learning_rate": 4.5467967082866306e-05,
|
482 |
+
"loss": 0.0552,
|
483 |
+
"step": 7900
|
484 |
+
},
|
485 |
+
{
|
486 |
+
"epoch": 0.59,
|
487 |
+
"learning_rate": 4.535730021743883e-05,
|
488 |
+
"loss": 0.0615,
|
489 |
+
"step": 8000
|
490 |
+
},
|
491 |
+
{
|
492 |
+
"epoch": 0.6,
|
493 |
+
"learning_rate": 4.52443005148096e-05,
|
494 |
+
"loss": 0.0567,
|
495 |
+
"step": 8100
|
496 |
+
},
|
497 |
+
{
|
498 |
+
"epoch": 0.61,
|
499 |
+
"learning_rate": 4.5130086472420265e-05,
|
500 |
+
"loss": 0.0519,
|
501 |
+
"step": 8200
|
502 |
+
},
|
503 |
+
{
|
504 |
+
"epoch": 0.61,
|
505 |
+
"learning_rate": 4.5014664941317766e-05,
|
506 |
+
"loss": 0.0573,
|
507 |
+
"step": 8300
|
508 |
+
},
|
509 |
+
{
|
510 |
+
"epoch": 0.62,
|
511 |
+
"learning_rate": 4.489804284497936e-05,
|
512 |
+
"loss": 0.053,
|
513 |
+
"step": 8400
|
514 |
+
},
|
515 |
+
{
|
516 |
+
"epoch": 0.63,
|
517 |
+
"learning_rate": 4.4780227178897366e-05,
|
518 |
+
"loss": 0.0658,
|
519 |
+
"step": 8500
|
520 |
+
},
|
521 |
+
{
|
522 |
+
"epoch": 0.64,
|
523 |
+
"learning_rate": 4.46612250101595e-05,
|
524 |
+
"loss": 0.0574,
|
525 |
+
"step": 8600
|
526 |
+
},
|
527 |
+
{
|
528 |
+
"epoch": 0.64,
|
529 |
+
"learning_rate": 4.4541043477025e-05,
|
530 |
+
"loss": 0.0608,
|
531 |
+
"step": 8700
|
532 |
+
},
|
533 |
+
{
|
534 |
+
"epoch": 0.65,
|
535 |
+
"learning_rate": 4.441968978849641e-05,
|
536 |
+
"loss": 0.0471,
|
537 |
+
"step": 8800
|
538 |
+
},
|
539 |
+
{
|
540 |
+
"epoch": 0.66,
|
541 |
+
"learning_rate": 4.4297171223887194e-05,
|
542 |
+
"loss": 0.0598,
|
543 |
+
"step": 8900
|
544 |
+
},
|
545 |
+
{
|
546 |
+
"epoch": 0.67,
|
547 |
+
"learning_rate": 4.4173495132385035e-05,
|
548 |
+
"loss": 0.0549,
|
549 |
+
"step": 9000
|
550 |
+
},
|
551 |
+
{
|
552 |
+
"epoch": 0.67,
|
553 |
+
"learning_rate": 4.404866893261106e-05,
|
554 |
+
"loss": 0.0529,
|
555 |
+
"step": 9100
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"epoch": 0.68,
|
559 |
+
"learning_rate": 4.39227001121748e-05,
|
560 |
+
"loss": 0.0529,
|
561 |
+
"step": 9200
|
562 |
+
},
|
563 |
+
{
|
564 |
+
"epoch": 0.69,
|
565 |
+
"learning_rate": 4.3795596227225066e-05,
|
566 |
+
"loss": 0.0568,
|
567 |
+
"step": 9300
|
568 |
+
},
|
569 |
+
{
|
570 |
+
"epoch": 0.7,
|
571 |
+
"learning_rate": 4.366736490199668e-05,
|
572 |
+
"loss": 0.0602,
|
573 |
+
"step": 9400
|
574 |
+
},
|
575 |
+
{
|
576 |
+
"epoch": 0.7,
|
577 |
+
"learning_rate": 4.353801382835318e-05,
|
578 |
+
"loss": 0.053,
|
579 |
+
"step": 9500
|
580 |
+
},
|
581 |
+
{
|
582 |
+
"epoch": 0.71,
|
583 |
+
"learning_rate": 4.340755076532538e-05,
|
584 |
+
"loss": 0.0498,
|
585 |
+
"step": 9600
|
586 |
+
},
|
587 |
+
{
|
588 |
+
"epoch": 0.72,
|
589 |
+
"learning_rate": 4.3275983538645995e-05,
|
590 |
+
"loss": 0.0509,
|
591 |
+
"step": 9700
|
592 |
+
},
|
593 |
+
{
|
594 |
+
"epoch": 0.72,
|
595 |
+
"learning_rate": 4.314332004028019e-05,
|
596 |
+
"loss": 0.0552,
|
597 |
+
"step": 9800
|
598 |
+
},
|
599 |
+
{
|
600 |
+
"epoch": 0.73,
|
601 |
+
"learning_rate": 4.3009568227952194e-05,
|
602 |
+
"loss": 0.0565,
|
603 |
+
"step": 9900
|
604 |
+
},
|
605 |
+
{
|
606 |
+
"epoch": 0.74,
|
607 |
+
"learning_rate": 4.287473612466796e-05,
|
608 |
+
"loss": 0.0573,
|
609 |
+
"step": 10000
|
610 |
+
},
|
611 |
+
{
|
612 |
+
"epoch": 0.75,
|
613 |
+
"learning_rate": 4.273883181823394e-05,
|
614 |
+
"loss": 0.0477,
|
615 |
+
"step": 10100
|
616 |
+
},
|
617 |
+
{
|
618 |
+
"epoch": 0.75,
|
619 |
+
"learning_rate": 4.2603238384474695e-05,
|
620 |
+
"loss": 0.0522,
|
621 |
+
"step": 10200
|
622 |
+
},
|
623 |
+
{
|
624 |
+
"epoch": 0.76,
|
625 |
+
"learning_rate": 4.24652247094062e-05,
|
626 |
+
"loss": 0.0515,
|
627 |
+
"step": 10300
|
628 |
+
},
|
629 |
+
{
|
630 |
+
"epoch": 0.77,
|
631 |
+
"learning_rate": 4.23261633954347e-05,
|
632 |
+
"loss": 0.0478,
|
633 |
+
"step": 10400
|
634 |
+
},
|
635 |
+
{
|
636 |
+
"epoch": 0.78,
|
637 |
+
"learning_rate": 4.218606278405277e-05,
|
638 |
+
"loss": 0.0535,
|
639 |
+
"step": 10500
|
640 |
+
},
|
641 |
+
{
|
642 |
+
"epoch": 0.78,
|
643 |
+
"learning_rate": 4.20449312790945e-05,
|
644 |
+
"loss": 0.0481,
|
645 |
+
"step": 10600
|
646 |
+
},
|
647 |
+
{
|
648 |
+
"epoch": 0.79,
|
649 |
+
"learning_rate": 4.1902777346231383e-05,
|
650 |
+
"loss": 0.0487,
|
651 |
+
"step": 10700
|
652 |
+
},
|
653 |
+
{
|
654 |
+
"epoch": 0.8,
|
655 |
+
"learning_rate": 4.175960951246454e-05,
|
656 |
+
"loss": 0.0429,
|
657 |
+
"step": 10800
|
658 |
+
},
|
659 |
+
{
|
660 |
+
"epoch": 0.81,
|
661 |
+
"learning_rate": 4.161543636561316e-05,
|
662 |
+
"loss": 0.0485,
|
663 |
+
"step": 10900
|
664 |
+
},
|
665 |
+
{
|
666 |
+
"epoch": 0.81,
|
667 |
+
"learning_rate": 4.147026655379945e-05,
|
668 |
+
"loss": 0.0486,
|
669 |
+
"step": 11000
|
670 |
+
},
|
671 |
+
{
|
672 |
+
"epoch": 0.82,
|
673 |
+
"learning_rate": 4.132410878492983e-05,
|
674 |
+
"loss": 0.0484,
|
675 |
+
"step": 11100
|
676 |
+
},
|
677 |
+
{
|
678 |
+
"epoch": 0.83,
|
679 |
+
"learning_rate": 4.1176971826172596e-05,
|
680 |
+
"loss": 0.0485,
|
681 |
+
"step": 11200
|
682 |
+
},
|
683 |
+
{
|
684 |
+
"epoch": 0.84,
|
685 |
+
"learning_rate": 4.1028864503432085e-05,
|
686 |
+
"loss": 0.0545,
|
687 |
+
"step": 11300
|
688 |
+
},
|
689 |
+
{
|
690 |
+
"epoch": 0.84,
|
691 |
+
"learning_rate": 4.087979570081917e-05,
|
692 |
+
"loss": 0.0436,
|
693 |
+
"step": 11400
|
694 |
+
},
|
695 |
+
{
|
696 |
+
"epoch": 0.85,
|
697 |
+
"learning_rate": 4.072977436011844e-05,
|
698 |
+
"loss": 0.0492,
|
699 |
+
"step": 11500
|
700 |
+
},
|
701 |
+
{
|
702 |
+
"epoch": 0.86,
|
703 |
+
"learning_rate": 4.057880948025177e-05,
|
704 |
+
"loss": 0.0534,
|
705 |
+
"step": 11600
|
706 |
+
},
|
707 |
+
{
|
708 |
+
"epoch": 0.87,
|
709 |
+
"learning_rate": 4.042691011673855e-05,
|
710 |
+
"loss": 0.0551,
|
711 |
+
"step": 11700
|
712 |
+
},
|
713 |
+
{
|
714 |
+
"epoch": 0.87,
|
715 |
+
"learning_rate": 4.027408538115252e-05,
|
716 |
+
"loss": 0.0488,
|
717 |
+
"step": 11800
|
718 |
+
},
|
719 |
+
{
|
720 |
+
"epoch": 0.88,
|
721 |
+
"learning_rate": 4.0120344440575165e-05,
|
722 |
+
"loss": 0.0525,
|
723 |
+
"step": 11900
|
724 |
+
},
|
725 |
+
{
|
726 |
+
"epoch": 0.89,
|
727 |
+
"learning_rate": 3.996569651704589e-05,
|
728 |
+
"loss": 0.0458,
|
729 |
+
"step": 12000
|
730 |
+
},
|
731 |
+
{
|
732 |
+
"epoch": 0.89,
|
733 |
+
"learning_rate": 3.9810150887008806e-05,
|
734 |
+
"loss": 0.0492,
|
735 |
+
"step": 12100
|
736 |
+
},
|
737 |
+
{
|
738 |
+
"epoch": 0.9,
|
739 |
+
"learning_rate": 3.965528558751401e-05,
|
740 |
+
"loss": 0.0489,
|
741 |
+
"step": 12200
|
742 |
+
},
|
743 |
+
{
|
744 |
+
"epoch": 0.91,
|
745 |
+
"learning_rate": 3.949798133193112e-05,
|
746 |
+
"loss": 0.0465,
|
747 |
+
"step": 12300
|
748 |
+
},
|
749 |
+
{
|
750 |
+
"epoch": 0.92,
|
751 |
+
"learning_rate": 3.933980742539834e-05,
|
752 |
+
"loss": 0.0502,
|
753 |
+
"step": 12400
|
754 |
+
},
|
755 |
+
{
|
756 |
+
"epoch": 0.92,
|
757 |
+
"learning_rate": 3.9180773355863344e-05,
|
758 |
+
"loss": 0.0506,
|
759 |
+
"step": 12500
|
760 |
+
},
|
761 |
+
{
|
762 |
+
"epoch": 0.93,
|
763 |
+
"learning_rate": 3.902088866287004e-05,
|
764 |
+
"loss": 0.0525,
|
765 |
+
"step": 12600
|
766 |
+
},
|
767 |
+
{
|
768 |
+
"epoch": 0.94,
|
769 |
+
"learning_rate": 3.886016293698637e-05,
|
770 |
+
"loss": 0.0472,
|
771 |
+
"step": 12700
|
772 |
+
},
|
773 |
+
{
|
774 |
+
"epoch": 0.95,
|
775 |
+
"learning_rate": 3.869860581922905e-05,
|
776 |
+
"loss": 0.0443,
|
777 |
+
"step": 12800
|
778 |
+
},
|
779 |
+
{
|
780 |
+
"epoch": 0.95,
|
781 |
+
"learning_rate": 3.8536227000485234e-05,
|
782 |
+
"loss": 0.042,
|
783 |
+
"step": 12900
|
784 |
+
},
|
785 |
+
{
|
786 |
+
"epoch": 0.96,
|
787 |
+
"learning_rate": 3.837303622093119e-05,
|
788 |
+
"loss": 0.0447,
|
789 |
+
"step": 13000
|
790 |
+
},
|
791 |
+
{
|
792 |
+
"epoch": 0.97,
|
793 |
+
"learning_rate": 3.8209043269448096e-05,
|
794 |
+
"loss": 0.046,
|
795 |
+
"step": 13100
|
796 |
+
},
|
797 |
+
{
|
798 |
+
"epoch": 0.98,
|
799 |
+
"learning_rate": 3.804425798303483e-05,
|
800 |
+
"loss": 0.0434,
|
801 |
+
"step": 13200
|
802 |
+
},
|
803 |
+
{
|
804 |
+
"epoch": 0.98,
|
805 |
+
"learning_rate": 3.787869024621789e-05,
|
806 |
+
"loss": 0.0479,
|
807 |
+
"step": 13300
|
808 |
+
},
|
809 |
+
{
|
810 |
+
"epoch": 0.99,
|
811 |
+
"learning_rate": 3.7712349990458524e-05,
|
812 |
+
"loss": 0.0484,
|
813 |
+
"step": 13400
|
814 |
+
},
|
815 |
+
{
|
816 |
+
"epoch": 1.0,
|
817 |
+
"learning_rate": 3.754524719355695e-05,
|
818 |
+
"loss": 0.0506,
|
819 |
+
"step": 13500
|
820 |
+
},
|
821 |
+
{
|
822 |
+
"epoch": 1.01,
|
823 |
+
"learning_rate": 3.737739187905389e-05,
|
824 |
+
"loss": 0.0449,
|
825 |
+
"step": 13600
|
826 |
+
},
|
827 |
+
{
|
828 |
+
"epoch": 1.01,
|
829 |
+
"learning_rate": 3.7208794115629266e-05,
|
830 |
+
"loss": 0.0419,
|
831 |
+
"step": 13700
|
832 |
+
},
|
833 |
+
{
|
834 |
+
"epoch": 1.02,
|
835 |
+
"learning_rate": 3.703946401649827e-05,
|
836 |
+
"loss": 0.0356,
|
837 |
+
"step": 13800
|
838 |
+
},
|
839 |
+
{
|
840 |
+
"epoch": 1.03,
|
841 |
+
"learning_rate": 3.6869411738804735e-05,
|
842 |
+
"loss": 0.0433,
|
843 |
+
"step": 13900
|
844 |
+
},
|
845 |
+
{
|
846 |
+
"epoch": 1.04,
|
847 |
+
"learning_rate": 3.669864748301185e-05,
|
848 |
+
"loss": 0.0408,
|
849 |
+
"step": 14000
|
850 |
+
},
|
851 |
+
{
|
852 |
+
"epoch": 1.04,
|
853 |
+
"learning_rate": 3.6527181492290277e-05,
|
854 |
+
"loss": 0.0435,
|
855 |
+
"step": 14100
|
856 |
+
},
|
857 |
+
{
|
858 |
+
"epoch": 1.05,
|
859 |
+
"learning_rate": 3.635502405190375e-05,
|
860 |
+
"loss": 0.0394,
|
861 |
+
"step": 14200
|
862 |
+
},
|
863 |
+
{
|
864 |
+
"epoch": 1.06,
|
865 |
+
"learning_rate": 3.618391721177532e-05,
|
866 |
+
"loss": 0.0442,
|
867 |
+
"step": 14300
|
868 |
+
},
|
869 |
+
{
|
870 |
+
"epoch": 1.06,
|
871 |
+
"learning_rate": 3.601041454923619e-05,
|
872 |
+
"loss": 0.0448,
|
873 |
+
"step": 14400
|
874 |
+
},
|
875 |
+
{
|
876 |
+
"epoch": 1.07,
|
877 |
+
"learning_rate": 3.583625143492436e-05,
|
878 |
+
"loss": 0.047,
|
879 |
+
"step": 14500
|
880 |
+
},
|
881 |
+
{
|
882 |
+
"epoch": 1.08,
|
883 |
+
"learning_rate": 3.5661438315888565e-05,
|
884 |
+
"loss": 0.0374,
|
885 |
+
"step": 14600
|
886 |
+
},
|
887 |
+
{
|
888 |
+
"epoch": 1.09,
|
889 |
+
"learning_rate": 3.5485985678167643e-05,
|
890 |
+
"loss": 0.0397,
|
891 |
+
"step": 14700
|
892 |
+
},
|
893 |
+
{
|
894 |
+
"epoch": 1.09,
|
895 |
+
"learning_rate": 3.530990404616147e-05,
|
896 |
+
"loss": 0.0398,
|
897 |
+
"step": 14800
|
898 |
+
},
|
899 |
+
{
|
900 |
+
"epoch": 1.1,
|
901 |
+
"learning_rate": 3.5133203981999684e-05,
|
902 |
+
"loss": 0.0461,
|
903 |
+
"step": 14900
|
904 |
+
},
|
905 |
+
{
|
906 |
+
"epoch": 1.11,
|
907 |
+
"learning_rate": 3.4955896084908166e-05,
|
908 |
+
"loss": 0.0374,
|
909 |
+
"step": 15000
|
910 |
+
},
|
911 |
+
{
|
912 |
+
"epoch": 1.12,
|
913 |
+
"learning_rate": 3.4777990990573174e-05,
|
914 |
+
"loss": 0.0415,
|
915 |
+
"step": 15100
|
916 |
+
},
|
917 |
+
{
|
918 |
+
"epoch": 1.12,
|
919 |
+
"learning_rate": 3.459949937050345e-05,
|
920 |
+
"loss": 0.0378,
|
921 |
+
"step": 15200
|
922 |
+
},
|
923 |
+
{
|
924 |
+
"epoch": 1.13,
|
925 |
+
"learning_rate": 3.442043193139005e-05,
|
926 |
+
"loss": 0.0434,
|
927 |
+
"step": 15300
|
928 |
+
},
|
929 |
+
{
|
930 |
+
"epoch": 1.14,
|
931 |
+
"learning_rate": 3.424079941446407e-05,
|
932 |
+
"loss": 0.0409,
|
933 |
+
"step": 15400
|
934 |
+
},
|
935 |
+
{
|
936 |
+
"epoch": 1.15,
|
937 |
+
"learning_rate": 3.4060612594852486e-05,
|
938 |
+
"loss": 0.0384,
|
939 |
+
"step": 15500
|
940 |
+
},
|
941 |
+
{
|
942 |
+
"epoch": 1.15,
|
943 |
+
"learning_rate": 3.387988228093163e-05,
|
944 |
+
"loss": 0.0394,
|
945 |
+
"step": 15600
|
946 |
+
},
|
947 |
+
{
|
948 |
+
"epoch": 1.16,
|
949 |
+
"learning_rate": 3.3698619313679e-05,
|
950 |
+
"loss": 0.0343,
|
951 |
+
"step": 15700
|
952 |
+
},
|
953 |
+
{
|
954 |
+
"epoch": 1.17,
|
955 |
+
"learning_rate": 3.3516834566022906e-05,
|
956 |
+
"loss": 0.0371,
|
957 |
+
"step": 15800
|
958 |
+
},
|
959 |
+
{
|
960 |
+
"epoch": 1.18,
|
961 |
+
"learning_rate": 3.333453894219027e-05,
|
962 |
+
"loss": 0.0364,
|
963 |
+
"step": 15900
|
964 |
+
},
|
965 |
+
{
|
966 |
+
"epoch": 1.18,
|
967 |
+
"learning_rate": 3.315174337705257e-05,
|
968 |
+
"loss": 0.04,
|
969 |
+
"step": 16000
|
970 |
+
},
|
971 |
+
{
|
972 |
+
"epoch": 1.19,
|
973 |
+
"learning_rate": 3.296845883546988e-05,
|
974 |
+
"loss": 0.0422,
|
975 |
+
"step": 16100
|
976 |
+
},
|
977 |
+
{
|
978 |
+
"epoch": 1.2,
|
979 |
+
"learning_rate": 3.2784696311633213e-05,
|
980 |
+
"loss": 0.0343,
|
981 |
+
"step": 16200
|
982 |
+
},
|
983 |
+
{
|
984 |
+
"epoch": 1.21,
|
985 |
+
"learning_rate": 3.260046682840495e-05,
|
986 |
+
"loss": 0.0381,
|
987 |
+
"step": 16300
|
988 |
+
},
|
989 |
+
{
|
990 |
+
"epoch": 1.21,
|
991 |
+
"learning_rate": 3.241578143665773e-05,
|
992 |
+
"loss": 0.041,
|
993 |
+
"step": 16400
|
994 |
+
},
|
995 |
+
{
|
996 |
+
"epoch": 1.22,
|
997 |
+
"learning_rate": 3.223250468230082e-05,
|
998 |
+
"loss": 0.0336,
|
999 |
+
"step": 16500
|
1000 |
+
},
|
1001 |
+
{
|
1002 |
+
"epoch": 1.23,
|
1003 |
+
"learning_rate": 3.204694501705715e-05,
|
1004 |
+
"loss": 0.0364,
|
1005 |
+
"step": 16600
|
1006 |
+
},
|
1007 |
+
{
|
1008 |
+
"epoch": 1.24,
|
1009 |
+
"learning_rate": 3.186096264590101e-05,
|
1010 |
+
"loss": 0.0328,
|
1011 |
+
"step": 16700
|
1012 |
+
},
|
1013 |
+
{
|
1014 |
+
"epoch": 1.24,
|
1015 |
+
"learning_rate": 3.1674568724850744e-05,
|
1016 |
+
"loss": 0.0403,
|
1017 |
+
"step": 16800
|
1018 |
+
},
|
1019 |
+
{
|
1020 |
+
"epoch": 1.25,
|
1021 |
+
"learning_rate": 3.148777443461123e-05,
|
1022 |
+
"loss": 0.0425,
|
1023 |
+
"step": 16900
|
1024 |
+
},
|
1025 |
+
{
|
1026 |
+
"epoch": 1.26,
|
1027 |
+
"learning_rate": 3.13005909799032e-05,
|
1028 |
+
"loss": 0.0432,
|
1029 |
+
"step": 17000
|
1030 |
+
},
|
1031 |
+
{
|
1032 |
+
"epoch": 1.26,
|
1033 |
+
"learning_rate": 3.111302958879111e-05,
|
1034 |
+
"loss": 0.0423,
|
1035 |
+
"step": 17100
|
1036 |
+
},
|
1037 |
+
{
|
1038 |
+
"epoch": 1.27,
|
1039 |
+
"learning_rate": 3.0925101512009715e-05,
|
1040 |
+
"loss": 0.0328,
|
1041 |
+
"step": 17200
|
1042 |
+
},
|
1043 |
+
{
|
1044 |
+
"epoch": 1.28,
|
1045 |
+
"learning_rate": 3.073681802228907e-05,
|
1046 |
+
"loss": 0.0385,
|
1047 |
+
"step": 17300
|
1048 |
+
},
|
1049 |
+
{
|
1050 |
+
"epoch": 1.29,
|
1051 |
+
"learning_rate": 3.054819041367849e-05,
|
1052 |
+
"loss": 0.0378,
|
1053 |
+
"step": 17400
|
1054 |
+
},
|
1055 |
+
{
|
1056 |
+
"epoch": 1.29,
|
1057 |
+
"learning_rate": 3.035923000086896e-05,
|
1058 |
+
"loss": 0.0461,
|
1059 |
+
"step": 17500
|
1060 |
+
},
|
1061 |
+
{
|
1062 |
+
"epoch": 1.3,
|
1063 |
+
"learning_rate": 3.016994811851453e-05,
|
1064 |
+
"loss": 0.0332,
|
1065 |
+
"step": 17600
|
1066 |
+
},
|
1067 |
+
{
|
1068 |
+
"epoch": 1.31,
|
1069 |
+
"learning_rate": 2.9980356120552333e-05,
|
1070 |
+
"loss": 0.0343,
|
1071 |
+
"step": 17700
|
1072 |
+
},
|
1073 |
+
{
|
1074 |
+
"epoch": 1.32,
|
1075 |
+
"learning_rate": 2.9790465379521572e-05,
|
1076 |
+
"loss": 0.0413,
|
1077 |
+
"step": 17800
|
1078 |
+
},
|
1079 |
+
{
|
1080 |
+
"epoch": 1.32,
|
1081 |
+
"learning_rate": 2.960028728588135e-05,
|
1082 |
+
"loss": 0.0363,
|
1083 |
+
"step": 17900
|
1084 |
+
},
|
1085 |
+
{
|
1086 |
+
"epoch": 1.33,
|
1087 |
+
"learning_rate": 2.94098332473274e-05,
|
1088 |
+
"loss": 0.0486,
|
1089 |
+
"step": 18000
|
1090 |
+
},
|
1091 |
+
{
|
1092 |
+
"epoch": 1.34,
|
1093 |
+
"learning_rate": 2.9219114688107802e-05,
|
1094 |
+
"loss": 0.0388,
|
1095 |
+
"step": 18100
|
1096 |
+
},
|
1097 |
+
{
|
1098 |
+
"epoch": 1.35,
|
1099 |
+
"learning_rate": 2.9028143048337736e-05,
|
1100 |
+
"loss": 0.0389,
|
1101 |
+
"step": 18200
|
1102 |
+
},
|
1103 |
+
{
|
1104 |
+
"epoch": 1.35,
|
1105 |
+
"learning_rate": 2.8836929783313228e-05,
|
1106 |
+
"loss": 0.0424,
|
1107 |
+
"step": 18300
|
1108 |
+
},
|
1109 |
+
{
|
1110 |
+
"epoch": 1.36,
|
1111 |
+
"learning_rate": 2.8645486362824016e-05,
|
1112 |
+
"loss": 0.04,
|
1113 |
+
"step": 18400
|
1114 |
+
},
|
1115 |
+
{
|
1116 |
+
"epoch": 1.37,
|
1117 |
+
"learning_rate": 2.845574193607597e-05,
|
1118 |
+
"loss": 0.0414,
|
1119 |
+
"step": 18500
|
1120 |
+
},
|
1121 |
+
{
|
1122 |
+
"epoch": 1.38,
|
1123 |
+
"learning_rate": 2.826387468336204e-05,
|
1124 |
+
"loss": 0.0421,
|
1125 |
+
"step": 18600
|
1126 |
+
},
|
1127 |
+
{
|
1128 |
+
"epoch": 1.38,
|
1129 |
+
"learning_rate": 2.807181164948013e-05,
|
1130 |
+
"loss": 0.0387,
|
1131 |
+
"step": 18700
|
1132 |
+
},
|
1133 |
+
{
|
1134 |
+
"epoch": 1.39,
|
1135 |
+
"learning_rate": 2.7879564355192734e-05,
|
1136 |
+
"loss": 0.0342,
|
1137 |
+
"step": 18800
|
1138 |
+
},
|
1139 |
+
{
|
1140 |
+
"epoch": 1.4,
|
1141 |
+
"learning_rate": 2.7687144332315106e-05,
|
1142 |
+
"loss": 0.0377,
|
1143 |
+
"step": 18900
|
1144 |
+
},
|
1145 |
+
{
|
1146 |
+
"epoch": 1.41,
|
1147 |
+
"learning_rate": 2.749456312302348e-05,
|
1148 |
+
"loss": 0.0394,
|
1149 |
+
"step": 19000
|
1150 |
+
},
|
1151 |
+
{
|
1152 |
+
"epoch": 1.41,
|
1153 |
+
"learning_rate": 2.7301832279162748e-05,
|
1154 |
+
"loss": 0.0343,
|
1155 |
+
"step": 19100
|
1156 |
+
},
|
1157 |
+
{
|
1158 |
+
"epoch": 1.42,
|
1159 |
+
"learning_rate": 2.7108963361553523e-05,
|
1160 |
+
"loss": 0.0383,
|
1161 |
+
"step": 19200
|
1162 |
+
},
|
1163 |
+
{
|
1164 |
+
"epoch": 1.43,
|
1165 |
+
"learning_rate": 2.6915967939298682e-05,
|
1166 |
+
"loss": 0.0399,
|
1167 |
+
"step": 19300
|
1168 |
+
},
|
1169 |
+
{
|
1170 |
+
"epoch": 1.43,
|
1171 |
+
"learning_rate": 2.672285758908937e-05,
|
1172 |
+
"loss": 0.0394,
|
1173 |
+
"step": 19400
|
1174 |
+
},
|
1175 |
+
{
|
1176 |
+
"epoch": 1.44,
|
1177 |
+
"learning_rate": 2.6529643894510626e-05,
|
1178 |
+
"loss": 0.0379,
|
1179 |
+
"step": 19500
|
1180 |
+
},
|
1181 |
+
{
|
1182 |
+
"epoch": 1.45,
|
1183 |
+
"learning_rate": 2.63363384453465e-05,
|
1184 |
+
"loss": 0.0353,
|
1185 |
+
"step": 19600
|
1186 |
+
},
|
1187 |
+
{
|
1188 |
+
"epoch": 1.46,
|
1189 |
+
"learning_rate": 2.6142952836884905e-05,
|
1190 |
+
"loss": 0.0335,
|
1191 |
+
"step": 19700
|
1192 |
+
},
|
1193 |
+
{
|
1194 |
+
"epoch": 1.46,
|
1195 |
+
"learning_rate": 2.5949498669222026e-05,
|
1196 |
+
"loss": 0.0324,
|
1197 |
+
"step": 19800
|
1198 |
+
},
|
1199 |
+
{
|
1200 |
+
"epoch": 1.47,
|
1201 |
+
"learning_rate": 2.5755987546566546e-05,
|
1202 |
+
"loss": 0.0392,
|
1203 |
+
"step": 19900
|
1204 |
+
},
|
1205 |
+
{
|
1206 |
+
"epoch": 1.48,
|
1207 |
+
"learning_rate": 2.556243107654353e-05,
|
1208 |
+
"loss": 0.0391,
|
1209 |
+
"step": 20000
|
1210 |
+
}
|
1211 |
+
],
|
1212 |
+
"logging_steps": 100,
|
1213 |
+
"max_steps": 40563,
|
1214 |
+
"num_train_epochs": 3,
|
1215 |
+
"save_steps": 5000,
|
1216 |
+
"total_flos": 4.463551046392185e+18,
|
1217 |
+
"trial_name": null,
|
1218 |
+
"trial_params": null
|
1219 |
+
}
|
LLM-Detector-44w-EN/checkpoint-20000/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:207ad05ea260ffab22b19df12f661a83e61f91ab639a8553b2202d5916732318
|
3 |
+
size 4664
|
LLM-Detector-44w-EN/checkpoint-25000/README.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
base_model: ./Qwen-1_8B-Chat
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Shared by [optional]:** [More Information Needed]
|
22 |
+
- **Model type:** [More Information Needed]
|
23 |
+
- **Language(s) (NLP):** [More Information Needed]
|
24 |
+
- **License:** [More Information Needed]
|
25 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
26 |
+
|
27 |
+
### Model Sources [optional]
|
28 |
+
|
29 |
+
<!-- Provide the basic links for the model. -->
|
30 |
+
|
31 |
+
- **Repository:** [More Information Needed]
|
32 |
+
- **Paper [optional]:** [More Information Needed]
|
33 |
+
- **Demo [optional]:** [More Information Needed]
|
34 |
+
|
35 |
+
## Uses
|
36 |
+
|
37 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
+
|
39 |
+
### Direct Use
|
40 |
+
|
41 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
+
|
43 |
+
[More Information Needed]
|
44 |
+
|
45 |
+
### Downstream Use [optional]
|
46 |
+
|
47 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
+
|
49 |
+
[More Information Needed]
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
+
|
55 |
+
[More Information Needed]
|
56 |
+
|
57 |
+
## Bias, Risks, and Limitations
|
58 |
+
|
59 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
+
|
61 |
+
[More Information Needed]
|
62 |
+
|
63 |
+
### Recommendations
|
64 |
+
|
65 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
+
|
67 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
68 |
+
|
69 |
+
## How to Get Started with the Model
|
70 |
+
|
71 |
+
Use the code below to get started with the model.
|
72 |
+
|
73 |
+
[More Information Needed]
|
74 |
+
|
75 |
+
## Training Details
|
76 |
+
|
77 |
+
### Training Data
|
78 |
+
|
79 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
### Training Procedure
|
84 |
+
|
85 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
+
|
87 |
+
#### Preprocessing [optional]
|
88 |
+
|
89 |
+
[More Information Needed]
|
90 |
+
|
91 |
+
|
92 |
+
#### Training Hyperparameters
|
93 |
+
|
94 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
95 |
+
|
96 |
+
#### Speeds, Sizes, Times [optional]
|
97 |
+
|
98 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
## Evaluation
|
103 |
+
|
104 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
105 |
+
|
106 |
+
### Testing Data, Factors & Metrics
|
107 |
+
|
108 |
+
#### Testing Data
|
109 |
+
|
110 |
+
<!-- This should link to a Data Card if possible. -->
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
#### Factors
|
115 |
+
|
116 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
#### Metrics
|
121 |
+
|
122 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Results
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
#### Summary
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
## Model Examination [optional]
|
135 |
+
|
136 |
+
<!-- Relevant interpretability work for the model goes here -->
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
## Environmental Impact
|
141 |
+
|
142 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
143 |
+
|
144 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
145 |
+
|
146 |
+
- **Hardware Type:** [More Information Needed]
|
147 |
+
- **Hours used:** [More Information Needed]
|
148 |
+
- **Cloud Provider:** [More Information Needed]
|
149 |
+
- **Compute Region:** [More Information Needed]
|
150 |
+
- **Carbon Emitted:** [More Information Needed]
|
151 |
+
|
152 |
+
## Technical Specifications [optional]
|
153 |
+
|
154 |
+
### Model Architecture and Objective
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
### Compute Infrastructure
|
159 |
+
|
160 |
+
[More Information Needed]
|
161 |
+
|
162 |
+
#### Hardware
|
163 |
+
|
164 |
+
[More Information Needed]
|
165 |
+
|
166 |
+
#### Software
|
167 |
+
|
168 |
+
[More Information Needed]
|
169 |
+
|
170 |
+
## Citation [optional]
|
171 |
+
|
172 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
173 |
+
|
174 |
+
**BibTeX:**
|
175 |
+
|
176 |
+
[More Information Needed]
|
177 |
+
|
178 |
+
**APA:**
|
179 |
+
|
180 |
+
[More Information Needed]
|
181 |
+
|
182 |
+
## Glossary [optional]
|
183 |
+
|
184 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
185 |
+
|
186 |
+
[More Information Needed]
|
187 |
+
|
188 |
+
## More Information [optional]
|
189 |
+
|
190 |
+
[More Information Needed]
|
191 |
+
|
192 |
+
## Model Card Authors [optional]
|
193 |
+
|
194 |
+
[More Information Needed]
|
195 |
+
|
196 |
+
## Model Card Contact
|
197 |
+
|
198 |
+
[More Information Needed]
|
199 |
+
|
200 |
+
|
201 |
+
## Training procedure
|
202 |
+
|
203 |
+
|
204 |
+
### Framework versions
|
205 |
+
|
206 |
+
|
207 |
+
- PEFT 0.6.2
|
LLM-Detector-44w-EN/checkpoint-25000/adapter_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "./Qwen-1_8B-Chat",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"lora_alpha": 16.0,
|
12 |
+
"lora_dropout": 0.1,
|
13 |
+
"modules_to_save": null,
|
14 |
+
"peft_type": "LORA",
|
15 |
+
"r": 8,
|
16 |
+
"rank_pattern": {},
|
17 |
+
"revision": null,
|
18 |
+
"target_modules": [
|
19 |
+
"c_attn"
|
20 |
+
],
|
21 |
+
"task_type": "CAUSAL_LM"
|
22 |
+
}
|
LLM-Detector-44w-EN/checkpoint-25000/adapter_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68862f8ff515896d80d1af8824d3960f7ce9c83c8883bcb4d5bd1fdce3e4ff11
|
3 |
+
size 6308670
|
LLM-Detector-44w-EN/checkpoint-25000/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14f35a03839f958014b4eedf5aaf79a90a672e1dbc7bf89f393c9eaee84e0e32
|
3 |
+
size 12623610
|
LLM-Detector-44w-EN/checkpoint-25000/qwen.tiktoken
ADDED
The diff for this file is too large to render.
See raw diff
|
|
LLM-Detector-44w-EN/checkpoint-25000/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ade8524bbf39cb986fd50ff46e11c127e7e3e0a36ec22207bec345dbe6d13d1d
|
3 |
+
size 14244
|
LLM-Detector-44w-EN/checkpoint-25000/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a239119ccce7ad2c75d7d2ebb5cdd895972f6f31486f6c4df47965339676a56c
|
3 |
+
size 1064
|
LLM-Detector-44w-EN/checkpoint-25000/special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<|im_end|>"
|
4 |
+
],
|
5 |
+
"eos_token": "<|endoftext|>",
|
6 |
+
"pad_token": "<|endoftext|>"
|
7 |
+
}
|
LLM-Detector-44w-EN/checkpoint-25000/tokenization_qwen.py
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ree.
|
5 |
+
|
6 |
+
"""Tokenization classes for QWen."""
|
7 |
+
|
8 |
+
import base64
|
9 |
+
import logging
|
10 |
+
import os
|
11 |
+
import unicodedata
|
12 |
+
from typing import Collection, Dict, List, Set, Tuple, Union
|
13 |
+
|
14 |
+
import tiktoken
|
15 |
+
from transformers import PreTrainedTokenizer, AddedToken
|
16 |
+
|
17 |
+
logger = logging.getLogger(__name__)
|
18 |
+
|
19 |
+
|
20 |
+
VOCAB_FILES_NAMES = {"vocab_file": "qwen.tiktoken"}
|
21 |
+
|
22 |
+
PAT_STR = r"""(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"""
|
23 |
+
ENDOFTEXT = "<|endoftext|>"
|
24 |
+
IMSTART = "<|im_start|>"
|
25 |
+
IMEND = "<|im_end|>"
|
26 |
+
# as the default behavior is changed to allow special tokens in
|
27 |
+
# regular texts, the surface forms of special tokens need to be
|
28 |
+
# as different as possible to minimize the impact
|
29 |
+
EXTRAS = tuple((f"<|extra_{i}|>" for i in range(205)))
|
30 |
+
# changed to use actual index to avoid misconfiguration with vocabulary expansion
|
31 |
+
SPECIAL_START_ID = 151643
|
32 |
+
SPECIAL_TOKENS = tuple(
|
33 |
+
enumerate(
|
34 |
+
(
|
35 |
+
(
|
36 |
+
ENDOFTEXT,
|
37 |
+
IMSTART,
|
38 |
+
IMEND,
|
39 |
+
)
|
40 |
+
+ EXTRAS
|
41 |
+
),
|
42 |
+
start=SPECIAL_START_ID,
|
43 |
+
)
|
44 |
+
)
|
45 |
+
SPECIAL_TOKENS_SET = set(t for i, t in SPECIAL_TOKENS)
|
46 |
+
|
47 |
+
|
48 |
+
def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]:
|
49 |
+
with open(tiktoken_bpe_file, "rb") as f:
|
50 |
+
contents = f.read()
|
51 |
+
return {
|
52 |
+
base64.b64decode(token): int(rank)
|
53 |
+
for token, rank in (line.split() for line in contents.splitlines() if line)
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
class QWenTokenizer(PreTrainedTokenizer):
|
58 |
+
"""QWen tokenizer."""
|
59 |
+
|
60 |
+
vocab_files_names = VOCAB_FILES_NAMES
|
61 |
+
|
62 |
+
def __init__(
|
63 |
+
self,
|
64 |
+
vocab_file,
|
65 |
+
errors="replace",
|
66 |
+
extra_vocab_file=None,
|
67 |
+
**kwargs,
|
68 |
+
):
|
69 |
+
super().__init__(**kwargs)
|
70 |
+
|
71 |
+
# how to handle errors in decoding UTF-8 byte sequences
|
72 |
+
# use ignore if you are in streaming inference
|
73 |
+
self.errors = errors
|
74 |
+
|
75 |
+
self.mergeable_ranks = _load_tiktoken_bpe(vocab_file) # type: Dict[bytes, int]
|
76 |
+
self.special_tokens = {
|
77 |
+
token: index
|
78 |
+
for index, token in SPECIAL_TOKENS
|
79 |
+
}
|
80 |
+
|
81 |
+
# try load extra vocab from file
|
82 |
+
if extra_vocab_file is not None:
|
83 |
+
used_ids = set(self.mergeable_ranks.values()) | set(self.special_tokens.values())
|
84 |
+
extra_mergeable_ranks = _load_tiktoken_bpe(extra_vocab_file)
|
85 |
+
for token, index in extra_mergeable_ranks.items():
|
86 |
+
if token in self.mergeable_ranks:
|
87 |
+
logger.info(f"extra token {token} exists, skipping")
|
88 |
+
continue
|
89 |
+
if index in used_ids:
|
90 |
+
logger.info(f'the index {index} for extra token {token} exists, skipping')
|
91 |
+
continue
|
92 |
+
self.mergeable_ranks[token] = index
|
93 |
+
# the index may be sparse after this, but don't worry tiktoken.Encoding will handle this
|
94 |
+
|
95 |
+
enc = tiktoken.Encoding(
|
96 |
+
"Qwen",
|
97 |
+
pat_str=PAT_STR,
|
98 |
+
mergeable_ranks=self.mergeable_ranks,
|
99 |
+
special_tokens=self.special_tokens,
|
100 |
+
)
|
101 |
+
assert (
|
102 |
+
len(self.mergeable_ranks) + len(self.special_tokens) == enc.n_vocab
|
103 |
+
), f"{len(self.mergeable_ranks) + len(self.special_tokens)} != {enc.n_vocab} in encoding"
|
104 |
+
|
105 |
+
self.decoder = {
|
106 |
+
v: k for k, v in self.mergeable_ranks.items()
|
107 |
+
} # type: dict[int, bytes|str]
|
108 |
+
self.decoder.update({v: k for k, v in self.special_tokens.items()})
|
109 |
+
|
110 |
+
self.tokenizer = enc # type: tiktoken.Encoding
|
111 |
+
|
112 |
+
self.eod_id = self.tokenizer.eot_token
|
113 |
+
self.im_start_id = self.special_tokens[IMSTART]
|
114 |
+
self.im_end_id = self.special_tokens[IMEND]
|
115 |
+
|
116 |
+
def __getstate__(self):
|
117 |
+
# for pickle lovers
|
118 |
+
state = self.__dict__.copy()
|
119 |
+
del state["tokenizer"]
|
120 |
+
return state
|
121 |
+
|
122 |
+
def __setstate__(self, state):
|
123 |
+
# tokenizer is not python native; don't pass it; rebuild it
|
124 |
+
self.__dict__.update(state)
|
125 |
+
enc = tiktoken.Encoding(
|
126 |
+
"Qwen",
|
127 |
+
pat_str=PAT_STR,
|
128 |
+
mergeable_ranks=self.mergeable_ranks,
|
129 |
+
special_tokens=self.special_tokens,
|
130 |
+
)
|
131 |
+
self.tokenizer = enc
|
132 |
+
|
133 |
+
def __len__(self) -> int:
|
134 |
+
return self.tokenizer.n_vocab
|
135 |
+
|
136 |
+
def get_vocab(self) -> Dict[bytes, int]:
|
137 |
+
return self.mergeable_ranks
|
138 |
+
|
139 |
+
def convert_tokens_to_ids(
|
140 |
+
self, tokens: Union[bytes, str, List[Union[bytes, str]]]
|
141 |
+
) -> List[int]:
|
142 |
+
ids = []
|
143 |
+
if isinstance(tokens, (str, bytes)):
|
144 |
+
if tokens in self.special_tokens:
|
145 |
+
return self.special_tokens[tokens]
|
146 |
+
else:
|
147 |
+
return self.mergeable_ranks.get(tokens)
|
148 |
+
for token in tokens:
|
149 |
+
if token in self.special_tokens:
|
150 |
+
ids.append(self.special_tokens[token])
|
151 |
+
else:
|
152 |
+
ids.append(self.mergeable_ranks.get(token))
|
153 |
+
return ids
|
154 |
+
|
155 |
+
def _add_tokens(
|
156 |
+
self,
|
157 |
+
new_tokens: Union[List[str], List[AddedToken]],
|
158 |
+
special_tokens: bool = False,
|
159 |
+
) -> int:
|
160 |
+
if not special_tokens and new_tokens:
|
161 |
+
raise ValueError("Adding regular tokens is not supported")
|
162 |
+
for token in new_tokens:
|
163 |
+
surface_form = token.content if isinstance(token, AddedToken) else token
|
164 |
+
if surface_form not in SPECIAL_TOKENS_SET:
|
165 |
+
raise ValueError("Adding unknown special tokens is not supported")
|
166 |
+
return 0
|
167 |
+
|
168 |
+
def save_vocabulary(self, save_directory: str, **kwargs) -> Tuple[str]:
|
169 |
+
"""
|
170 |
+
Save only the vocabulary of the tokenizer (vocabulary).
|
171 |
+
|
172 |
+
Returns:
|
173 |
+
`Tuple(str)`: Paths to the files saved.
|
174 |
+
"""
|
175 |
+
file_path = os.path.join(save_directory, "qwen.tiktoken")
|
176 |
+
with open(file_path, "w", encoding="utf8") as w:
|
177 |
+
for k, v in self.mergeable_ranks.items():
|
178 |
+
line = base64.b64encode(k).decode("utf8") + " " + str(v) + "\n"
|
179 |
+
w.write(line)
|
180 |
+
return (file_path,)
|
181 |
+
|
182 |
+
def tokenize(
|
183 |
+
self,
|
184 |
+
text: str,
|
185 |
+
allowed_special: Union[Set, str] = "all",
|
186 |
+
disallowed_special: Union[Collection, str] = (),
|
187 |
+
**kwargs,
|
188 |
+
) -> List[Union[bytes, str]]:
|
189 |
+
"""
|
190 |
+
Converts a string in a sequence of tokens.
|
191 |
+
|
192 |
+
Args:
|
193 |
+
text (`str`):
|
194 |
+
The sequence to be encoded.
|
195 |
+
allowed_special (`Literal["all"]` or `set`):
|
196 |
+
The surface forms of the tokens to be encoded as special tokens in regular texts.
|
197 |
+
Default to "all".
|
198 |
+
disallowed_special (`Literal["all"]` or `Collection`):
|
199 |
+
The surface forms of the tokens that should not be in regular texts and trigger errors.
|
200 |
+
Default to an empty tuple.
|
201 |
+
|
202 |
+
kwargs (additional keyword arguments, *optional*):
|
203 |
+
Will be passed to the underlying model specific encode method.
|
204 |
+
|
205 |
+
Returns:
|
206 |
+
`List[bytes|str]`: The list of tokens.
|
207 |
+
"""
|
208 |
+
tokens = []
|
209 |
+
text = unicodedata.normalize("NFC", text)
|
210 |
+
|
211 |
+
# this implementation takes a detour: text -> token id -> token surface forms
|
212 |
+
for t in self.tokenizer.encode(
|
213 |
+
text, allowed_special=allowed_special, disallowed_special=disallowed_special
|
214 |
+
):
|
215 |
+
tokens.append(self.decoder[t])
|
216 |
+
return tokens
|
217 |
+
|
218 |
+
def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) -> str:
|
219 |
+
"""
|
220 |
+
Converts a sequence of tokens in a single string.
|
221 |
+
"""
|
222 |
+
text = ""
|
223 |
+
temp = b""
|
224 |
+
for t in tokens:
|
225 |
+
if isinstance(t, str):
|
226 |
+
if temp:
|
227 |
+
text += temp.decode("utf-8", errors=self.errors)
|
228 |
+
temp = b""
|
229 |
+
text += t
|
230 |
+
elif isinstance(t, bytes):
|
231 |
+
temp += t
|
232 |
+
else:
|
233 |
+
raise TypeError("token should only be of type types or str")
|
234 |
+
if temp:
|
235 |
+
text += temp.decode("utf-8", errors=self.errors)
|
236 |
+
return text
|
237 |
+
|
238 |
+
@property
|
239 |
+
def vocab_size(self):
|
240 |
+
return self.tokenizer.n_vocab
|
241 |
+
|
242 |
+
def _convert_id_to_token(self, index: int) -> Union[bytes, str]:
|
243 |
+
"""Converts an id to a token, special tokens included"""
|
244 |
+
if index in self.decoder:
|
245 |
+
return self.decoder[index]
|
246 |
+
raise ValueError("unknown ids")
|
247 |
+
|
248 |
+
def _convert_token_to_id(self, token: Union[bytes, str]) -> int:
|
249 |
+
"""Converts a token to an id using the vocab, special tokens included"""
|
250 |
+
if token in self.special_tokens:
|
251 |
+
return self.special_tokens[token]
|
252 |
+
if token in self.mergeable_ranks:
|
253 |
+
return self.mergeable_ranks[token]
|
254 |
+
raise ValueError("unknown token")
|
255 |
+
|
256 |
+
def _tokenize(self, text: str, **kwargs):
|
257 |
+
"""
|
258 |
+
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based
|
259 |
+
vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).
|
260 |
+
|
261 |
+
Do NOT take care of added tokens.
|
262 |
+
"""
|
263 |
+
raise NotImplementedError
|
264 |
+
|
265 |
+
def _decode(
|
266 |
+
self,
|
267 |
+
token_ids: Union[int, List[int]],
|
268 |
+
skip_special_tokens: bool = False,
|
269 |
+
errors: str = None,
|
270 |
+
**kwargs,
|
271 |
+
) -> str:
|
272 |
+
if isinstance(token_ids, int):
|
273 |
+
token_ids = [token_ids]
|
274 |
+
if skip_special_tokens:
|
275 |
+
token_ids = [i for i in token_ids if i < self.eod_id]
|
276 |
+
return self.tokenizer.decode(token_ids, errors=errors or self.errors)
|
LLM-Detector-44w-EN/checkpoint-25000/tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"auto_map": {
|
3 |
+
"AutoTokenizer": [
|
4 |
+
"tokenization_qwen.QWenTokenizer",
|
5 |
+
null
|
6 |
+
]
|
7 |
+
},
|
8 |
+
"clean_up_tokenization_spaces": true,
|
9 |
+
"model_max_length": 8192,
|
10 |
+
"padding_side": "right",
|
11 |
+
"split_special_tokens": false,
|
12 |
+
"tokenizer_class": "QWenTokenizer"
|
13 |
+
}
|