ngxson commited on
Commit
ae1a83e
1 Parent(s): e108a80
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.gguf filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .ipynb_checkpoints
README.md CHANGED
@@ -1,3 +1,66 @@
1
  ---
 
 
 
 
 
 
 
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - vi
4
+ library_name: transformers
5
+ tags:
6
+ - LLMs
7
+ - NLP
8
+ - Vietnamese
9
  license: mit
10
  ---
11
+
12
+ ## Model Description
13
+
14
+ This model is finetuned from [Viet-Mistral/Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat). The dataset is taken from [bkai-foundation-models/vi-self-chat-sharegpt-format](https://huggingface.co/datasets/bkai-foundation-models/vi-self-chat-sharegpt-format)
15
+
16
+ This is a **low rank** finetune to add support for chatml template. While the template does not affect model performance, it would be nice to support chatml since most of models based on Mistral already using it.
17
+
18
+ The format looks like this:
19
+
20
+ ```
21
+ <|im_start|>system
22
+ Provide some context and/or instructions to the model.
23
+ <|im_end|>
24
+ <|im_start|>user
25
+ The user’s message goes here
26
+ <|im_end|>
27
+ <|im_start|>assistant
28
+ ```
29
+
30
+ ## How to use it
31
+
32
+ The recommended way is to use the GGUF `vistral-7b-chatml-Q4_K_M.gguf` file included in this repository. Run it via llama.cpp (remember to pass `-cml` argument to use chatml template)
33
+
34
+ Run the `python3 run.py` inside this repository to try the model using transformers library. You may need to change some params inside in order to make it work.
35
+
36
+ This is an example of a conversation using llama.cpp:
37
+
38
+ - <|im_start|>system
39
+ - Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực.<|im_end|>
40
+ - <|im_start|>user
41
+ - > xin chào
42
+ - Tôi là một trợ lý AI được tạo ra để hỗ trợ con người. Bạn có câu hỏi gì về chủ đề nào đó?<|im_end|>
43
+ - > trợ lý AI là gì? bạn giải thích được không?
44
+ Trợ lý AI là một chương trình máy tính sử dụng trí tuệ nhân tạo và học máy để hỗ trợ con người trong nhiều công việc khác nhau. Nó có thể hiểu và xử lý ngôn ngữ tự nhiên, nhận biết hình ảnh và âm thanh cũng như đưa ra các đề xuất hay câu trả lời phù hợp cho các yêu cầu của bạn.<|im_end|>
45
+ - > ồ, cảm ơn, vậy bạn có thể làm gì?
46
+ - Tôi được thiết kế để giúp đỡ con người trong nhiều công việc như giải đáp các câu hỏi, trả lời những vấn đề liên quan đến cuộc sống hàng ngày của họ. Tôi cũng hỗ trợ nghiên cứu và phân tích dữ liệu để đưa ra dự đoán hay tư vấn cho doanh nghiệp hoặc cá nhân.<|im_end|>
47
+ - > tức là sao?
48
+ - Ví dụ, nếu bạn đang thắc mắc về một chủ đề nào đó và không biết phải bắt đầu tìm kiếm ở đâu hay làm thế nào để hiểu rõ hơn về nó thì tôi có thể giúp bạn. Tôi cũng có khả năng đọc và phân tích dữ liệu từ nhiều nguồn khác nhau như các tài liệu nghiên cứu khoa học hoặc thông tin trên mạng xã hội, sau đó đưa ra những giải thích chi tiết cho vấn đề của bạn.<|im_end|>
49
+
50
+ ## Training
51
+
52
+ You can also look at the training code in the `finetune.py` file.
53
+
54
+ For tokenizer, I changed these things:
55
+ - Token `[INST]` to `<|im_start|>`, make it become special token
56
+ - Token `[/INST]` to `<|im_end|>`, make it become special token
57
+ - Change to `eos_token` to `<|im_end|>`
58
+ - Update `chat_template` to chatml, taken from [this example](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B/blob/main/tokenizer_config.json#L52)
59
+
60
+ Additionally, there is a checkpoint file in my repository if you want to merge the LORA yourself.
61
+
62
+ ## More information
63
+
64
+ Disclaimer: I'm not expert in machine learning, my background is from cybersecurity so the making of this model is a "hobby" to me. Training is done using a VPS on Google Cloud, I paid with my own money.
65
+
66
+ If you want to discuss, feel free to contact me at `contact at ngxson dot com` - [ngxson.com](https://ngxson.com)
added_tokens.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "<</SYS>>": 38366,
3
+ "<<SYS>>": 38365,
4
+ "<|im_start|>": 38367,
5
+ "<|im_end|>": 38368
6
+ }
checkpoint-300/README.md ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ base_model: Viet-Mistral/Vistral-7B-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
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset 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. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ 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).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+
201
+
202
+ ### Framework versions
203
+
204
+ - PEFT 0.7.2.dev0
checkpoint-300/adapter_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Viet-Mistral/Vistral-7B-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
+ "loftq_config": {},
12
+ "lora_alpha": 16,
13
+ "lora_dropout": 0.05,
14
+ "megatron_config": null,
15
+ "megatron_core": "megatron.core",
16
+ "modules_to_save": null,
17
+ "peft_type": "LORA",
18
+ "r": 8,
19
+ "rank_pattern": {},
20
+ "revision": null,
21
+ "target_modules": [
22
+ "up_proj",
23
+ "q_proj",
24
+ "k_proj",
25
+ "lm_head",
26
+ "down_proj",
27
+ "o_proj",
28
+ "v_proj",
29
+ "gate_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_rslora": false
33
+ }
checkpoint-300/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35452d317067e2c87ec9c0ec541c3a9c3569b3c15edf800fbea080eb2b2b3962
3
+ size 713943216
checkpoint-300/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2c06e8ae3c989553150fc70927243567b7688769922b4c0fff1a413f9e439af
3
+ size 44394974
checkpoint-300/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30fd4d5b393e321127cefeb791cfae79a3150ea1cd99a0f01213b4f9ec6bb389
3
+ size 14244
checkpoint-300/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b8ed8d7b910c26a001639a37e3b754544dfa86d3e83b3e64170b5efa202aaf8
3
+ size 1064
checkpoint-300/trainer_state.json ADDED
@@ -0,0 +1,1821 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.5,
5
+ "eval_steps": 500,
6
+ "global_step": 300,
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": 2.5e-05,
14
+ "loss": 2.6897,
15
+ "step": 1
16
+ },
17
+ {
18
+ "epoch": 0.01,
19
+ "learning_rate": 2.4968710888610763e-05,
20
+ "loss": 2.6671,
21
+ "step": 2
22
+ },
23
+ {
24
+ "epoch": 0.01,
25
+ "learning_rate": 2.493742177722153e-05,
26
+ "loss": 2.5698,
27
+ "step": 3
28
+ },
29
+ {
30
+ "epoch": 0.02,
31
+ "learning_rate": 2.490613266583229e-05,
32
+ "loss": 2.0954,
33
+ "step": 4
34
+ },
35
+ {
36
+ "epoch": 0.03,
37
+ "learning_rate": 2.4874843554443056e-05,
38
+ "loss": 1.8796,
39
+ "step": 5
40
+ },
41
+ {
42
+ "epoch": 0.03,
43
+ "learning_rate": 2.484355444305382e-05,
44
+ "loss": 1.7986,
45
+ "step": 6
46
+ },
47
+ {
48
+ "epoch": 0.04,
49
+ "learning_rate": 2.4812265331664584e-05,
50
+ "loss": 1.7025,
51
+ "step": 7
52
+ },
53
+ {
54
+ "epoch": 0.04,
55
+ "learning_rate": 2.4780976220275346e-05,
56
+ "loss": 1.6202,
57
+ "step": 8
58
+ },
59
+ {
60
+ "epoch": 0.04,
61
+ "learning_rate": 2.4749687108886108e-05,
62
+ "loss": 1.4594,
63
+ "step": 9
64
+ },
65
+ {
66
+ "epoch": 0.05,
67
+ "learning_rate": 2.4718397997496874e-05,
68
+ "loss": 1.1673,
69
+ "step": 10
70
+ },
71
+ {
72
+ "epoch": 0.06,
73
+ "learning_rate": 2.4687108886107636e-05,
74
+ "loss": 1.2507,
75
+ "step": 11
76
+ },
77
+ {
78
+ "epoch": 0.06,
79
+ "learning_rate": 2.46558197747184e-05,
80
+ "loss": 1.2693,
81
+ "step": 12
82
+ },
83
+ {
84
+ "epoch": 0.07,
85
+ "learning_rate": 2.4624530663329163e-05,
86
+ "loss": 1.3959,
87
+ "step": 13
88
+ },
89
+ {
90
+ "epoch": 0.07,
91
+ "learning_rate": 2.459324155193993e-05,
92
+ "loss": 1.2798,
93
+ "step": 14
94
+ },
95
+ {
96
+ "epoch": 0.07,
97
+ "learning_rate": 2.456195244055069e-05,
98
+ "loss": 1.1193,
99
+ "step": 15
100
+ },
101
+ {
102
+ "epoch": 0.08,
103
+ "learning_rate": 2.4530663329161453e-05,
104
+ "loss": 1.1838,
105
+ "step": 16
106
+ },
107
+ {
108
+ "epoch": 0.09,
109
+ "learning_rate": 2.449937421777222e-05,
110
+ "loss": 1.0905,
111
+ "step": 17
112
+ },
113
+ {
114
+ "epoch": 0.09,
115
+ "learning_rate": 2.446808510638298e-05,
116
+ "loss": 1.0863,
117
+ "step": 18
118
+ },
119
+ {
120
+ "epoch": 0.1,
121
+ "learning_rate": 2.4436795994993742e-05,
122
+ "loss": 1.1153,
123
+ "step": 19
124
+ },
125
+ {
126
+ "epoch": 0.1,
127
+ "learning_rate": 2.4405506883604508e-05,
128
+ "loss": 1.0519,
129
+ "step": 20
130
+ },
131
+ {
132
+ "epoch": 0.1,
133
+ "learning_rate": 2.437421777221527e-05,
134
+ "loss": 1.0254,
135
+ "step": 21
136
+ },
137
+ {
138
+ "epoch": 0.11,
139
+ "learning_rate": 2.4342928660826032e-05,
140
+ "loss": 1.15,
141
+ "step": 22
142
+ },
143
+ {
144
+ "epoch": 0.12,
145
+ "learning_rate": 2.4311639549436798e-05,
146
+ "loss": 0.999,
147
+ "step": 23
148
+ },
149
+ {
150
+ "epoch": 0.12,
151
+ "learning_rate": 2.428035043804756e-05,
152
+ "loss": 0.9753,
153
+ "step": 24
154
+ },
155
+ {
156
+ "epoch": 0.12,
157
+ "learning_rate": 2.4249061326658322e-05,
158
+ "loss": 0.9843,
159
+ "step": 25
160
+ },
161
+ {
162
+ "epoch": 0.13,
163
+ "learning_rate": 2.4217772215269087e-05,
164
+ "loss": 0.8658,
165
+ "step": 26
166
+ },
167
+ {
168
+ "epoch": 0.14,
169
+ "learning_rate": 2.418648310387985e-05,
170
+ "loss": 0.8473,
171
+ "step": 27
172
+ },
173
+ {
174
+ "epoch": 0.14,
175
+ "learning_rate": 2.4155193992490615e-05,
176
+ "loss": 0.9926,
177
+ "step": 28
178
+ },
179
+ {
180
+ "epoch": 0.14,
181
+ "learning_rate": 2.4123904881101377e-05,
182
+ "loss": 1.0976,
183
+ "step": 29
184
+ },
185
+ {
186
+ "epoch": 0.15,
187
+ "learning_rate": 2.409261576971214e-05,
188
+ "loss": 1.0307,
189
+ "step": 30
190
+ },
191
+ {
192
+ "epoch": 0.15,
193
+ "learning_rate": 2.4061326658322904e-05,
194
+ "loss": 0.9448,
195
+ "step": 31
196
+ },
197
+ {
198
+ "epoch": 0.16,
199
+ "learning_rate": 2.4030037546933667e-05,
200
+ "loss": 0.9706,
201
+ "step": 32
202
+ },
203
+ {
204
+ "epoch": 0.17,
205
+ "learning_rate": 2.3998748435544432e-05,
206
+ "loss": 1.0063,
207
+ "step": 33
208
+ },
209
+ {
210
+ "epoch": 0.17,
211
+ "learning_rate": 2.3967459324155194e-05,
212
+ "loss": 0.9862,
213
+ "step": 34
214
+ },
215
+ {
216
+ "epoch": 0.17,
217
+ "learning_rate": 2.393617021276596e-05,
218
+ "loss": 0.9794,
219
+ "step": 35
220
+ },
221
+ {
222
+ "epoch": 0.18,
223
+ "learning_rate": 2.390488110137672e-05,
224
+ "loss": 1.0715,
225
+ "step": 36
226
+ },
227
+ {
228
+ "epoch": 0.18,
229
+ "learning_rate": 2.3873591989987484e-05,
230
+ "loss": 0.8954,
231
+ "step": 37
232
+ },
233
+ {
234
+ "epoch": 0.19,
235
+ "learning_rate": 2.384230287859825e-05,
236
+ "loss": 0.9088,
237
+ "step": 38
238
+ },
239
+ {
240
+ "epoch": 0.2,
241
+ "learning_rate": 2.381101376720901e-05,
242
+ "loss": 0.9877,
243
+ "step": 39
244
+ },
245
+ {
246
+ "epoch": 0.2,
247
+ "learning_rate": 2.3779724655819777e-05,
248
+ "loss": 0.9352,
249
+ "step": 40
250
+ },
251
+ {
252
+ "epoch": 0.2,
253
+ "learning_rate": 2.374843554443054e-05,
254
+ "loss": 1.0049,
255
+ "step": 41
256
+ },
257
+ {
258
+ "epoch": 0.21,
259
+ "learning_rate": 2.3717146433041304e-05,
260
+ "loss": 1.095,
261
+ "step": 42
262
+ },
263
+ {
264
+ "epoch": 0.21,
265
+ "learning_rate": 2.3685857321652066e-05,
266
+ "loss": 0.8134,
267
+ "step": 43
268
+ },
269
+ {
270
+ "epoch": 0.22,
271
+ "learning_rate": 2.365456821026283e-05,
272
+ "loss": 0.8944,
273
+ "step": 44
274
+ },
275
+ {
276
+ "epoch": 0.23,
277
+ "learning_rate": 2.3623279098873594e-05,
278
+ "loss": 0.9799,
279
+ "step": 45
280
+ },
281
+ {
282
+ "epoch": 0.23,
283
+ "learning_rate": 2.3591989987484356e-05,
284
+ "loss": 0.8573,
285
+ "step": 46
286
+ },
287
+ {
288
+ "epoch": 0.23,
289
+ "learning_rate": 2.356070087609512e-05,
290
+ "loss": 0.9628,
291
+ "step": 47
292
+ },
293
+ {
294
+ "epoch": 0.24,
295
+ "learning_rate": 2.3529411764705884e-05,
296
+ "loss": 0.847,
297
+ "step": 48
298
+ },
299
+ {
300
+ "epoch": 0.24,
301
+ "learning_rate": 2.349812265331665e-05,
302
+ "loss": 0.8553,
303
+ "step": 49
304
+ },
305
+ {
306
+ "epoch": 0.25,
307
+ "learning_rate": 2.346683354192741e-05,
308
+ "loss": 0.9287,
309
+ "step": 50
310
+ },
311
+ {
312
+ "epoch": 0.26,
313
+ "learning_rate": 2.3435544430538173e-05,
314
+ "loss": 0.8922,
315
+ "step": 51
316
+ },
317
+ {
318
+ "epoch": 0.26,
319
+ "learning_rate": 2.340425531914894e-05,
320
+ "loss": 0.8925,
321
+ "step": 52
322
+ },
323
+ {
324
+ "epoch": 0.27,
325
+ "learning_rate": 2.33729662077597e-05,
326
+ "loss": 0.9052,
327
+ "step": 53
328
+ },
329
+ {
330
+ "epoch": 0.27,
331
+ "learning_rate": 2.3341677096370466e-05,
332
+ "loss": 0.9616,
333
+ "step": 54
334
+ },
335
+ {
336
+ "epoch": 0.28,
337
+ "learning_rate": 2.331038798498123e-05,
338
+ "loss": 0.8965,
339
+ "step": 55
340
+ },
341
+ {
342
+ "epoch": 0.28,
343
+ "learning_rate": 2.3279098873591994e-05,
344
+ "loss": 0.8449,
345
+ "step": 56
346
+ },
347
+ {
348
+ "epoch": 0.28,
349
+ "learning_rate": 2.3247809762202756e-05,
350
+ "loss": 0.9513,
351
+ "step": 57
352
+ },
353
+ {
354
+ "epoch": 0.29,
355
+ "learning_rate": 2.3216520650813518e-05,
356
+ "loss": 0.9176,
357
+ "step": 58
358
+ },
359
+ {
360
+ "epoch": 0.29,
361
+ "learning_rate": 2.3185231539424284e-05,
362
+ "loss": 0.8795,
363
+ "step": 59
364
+ },
365
+ {
366
+ "epoch": 0.3,
367
+ "learning_rate": 2.3153942428035046e-05,
368
+ "loss": 0.9245,
369
+ "step": 60
370
+ },
371
+ {
372
+ "epoch": 0.3,
373
+ "learning_rate": 2.3122653316645808e-05,
374
+ "loss": 0.8279,
375
+ "step": 61
376
+ },
377
+ {
378
+ "epoch": 0.31,
379
+ "learning_rate": 2.309136420525657e-05,
380
+ "loss": 0.89,
381
+ "step": 62
382
+ },
383
+ {
384
+ "epoch": 0.32,
385
+ "learning_rate": 2.3060075093867335e-05,
386
+ "loss": 0.916,
387
+ "step": 63
388
+ },
389
+ {
390
+ "epoch": 0.32,
391
+ "learning_rate": 2.3028785982478097e-05,
392
+ "loss": 0.9223,
393
+ "step": 64
394
+ },
395
+ {
396
+ "epoch": 0.33,
397
+ "learning_rate": 2.299749687108886e-05,
398
+ "loss": 1.0349,
399
+ "step": 65
400
+ },
401
+ {
402
+ "epoch": 0.33,
403
+ "learning_rate": 2.2966207759699625e-05,
404
+ "loss": 0.8693,
405
+ "step": 66
406
+ },
407
+ {
408
+ "epoch": 0.34,
409
+ "learning_rate": 2.2934918648310387e-05,
410
+ "loss": 0.8737,
411
+ "step": 67
412
+ },
413
+ {
414
+ "epoch": 0.34,
415
+ "learning_rate": 2.2903629536921153e-05,
416
+ "loss": 0.9092,
417
+ "step": 68
418
+ },
419
+ {
420
+ "epoch": 0.34,
421
+ "learning_rate": 2.2872340425531915e-05,
422
+ "loss": 0.8561,
423
+ "step": 69
424
+ },
425
+ {
426
+ "epoch": 0.35,
427
+ "learning_rate": 2.284105131414268e-05,
428
+ "loss": 1.0239,
429
+ "step": 70
430
+ },
431
+ {
432
+ "epoch": 0.35,
433
+ "learning_rate": 2.2809762202753442e-05,
434
+ "loss": 0.7588,
435
+ "step": 71
436
+ },
437
+ {
438
+ "epoch": 0.36,
439
+ "learning_rate": 2.2778473091364204e-05,
440
+ "loss": 0.9493,
441
+ "step": 72
442
+ },
443
+ {
444
+ "epoch": 0.36,
445
+ "learning_rate": 2.274718397997497e-05,
446
+ "loss": 0.9049,
447
+ "step": 73
448
+ },
449
+ {
450
+ "epoch": 0.37,
451
+ "learning_rate": 2.2715894868585732e-05,
452
+ "loss": 0.8972,
453
+ "step": 74
454
+ },
455
+ {
456
+ "epoch": 0.38,
457
+ "learning_rate": 2.2684605757196497e-05,
458
+ "loss": 0.8886,
459
+ "step": 75
460
+ },
461
+ {
462
+ "epoch": 0.38,
463
+ "learning_rate": 2.265331664580726e-05,
464
+ "loss": 0.7319,
465
+ "step": 76
466
+ },
467
+ {
468
+ "epoch": 0.39,
469
+ "learning_rate": 2.2622027534418025e-05,
470
+ "loss": 0.842,
471
+ "step": 77
472
+ },
473
+ {
474
+ "epoch": 0.39,
475
+ "learning_rate": 2.2590738423028787e-05,
476
+ "loss": 0.788,
477
+ "step": 78
478
+ },
479
+ {
480
+ "epoch": 0.4,
481
+ "learning_rate": 2.255944931163955e-05,
482
+ "loss": 0.9804,
483
+ "step": 79
484
+ },
485
+ {
486
+ "epoch": 0.4,
487
+ "learning_rate": 2.2528160200250315e-05,
488
+ "loss": 0.7391,
489
+ "step": 80
490
+ },
491
+ {
492
+ "epoch": 0.41,
493
+ "learning_rate": 2.2496871088861077e-05,
494
+ "loss": 0.7924,
495
+ "step": 81
496
+ },
497
+ {
498
+ "epoch": 0.41,
499
+ "learning_rate": 2.2465581977471842e-05,
500
+ "loss": 0.812,
501
+ "step": 82
502
+ },
503
+ {
504
+ "epoch": 0.41,
505
+ "learning_rate": 2.2434292866082604e-05,
506
+ "loss": 0.8704,
507
+ "step": 83
508
+ },
509
+ {
510
+ "epoch": 0.42,
511
+ "learning_rate": 2.240300375469337e-05,
512
+ "loss": 0.9598,
513
+ "step": 84
514
+ },
515
+ {
516
+ "epoch": 0.42,
517
+ "learning_rate": 2.2371714643304132e-05,
518
+ "loss": 0.8249,
519
+ "step": 85
520
+ },
521
+ {
522
+ "epoch": 0.43,
523
+ "learning_rate": 2.2340425531914894e-05,
524
+ "loss": 0.9608,
525
+ "step": 86
526
+ },
527
+ {
528
+ "epoch": 0.43,
529
+ "learning_rate": 2.230913642052566e-05,
530
+ "loss": 0.9153,
531
+ "step": 87
532
+ },
533
+ {
534
+ "epoch": 0.44,
535
+ "learning_rate": 2.227784730913642e-05,
536
+ "loss": 0.9486,
537
+ "step": 88
538
+ },
539
+ {
540
+ "epoch": 0.45,
541
+ "learning_rate": 2.2246558197747187e-05,
542
+ "loss": 0.9806,
543
+ "step": 89
544
+ },
545
+ {
546
+ "epoch": 0.45,
547
+ "learning_rate": 2.221526908635795e-05,
548
+ "loss": 0.8544,
549
+ "step": 90
550
+ },
551
+ {
552
+ "epoch": 0.46,
553
+ "learning_rate": 2.2183979974968714e-05,
554
+ "loss": 0.8845,
555
+ "step": 91
556
+ },
557
+ {
558
+ "epoch": 0.46,
559
+ "learning_rate": 2.2152690863579477e-05,
560
+ "loss": 0.926,
561
+ "step": 92
562
+ },
563
+ {
564
+ "epoch": 0.47,
565
+ "learning_rate": 2.212140175219024e-05,
566
+ "loss": 0.8515,
567
+ "step": 93
568
+ },
569
+ {
570
+ "epoch": 0.47,
571
+ "learning_rate": 2.2090112640801004e-05,
572
+ "loss": 0.7667,
573
+ "step": 94
574
+ },
575
+ {
576
+ "epoch": 0.47,
577
+ "learning_rate": 2.2058823529411766e-05,
578
+ "loss": 0.813,
579
+ "step": 95
580
+ },
581
+ {
582
+ "epoch": 0.48,
583
+ "learning_rate": 2.202753441802253e-05,
584
+ "loss": 0.785,
585
+ "step": 96
586
+ },
587
+ {
588
+ "epoch": 0.48,
589
+ "learning_rate": 2.1996245306633294e-05,
590
+ "loss": 0.87,
591
+ "step": 97
592
+ },
593
+ {
594
+ "epoch": 0.49,
595
+ "learning_rate": 2.1964956195244056e-05,
596
+ "loss": 0.8281,
597
+ "step": 98
598
+ },
599
+ {
600
+ "epoch": 0.49,
601
+ "learning_rate": 2.193366708385482e-05,
602
+ "loss": 0.9875,
603
+ "step": 99
604
+ },
605
+ {
606
+ "epoch": 0.5,
607
+ "learning_rate": 2.1902377972465583e-05,
608
+ "loss": 0.8709,
609
+ "step": 100
610
+ },
611
+ {
612
+ "epoch": 0.51,
613
+ "learning_rate": 2.1871088861076345e-05,
614
+ "loss": 0.9377,
615
+ "step": 101
616
+ },
617
+ {
618
+ "epoch": 0.51,
619
+ "learning_rate": 2.183979974968711e-05,
620
+ "loss": 0.7962,
621
+ "step": 102
622
+ },
623
+ {
624
+ "epoch": 0.52,
625
+ "learning_rate": 2.1808510638297873e-05,
626
+ "loss": 0.7485,
627
+ "step": 103
628
+ },
629
+ {
630
+ "epoch": 0.52,
631
+ "learning_rate": 2.1777221526908635e-05,
632
+ "loss": 0.7911,
633
+ "step": 104
634
+ },
635
+ {
636
+ "epoch": 0.53,
637
+ "learning_rate": 2.17459324155194e-05,
638
+ "loss": 0.8777,
639
+ "step": 105
640
+ },
641
+ {
642
+ "epoch": 0.53,
643
+ "learning_rate": 2.1714643304130163e-05,
644
+ "loss": 0.8287,
645
+ "step": 106
646
+ },
647
+ {
648
+ "epoch": 0.54,
649
+ "learning_rate": 2.1683354192740925e-05,
650
+ "loss": 0.8716,
651
+ "step": 107
652
+ },
653
+ {
654
+ "epoch": 0.54,
655
+ "learning_rate": 2.165206508135169e-05,
656
+ "loss": 0.8574,
657
+ "step": 108
658
+ },
659
+ {
660
+ "epoch": 0.55,
661
+ "learning_rate": 2.1620775969962452e-05,
662
+ "loss": 0.9586,
663
+ "step": 109
664
+ },
665
+ {
666
+ "epoch": 0.55,
667
+ "learning_rate": 2.1589486858573218e-05,
668
+ "loss": 0.867,
669
+ "step": 110
670
+ },
671
+ {
672
+ "epoch": 0.56,
673
+ "learning_rate": 2.155819774718398e-05,
674
+ "loss": 0.852,
675
+ "step": 111
676
+ },
677
+ {
678
+ "epoch": 0.56,
679
+ "learning_rate": 2.1526908635794745e-05,
680
+ "loss": 0.9795,
681
+ "step": 112
682
+ },
683
+ {
684
+ "epoch": 0.56,
685
+ "learning_rate": 2.1495619524405507e-05,
686
+ "loss": 0.8867,
687
+ "step": 113
688
+ },
689
+ {
690
+ "epoch": 0.57,
691
+ "learning_rate": 2.146433041301627e-05,
692
+ "loss": 0.819,
693
+ "step": 114
694
+ },
695
+ {
696
+ "epoch": 0.57,
697
+ "learning_rate": 2.1433041301627035e-05,
698
+ "loss": 0.9421,
699
+ "step": 115
700
+ },
701
+ {
702
+ "epoch": 0.58,
703
+ "learning_rate": 2.1401752190237797e-05,
704
+ "loss": 1.0068,
705
+ "step": 116
706
+ },
707
+ {
708
+ "epoch": 0.58,
709
+ "learning_rate": 2.1370463078848563e-05,
710
+ "loss": 0.8312,
711
+ "step": 117
712
+ },
713
+ {
714
+ "epoch": 0.59,
715
+ "learning_rate": 2.1339173967459325e-05,
716
+ "loss": 0.9313,
717
+ "step": 118
718
+ },
719
+ {
720
+ "epoch": 0.59,
721
+ "learning_rate": 2.130788485607009e-05,
722
+ "loss": 0.858,
723
+ "step": 119
724
+ },
725
+ {
726
+ "epoch": 0.6,
727
+ "learning_rate": 2.1276595744680852e-05,
728
+ "loss": 0.8108,
729
+ "step": 120
730
+ },
731
+ {
732
+ "epoch": 0.6,
733
+ "learning_rate": 2.1245306633291614e-05,
734
+ "loss": 0.8538,
735
+ "step": 121
736
+ },
737
+ {
738
+ "epoch": 0.61,
739
+ "learning_rate": 2.121401752190238e-05,
740
+ "loss": 0.8773,
741
+ "step": 122
742
+ },
743
+ {
744
+ "epoch": 0.61,
745
+ "learning_rate": 2.1182728410513142e-05,
746
+ "loss": 0.9329,
747
+ "step": 123
748
+ },
749
+ {
750
+ "epoch": 0.62,
751
+ "learning_rate": 2.1151439299123907e-05,
752
+ "loss": 1.0055,
753
+ "step": 124
754
+ },
755
+ {
756
+ "epoch": 0.62,
757
+ "learning_rate": 2.112015018773467e-05,
758
+ "loss": 0.859,
759
+ "step": 125
760
+ },
761
+ {
762
+ "epoch": 0.63,
763
+ "learning_rate": 2.1088861076345435e-05,
764
+ "loss": 0.6981,
765
+ "step": 126
766
+ },
767
+ {
768
+ "epoch": 0.64,
769
+ "learning_rate": 2.1057571964956197e-05,
770
+ "loss": 0.7186,
771
+ "step": 127
772
+ },
773
+ {
774
+ "epoch": 0.64,
775
+ "learning_rate": 2.102628285356696e-05,
776
+ "loss": 0.8779,
777
+ "step": 128
778
+ },
779
+ {
780
+ "epoch": 0.65,
781
+ "learning_rate": 2.0994993742177725e-05,
782
+ "loss": 0.8209,
783
+ "step": 129
784
+ },
785
+ {
786
+ "epoch": 0.65,
787
+ "learning_rate": 2.0963704630788487e-05,
788
+ "loss": 0.8902,
789
+ "step": 130
790
+ },
791
+ {
792
+ "epoch": 0.66,
793
+ "learning_rate": 2.0932415519399252e-05,
794
+ "loss": 0.8439,
795
+ "step": 131
796
+ },
797
+ {
798
+ "epoch": 0.66,
799
+ "learning_rate": 2.0901126408010014e-05,
800
+ "loss": 0.8764,
801
+ "step": 132
802
+ },
803
+ {
804
+ "epoch": 0.67,
805
+ "learning_rate": 2.086983729662078e-05,
806
+ "loss": 0.8853,
807
+ "step": 133
808
+ },
809
+ {
810
+ "epoch": 0.67,
811
+ "learning_rate": 2.0838548185231542e-05,
812
+ "loss": 0.9366,
813
+ "step": 134
814
+ },
815
+ {
816
+ "epoch": 0.68,
817
+ "learning_rate": 2.0807259073842304e-05,
818
+ "loss": 0.8731,
819
+ "step": 135
820
+ },
821
+ {
822
+ "epoch": 0.68,
823
+ "learning_rate": 2.077596996245307e-05,
824
+ "loss": 0.9189,
825
+ "step": 136
826
+ },
827
+ {
828
+ "epoch": 0.69,
829
+ "learning_rate": 2.074468085106383e-05,
830
+ "loss": 0.9024,
831
+ "step": 137
832
+ },
833
+ {
834
+ "epoch": 0.69,
835
+ "learning_rate": 2.0713391739674597e-05,
836
+ "loss": 0.7801,
837
+ "step": 138
838
+ },
839
+ {
840
+ "epoch": 0.69,
841
+ "learning_rate": 2.068210262828536e-05,
842
+ "loss": 0.7881,
843
+ "step": 139
844
+ },
845
+ {
846
+ "epoch": 0.7,
847
+ "learning_rate": 2.065081351689612e-05,
848
+ "loss": 0.9681,
849
+ "step": 140
850
+ },
851
+ {
852
+ "epoch": 0.7,
853
+ "learning_rate": 2.0619524405506883e-05,
854
+ "loss": 0.8103,
855
+ "step": 141
856
+ },
857
+ {
858
+ "epoch": 0.71,
859
+ "learning_rate": 2.058823529411765e-05,
860
+ "loss": 0.755,
861
+ "step": 142
862
+ },
863
+ {
864
+ "epoch": 0.71,
865
+ "learning_rate": 2.055694618272841e-05,
866
+ "loss": 0.9589,
867
+ "step": 143
868
+ },
869
+ {
870
+ "epoch": 0.72,
871
+ "learning_rate": 2.0525657071339173e-05,
872
+ "loss": 1.0164,
873
+ "step": 144
874
+ },
875
+ {
876
+ "epoch": 0.72,
877
+ "learning_rate": 2.0494367959949938e-05,
878
+ "loss": 0.8323,
879
+ "step": 145
880
+ },
881
+ {
882
+ "epoch": 0.73,
883
+ "learning_rate": 2.04630788485607e-05,
884
+ "loss": 0.7985,
885
+ "step": 146
886
+ },
887
+ {
888
+ "epoch": 0.73,
889
+ "learning_rate": 2.0431789737171462e-05,
890
+ "loss": 1.0317,
891
+ "step": 147
892
+ },
893
+ {
894
+ "epoch": 0.74,
895
+ "learning_rate": 2.0400500625782228e-05,
896
+ "loss": 0.7405,
897
+ "step": 148
898
+ },
899
+ {
900
+ "epoch": 0.74,
901
+ "learning_rate": 2.036921151439299e-05,
902
+ "loss": 0.8311,
903
+ "step": 149
904
+ },
905
+ {
906
+ "epoch": 0.75,
907
+ "learning_rate": 2.0337922403003756e-05,
908
+ "loss": 0.79,
909
+ "step": 150
910
+ },
911
+ {
912
+ "epoch": 0.76,
913
+ "learning_rate": 2.0306633291614518e-05,
914
+ "loss": 0.8272,
915
+ "step": 151
916
+ },
917
+ {
918
+ "epoch": 0.76,
919
+ "learning_rate": 2.0275344180225283e-05,
920
+ "loss": 0.777,
921
+ "step": 152
922
+ },
923
+ {
924
+ "epoch": 0.77,
925
+ "learning_rate": 2.0244055068836045e-05,
926
+ "loss": 0.7773,
927
+ "step": 153
928
+ },
929
+ {
930
+ "epoch": 0.77,
931
+ "learning_rate": 2.0212765957446807e-05,
932
+ "loss": 0.7078,
933
+ "step": 154
934
+ },
935
+ {
936
+ "epoch": 0.78,
937
+ "learning_rate": 2.0181476846057573e-05,
938
+ "loss": 0.9022,
939
+ "step": 155
940
+ },
941
+ {
942
+ "epoch": 0.78,
943
+ "learning_rate": 2.0150187734668335e-05,
944
+ "loss": 0.8121,
945
+ "step": 156
946
+ },
947
+ {
948
+ "epoch": 0.79,
949
+ "learning_rate": 2.01188986232791e-05,
950
+ "loss": 0.8438,
951
+ "step": 157
952
+ },
953
+ {
954
+ "epoch": 0.79,
955
+ "learning_rate": 2.0087609511889862e-05,
956
+ "loss": 0.8567,
957
+ "step": 158
958
+ },
959
+ {
960
+ "epoch": 0.8,
961
+ "learning_rate": 2.0056320400500628e-05,
962
+ "loss": 0.7968,
963
+ "step": 159
964
+ },
965
+ {
966
+ "epoch": 0.8,
967
+ "learning_rate": 2.002503128911139e-05,
968
+ "loss": 0.8846,
969
+ "step": 160
970
+ },
971
+ {
972
+ "epoch": 0.81,
973
+ "learning_rate": 1.9993742177722152e-05,
974
+ "loss": 0.7853,
975
+ "step": 161
976
+ },
977
+ {
978
+ "epoch": 0.81,
979
+ "learning_rate": 1.9962453066332917e-05,
980
+ "loss": 0.8335,
981
+ "step": 162
982
+ },
983
+ {
984
+ "epoch": 0.81,
985
+ "learning_rate": 1.993116395494368e-05,
986
+ "loss": 0.9056,
987
+ "step": 163
988
+ },
989
+ {
990
+ "epoch": 0.82,
991
+ "learning_rate": 1.9899874843554445e-05,
992
+ "loss": 0.826,
993
+ "step": 164
994
+ },
995
+ {
996
+ "epoch": 0.82,
997
+ "learning_rate": 1.9868585732165207e-05,
998
+ "loss": 0.7589,
999
+ "step": 165
1000
+ },
1001
+ {
1002
+ "epoch": 0.83,
1003
+ "learning_rate": 1.9837296620775973e-05,
1004
+ "loss": 0.8544,
1005
+ "step": 166
1006
+ },
1007
+ {
1008
+ "epoch": 0.83,
1009
+ "learning_rate": 1.9806007509386735e-05,
1010
+ "loss": 0.7743,
1011
+ "step": 167
1012
+ },
1013
+ {
1014
+ "epoch": 0.84,
1015
+ "learning_rate": 1.9774718397997497e-05,
1016
+ "loss": 0.7362,
1017
+ "step": 168
1018
+ },
1019
+ {
1020
+ "epoch": 0.84,
1021
+ "learning_rate": 1.9743429286608262e-05,
1022
+ "loss": 0.7873,
1023
+ "step": 169
1024
+ },
1025
+ {
1026
+ "epoch": 0.85,
1027
+ "learning_rate": 1.9712140175219024e-05,
1028
+ "loss": 0.861,
1029
+ "step": 170
1030
+ },
1031
+ {
1032
+ "epoch": 0.85,
1033
+ "learning_rate": 1.968085106382979e-05,
1034
+ "loss": 1.001,
1035
+ "step": 171
1036
+ },
1037
+ {
1038
+ "epoch": 0.86,
1039
+ "learning_rate": 1.9649561952440552e-05,
1040
+ "loss": 0.9549,
1041
+ "step": 172
1042
+ },
1043
+ {
1044
+ "epoch": 0.86,
1045
+ "learning_rate": 1.9618272841051317e-05,
1046
+ "loss": 0.7536,
1047
+ "step": 173
1048
+ },
1049
+ {
1050
+ "epoch": 0.87,
1051
+ "learning_rate": 1.958698372966208e-05,
1052
+ "loss": 0.7567,
1053
+ "step": 174
1054
+ },
1055
+ {
1056
+ "epoch": 0.88,
1057
+ "learning_rate": 1.955569461827284e-05,
1058
+ "loss": 0.8637,
1059
+ "step": 175
1060
+ },
1061
+ {
1062
+ "epoch": 0.88,
1063
+ "learning_rate": 1.9524405506883607e-05,
1064
+ "loss": 0.8629,
1065
+ "step": 176
1066
+ },
1067
+ {
1068
+ "epoch": 0.89,
1069
+ "learning_rate": 1.949311639549437e-05,
1070
+ "loss": 0.8645,
1071
+ "step": 177
1072
+ },
1073
+ {
1074
+ "epoch": 0.89,
1075
+ "learning_rate": 1.9461827284105135e-05,
1076
+ "loss": 0.7941,
1077
+ "step": 178
1078
+ },
1079
+ {
1080
+ "epoch": 0.9,
1081
+ "learning_rate": 1.9430538172715897e-05,
1082
+ "loss": 0.9089,
1083
+ "step": 179
1084
+ },
1085
+ {
1086
+ "epoch": 0.9,
1087
+ "learning_rate": 1.939924906132666e-05,
1088
+ "loss": 0.8458,
1089
+ "step": 180
1090
+ },
1091
+ {
1092
+ "epoch": 0.91,
1093
+ "learning_rate": 1.9367959949937424e-05,
1094
+ "loss": 0.7946,
1095
+ "step": 181
1096
+ },
1097
+ {
1098
+ "epoch": 0.91,
1099
+ "learning_rate": 1.9336670838548186e-05,
1100
+ "loss": 0.7927,
1101
+ "step": 182
1102
+ },
1103
+ {
1104
+ "epoch": 0.92,
1105
+ "learning_rate": 1.930538172715895e-05,
1106
+ "loss": 0.9227,
1107
+ "step": 183
1108
+ },
1109
+ {
1110
+ "epoch": 0.92,
1111
+ "learning_rate": 1.927409261576971e-05,
1112
+ "loss": 0.7854,
1113
+ "step": 184
1114
+ },
1115
+ {
1116
+ "epoch": 0.93,
1117
+ "learning_rate": 1.9242803504380476e-05,
1118
+ "loss": 0.7407,
1119
+ "step": 185
1120
+ },
1121
+ {
1122
+ "epoch": 0.93,
1123
+ "learning_rate": 1.9211514392991238e-05,
1124
+ "loss": 0.8731,
1125
+ "step": 186
1126
+ },
1127
+ {
1128
+ "epoch": 0.94,
1129
+ "learning_rate": 1.9180225281602004e-05,
1130
+ "loss": 0.817,
1131
+ "step": 187
1132
+ },
1133
+ {
1134
+ "epoch": 0.94,
1135
+ "learning_rate": 1.9148936170212766e-05,
1136
+ "loss": 0.7726,
1137
+ "step": 188
1138
+ },
1139
+ {
1140
+ "epoch": 0.94,
1141
+ "learning_rate": 1.9117647058823528e-05,
1142
+ "loss": 0.8113,
1143
+ "step": 189
1144
+ },
1145
+ {
1146
+ "epoch": 0.95,
1147
+ "learning_rate": 1.9086357947434293e-05,
1148
+ "loss": 0.7673,
1149
+ "step": 190
1150
+ },
1151
+ {
1152
+ "epoch": 0.95,
1153
+ "learning_rate": 1.9055068836045055e-05,
1154
+ "loss": 0.9078,
1155
+ "step": 191
1156
+ },
1157
+ {
1158
+ "epoch": 0.96,
1159
+ "learning_rate": 1.902377972465582e-05,
1160
+ "loss": 0.7135,
1161
+ "step": 192
1162
+ },
1163
+ {
1164
+ "epoch": 0.96,
1165
+ "learning_rate": 1.8992490613266583e-05,
1166
+ "loss": 0.8699,
1167
+ "step": 193
1168
+ },
1169
+ {
1170
+ "epoch": 0.97,
1171
+ "learning_rate": 1.896120150187735e-05,
1172
+ "loss": 0.7306,
1173
+ "step": 194
1174
+ },
1175
+ {
1176
+ "epoch": 0.97,
1177
+ "learning_rate": 1.892991239048811e-05,
1178
+ "loss": 0.9502,
1179
+ "step": 195
1180
+ },
1181
+ {
1182
+ "epoch": 0.98,
1183
+ "learning_rate": 1.8898623279098873e-05,
1184
+ "loss": 0.8298,
1185
+ "step": 196
1186
+ },
1187
+ {
1188
+ "epoch": 0.98,
1189
+ "learning_rate": 1.8867334167709638e-05,
1190
+ "loss": 0.8624,
1191
+ "step": 197
1192
+ },
1193
+ {
1194
+ "epoch": 0.99,
1195
+ "learning_rate": 1.88360450563204e-05,
1196
+ "loss": 0.9778,
1197
+ "step": 198
1198
+ },
1199
+ {
1200
+ "epoch": 0.99,
1201
+ "learning_rate": 1.8804755944931166e-05,
1202
+ "loss": 0.7804,
1203
+ "step": 199
1204
+ },
1205
+ {
1206
+ "epoch": 1.0,
1207
+ "learning_rate": 1.8773466833541928e-05,
1208
+ "loss": 0.8165,
1209
+ "step": 200
1210
+ },
1211
+ {
1212
+ "epoch": 1.0,
1213
+ "learning_rate": 1.8742177722152693e-05,
1214
+ "loss": 0.8972,
1215
+ "step": 201
1216
+ },
1217
+ {
1218
+ "epoch": 1.01,
1219
+ "learning_rate": 1.8710888610763455e-05,
1220
+ "loss": 0.8584,
1221
+ "step": 202
1222
+ },
1223
+ {
1224
+ "epoch": 1.01,
1225
+ "learning_rate": 1.8679599499374217e-05,
1226
+ "loss": 0.8229,
1227
+ "step": 203
1228
+ },
1229
+ {
1230
+ "epoch": 1.02,
1231
+ "learning_rate": 1.8648310387984983e-05,
1232
+ "loss": 0.8804,
1233
+ "step": 204
1234
+ },
1235
+ {
1236
+ "epoch": 1.02,
1237
+ "learning_rate": 1.8617021276595745e-05,
1238
+ "loss": 0.7828,
1239
+ "step": 205
1240
+ },
1241
+ {
1242
+ "epoch": 1.03,
1243
+ "learning_rate": 1.858573216520651e-05,
1244
+ "loss": 0.6817,
1245
+ "step": 206
1246
+ },
1247
+ {
1248
+ "epoch": 1.03,
1249
+ "learning_rate": 1.8554443053817272e-05,
1250
+ "loss": 0.7627,
1251
+ "step": 207
1252
+ },
1253
+ {
1254
+ "epoch": 1.04,
1255
+ "learning_rate": 1.8523153942428038e-05,
1256
+ "loss": 0.707,
1257
+ "step": 208
1258
+ },
1259
+ {
1260
+ "epoch": 1.04,
1261
+ "learning_rate": 1.84918648310388e-05,
1262
+ "loss": 0.8976,
1263
+ "step": 209
1264
+ },
1265
+ {
1266
+ "epoch": 1.05,
1267
+ "learning_rate": 1.8460575719649562e-05,
1268
+ "loss": 0.8772,
1269
+ "step": 210
1270
+ },
1271
+ {
1272
+ "epoch": 1.05,
1273
+ "learning_rate": 1.8429286608260328e-05,
1274
+ "loss": 0.9126,
1275
+ "step": 211
1276
+ },
1277
+ {
1278
+ "epoch": 1.06,
1279
+ "learning_rate": 1.839799749687109e-05,
1280
+ "loss": 0.7939,
1281
+ "step": 212
1282
+ },
1283
+ {
1284
+ "epoch": 1.06,
1285
+ "learning_rate": 1.8366708385481855e-05,
1286
+ "loss": 0.7075,
1287
+ "step": 213
1288
+ },
1289
+ {
1290
+ "epoch": 1.07,
1291
+ "learning_rate": 1.8335419274092617e-05,
1292
+ "loss": 0.7325,
1293
+ "step": 214
1294
+ },
1295
+ {
1296
+ "epoch": 1.07,
1297
+ "learning_rate": 1.8304130162703383e-05,
1298
+ "loss": 0.7835,
1299
+ "step": 215
1300
+ },
1301
+ {
1302
+ "epoch": 1.08,
1303
+ "learning_rate": 1.8272841051314145e-05,
1304
+ "loss": 0.8144,
1305
+ "step": 216
1306
+ },
1307
+ {
1308
+ "epoch": 1.08,
1309
+ "learning_rate": 1.8241551939924907e-05,
1310
+ "loss": 0.7313,
1311
+ "step": 217
1312
+ },
1313
+ {
1314
+ "epoch": 1.09,
1315
+ "learning_rate": 1.8210262828535672e-05,
1316
+ "loss": 0.885,
1317
+ "step": 218
1318
+ },
1319
+ {
1320
+ "epoch": 1.09,
1321
+ "learning_rate": 1.8178973717146434e-05,
1322
+ "loss": 0.8518,
1323
+ "step": 219
1324
+ },
1325
+ {
1326
+ "epoch": 1.1,
1327
+ "learning_rate": 1.8147684605757196e-05,
1328
+ "loss": 0.7664,
1329
+ "step": 220
1330
+ },
1331
+ {
1332
+ "epoch": 1.1,
1333
+ "learning_rate": 1.8116395494367962e-05,
1334
+ "loss": 0.8554,
1335
+ "step": 221
1336
+ },
1337
+ {
1338
+ "epoch": 1.11,
1339
+ "learning_rate": 1.8085106382978724e-05,
1340
+ "loss": 0.7364,
1341
+ "step": 222
1342
+ },
1343
+ {
1344
+ "epoch": 1.11,
1345
+ "learning_rate": 1.8053817271589486e-05,
1346
+ "loss": 0.7854,
1347
+ "step": 223
1348
+ },
1349
+ {
1350
+ "epoch": 1.12,
1351
+ "learning_rate": 1.8022528160200248e-05,
1352
+ "loss": 0.7999,
1353
+ "step": 224
1354
+ },
1355
+ {
1356
+ "epoch": 1.12,
1357
+ "learning_rate": 1.7991239048811014e-05,
1358
+ "loss": 0.8567,
1359
+ "step": 225
1360
+ },
1361
+ {
1362
+ "epoch": 1.13,
1363
+ "learning_rate": 1.7959949937421776e-05,
1364
+ "loss": 0.8642,
1365
+ "step": 226
1366
+ },
1367
+ {
1368
+ "epoch": 1.14,
1369
+ "learning_rate": 1.792866082603254e-05,
1370
+ "loss": 0.7586,
1371
+ "step": 227
1372
+ },
1373
+ {
1374
+ "epoch": 1.14,
1375
+ "learning_rate": 1.7897371714643303e-05,
1376
+ "loss": 0.7328,
1377
+ "step": 228
1378
+ },
1379
+ {
1380
+ "epoch": 1.15,
1381
+ "learning_rate": 1.786608260325407e-05,
1382
+ "loss": 0.8685,
1383
+ "step": 229
1384
+ },
1385
+ {
1386
+ "epoch": 1.15,
1387
+ "learning_rate": 1.783479349186483e-05,
1388
+ "loss": 0.6846,
1389
+ "step": 230
1390
+ },
1391
+ {
1392
+ "epoch": 1.16,
1393
+ "learning_rate": 1.7803504380475593e-05,
1394
+ "loss": 0.7963,
1395
+ "step": 231
1396
+ },
1397
+ {
1398
+ "epoch": 1.16,
1399
+ "learning_rate": 1.777221526908636e-05,
1400
+ "loss": 0.762,
1401
+ "step": 232
1402
+ },
1403
+ {
1404
+ "epoch": 1.17,
1405
+ "learning_rate": 1.774092615769712e-05,
1406
+ "loss": 0.8083,
1407
+ "step": 233
1408
+ },
1409
+ {
1410
+ "epoch": 1.17,
1411
+ "learning_rate": 1.7709637046307886e-05,
1412
+ "loss": 0.8685,
1413
+ "step": 234
1414
+ },
1415
+ {
1416
+ "epoch": 1.18,
1417
+ "learning_rate": 1.7678347934918648e-05,
1418
+ "loss": 0.6171,
1419
+ "step": 235
1420
+ },
1421
+ {
1422
+ "epoch": 1.18,
1423
+ "learning_rate": 1.7647058823529414e-05,
1424
+ "loss": 0.7341,
1425
+ "step": 236
1426
+ },
1427
+ {
1428
+ "epoch": 1.19,
1429
+ "learning_rate": 1.7615769712140176e-05,
1430
+ "loss": 0.7801,
1431
+ "step": 237
1432
+ },
1433
+ {
1434
+ "epoch": 1.19,
1435
+ "learning_rate": 1.7584480600750938e-05,
1436
+ "loss": 0.8321,
1437
+ "step": 238
1438
+ },
1439
+ {
1440
+ "epoch": 1.2,
1441
+ "learning_rate": 1.7553191489361703e-05,
1442
+ "loss": 0.7637,
1443
+ "step": 239
1444
+ },
1445
+ {
1446
+ "epoch": 1.2,
1447
+ "learning_rate": 1.7521902377972465e-05,
1448
+ "loss": 0.7872,
1449
+ "step": 240
1450
+ },
1451
+ {
1452
+ "epoch": 1.21,
1453
+ "learning_rate": 1.749061326658323e-05,
1454
+ "loss": 0.8981,
1455
+ "step": 241
1456
+ },
1457
+ {
1458
+ "epoch": 1.21,
1459
+ "learning_rate": 1.7459324155193993e-05,
1460
+ "loss": 0.8244,
1461
+ "step": 242
1462
+ },
1463
+ {
1464
+ "epoch": 1.22,
1465
+ "learning_rate": 1.742803504380476e-05,
1466
+ "loss": 0.7284,
1467
+ "step": 243
1468
+ },
1469
+ {
1470
+ "epoch": 1.22,
1471
+ "learning_rate": 1.739674593241552e-05,
1472
+ "loss": 0.8948,
1473
+ "step": 244
1474
+ },
1475
+ {
1476
+ "epoch": 1.23,
1477
+ "learning_rate": 1.7365456821026283e-05,
1478
+ "loss": 0.7505,
1479
+ "step": 245
1480
+ },
1481
+ {
1482
+ "epoch": 1.23,
1483
+ "learning_rate": 1.7334167709637048e-05,
1484
+ "loss": 0.6836,
1485
+ "step": 246
1486
+ },
1487
+ {
1488
+ "epoch": 1.23,
1489
+ "learning_rate": 1.730287859824781e-05,
1490
+ "loss": 0.825,
1491
+ "step": 247
1492
+ },
1493
+ {
1494
+ "epoch": 1.24,
1495
+ "learning_rate": 1.7271589486858576e-05,
1496
+ "loss": 0.954,
1497
+ "step": 248
1498
+ },
1499
+ {
1500
+ "epoch": 1.25,
1501
+ "learning_rate": 1.7240300375469338e-05,
1502
+ "loss": 0.7165,
1503
+ "step": 249
1504
+ },
1505
+ {
1506
+ "epoch": 1.25,
1507
+ "learning_rate": 1.7209011264080103e-05,
1508
+ "loss": 0.8173,
1509
+ "step": 250
1510
+ },
1511
+ {
1512
+ "epoch": 1.25,
1513
+ "learning_rate": 1.7177722152690865e-05,
1514
+ "loss": 0.8108,
1515
+ "step": 251
1516
+ },
1517
+ {
1518
+ "epoch": 1.26,
1519
+ "learning_rate": 1.7146433041301627e-05,
1520
+ "loss": 0.8313,
1521
+ "step": 252
1522
+ },
1523
+ {
1524
+ "epoch": 1.27,
1525
+ "learning_rate": 1.7115143929912393e-05,
1526
+ "loss": 0.9048,
1527
+ "step": 253
1528
+ },
1529
+ {
1530
+ "epoch": 1.27,
1531
+ "learning_rate": 1.7083854818523155e-05,
1532
+ "loss": 0.8831,
1533
+ "step": 254
1534
+ },
1535
+ {
1536
+ "epoch": 1.27,
1537
+ "learning_rate": 1.705256570713392e-05,
1538
+ "loss": 0.717,
1539
+ "step": 255
1540
+ },
1541
+ {
1542
+ "epoch": 1.28,
1543
+ "learning_rate": 1.7021276595744682e-05,
1544
+ "loss": 0.838,
1545
+ "step": 256
1546
+ },
1547
+ {
1548
+ "epoch": 1.28,
1549
+ "learning_rate": 1.6989987484355448e-05,
1550
+ "loss": 0.8352,
1551
+ "step": 257
1552
+ },
1553
+ {
1554
+ "epoch": 1.29,
1555
+ "learning_rate": 1.695869837296621e-05,
1556
+ "loss": 0.6925,
1557
+ "step": 258
1558
+ },
1559
+ {
1560
+ "epoch": 1.29,
1561
+ "learning_rate": 1.6927409261576972e-05,
1562
+ "loss": 0.6983,
1563
+ "step": 259
1564
+ },
1565
+ {
1566
+ "epoch": 1.3,
1567
+ "learning_rate": 1.6896120150187734e-05,
1568
+ "loss": 0.7399,
1569
+ "step": 260
1570
+ },
1571
+ {
1572
+ "epoch": 1.3,
1573
+ "learning_rate": 1.68648310387985e-05,
1574
+ "loss": 0.9373,
1575
+ "step": 261
1576
+ },
1577
+ {
1578
+ "epoch": 1.31,
1579
+ "learning_rate": 1.6833541927409262e-05,
1580
+ "loss": 0.807,
1581
+ "step": 262
1582
+ },
1583
+ {
1584
+ "epoch": 1.31,
1585
+ "learning_rate": 1.6802252816020024e-05,
1586
+ "loss": 1.0353,
1587
+ "step": 263
1588
+ },
1589
+ {
1590
+ "epoch": 1.32,
1591
+ "learning_rate": 1.677096370463079e-05,
1592
+ "loss": 0.9005,
1593
+ "step": 264
1594
+ },
1595
+ {
1596
+ "epoch": 1.32,
1597
+ "learning_rate": 1.673967459324155e-05,
1598
+ "loss": 0.7737,
1599
+ "step": 265
1600
+ },
1601
+ {
1602
+ "epoch": 1.33,
1603
+ "learning_rate": 1.6708385481852313e-05,
1604
+ "loss": 0.8731,
1605
+ "step": 266
1606
+ },
1607
+ {
1608
+ "epoch": 1.33,
1609
+ "learning_rate": 1.667709637046308e-05,
1610
+ "loss": 0.9601,
1611
+ "step": 267
1612
+ },
1613
+ {
1614
+ "epoch": 1.34,
1615
+ "learning_rate": 1.664580725907384e-05,
1616
+ "loss": 0.7676,
1617
+ "step": 268
1618
+ },
1619
+ {
1620
+ "epoch": 1.34,
1621
+ "learning_rate": 1.6614518147684607e-05,
1622
+ "loss": 0.7407,
1623
+ "step": 269
1624
+ },
1625
+ {
1626
+ "epoch": 1.35,
1627
+ "learning_rate": 1.658322903629537e-05,
1628
+ "loss": 0.7421,
1629
+ "step": 270
1630
+ },
1631
+ {
1632
+ "epoch": 1.35,
1633
+ "learning_rate": 1.6551939924906134e-05,
1634
+ "loss": 0.7523,
1635
+ "step": 271
1636
+ },
1637
+ {
1638
+ "epoch": 1.36,
1639
+ "learning_rate": 1.6520650813516896e-05,
1640
+ "loss": 0.7475,
1641
+ "step": 272
1642
+ },
1643
+ {
1644
+ "epoch": 1.36,
1645
+ "learning_rate": 1.6489361702127658e-05,
1646
+ "loss": 0.7144,
1647
+ "step": 273
1648
+ },
1649
+ {
1650
+ "epoch": 1.37,
1651
+ "learning_rate": 1.6458072590738424e-05,
1652
+ "loss": 0.9052,
1653
+ "step": 274
1654
+ },
1655
+ {
1656
+ "epoch": 1.38,
1657
+ "learning_rate": 1.6426783479349186e-05,
1658
+ "loss": 0.7974,
1659
+ "step": 275
1660
+ },
1661
+ {
1662
+ "epoch": 1.38,
1663
+ "learning_rate": 1.639549436795995e-05,
1664
+ "loss": 0.8961,
1665
+ "step": 276
1666
+ },
1667
+ {
1668
+ "epoch": 1.39,
1669
+ "learning_rate": 1.6364205256570713e-05,
1670
+ "loss": 0.7951,
1671
+ "step": 277
1672
+ },
1673
+ {
1674
+ "epoch": 1.39,
1675
+ "learning_rate": 1.633291614518148e-05,
1676
+ "loss": 0.7915,
1677
+ "step": 278
1678
+ },
1679
+ {
1680
+ "epoch": 1.4,
1681
+ "learning_rate": 1.630162703379224e-05,
1682
+ "loss": 0.7114,
1683
+ "step": 279
1684
+ },
1685
+ {
1686
+ "epoch": 1.4,
1687
+ "learning_rate": 1.6270337922403003e-05,
1688
+ "loss": 0.766,
1689
+ "step": 280
1690
+ },
1691
+ {
1692
+ "epoch": 1.41,
1693
+ "learning_rate": 1.623904881101377e-05,
1694
+ "loss": 0.7336,
1695
+ "step": 281
1696
+ },
1697
+ {
1698
+ "epoch": 1.41,
1699
+ "learning_rate": 1.620775969962453e-05,
1700
+ "loss": 0.8702,
1701
+ "step": 282
1702
+ },
1703
+ {
1704
+ "epoch": 1.42,
1705
+ "learning_rate": 1.6176470588235296e-05,
1706
+ "loss": 0.8667,
1707
+ "step": 283
1708
+ },
1709
+ {
1710
+ "epoch": 1.42,
1711
+ "learning_rate": 1.6145181476846058e-05,
1712
+ "loss": 0.7561,
1713
+ "step": 284
1714
+ },
1715
+ {
1716
+ "epoch": 1.43,
1717
+ "learning_rate": 1.6113892365456824e-05,
1718
+ "loss": 0.6965,
1719
+ "step": 285
1720
+ },
1721
+ {
1722
+ "epoch": 1.43,
1723
+ "learning_rate": 1.6082603254067586e-05,
1724
+ "loss": 0.7825,
1725
+ "step": 286
1726
+ },
1727
+ {
1728
+ "epoch": 1.44,
1729
+ "learning_rate": 1.6051314142678348e-05,
1730
+ "loss": 0.7628,
1731
+ "step": 287
1732
+ },
1733
+ {
1734
+ "epoch": 1.44,
1735
+ "learning_rate": 1.6020025031289113e-05,
1736
+ "loss": 0.7527,
1737
+ "step": 288
1738
+ },
1739
+ {
1740
+ "epoch": 1.45,
1741
+ "learning_rate": 1.5988735919899875e-05,
1742
+ "loss": 0.7336,
1743
+ "step": 289
1744
+ },
1745
+ {
1746
+ "epoch": 1.45,
1747
+ "learning_rate": 1.595744680851064e-05,
1748
+ "loss": 0.9209,
1749
+ "step": 290
1750
+ },
1751
+ {
1752
+ "epoch": 1.46,
1753
+ "learning_rate": 1.5926157697121403e-05,
1754
+ "loss": 0.8466,
1755
+ "step": 291
1756
+ },
1757
+ {
1758
+ "epoch": 1.46,
1759
+ "learning_rate": 1.589486858573217e-05,
1760
+ "loss": 0.8237,
1761
+ "step": 292
1762
+ },
1763
+ {
1764
+ "epoch": 1.47,
1765
+ "learning_rate": 1.586357947434293e-05,
1766
+ "loss": 0.7912,
1767
+ "step": 293
1768
+ },
1769
+ {
1770
+ "epoch": 1.47,
1771
+ "learning_rate": 1.5832290362953693e-05,
1772
+ "loss": 0.74,
1773
+ "step": 294
1774
+ },
1775
+ {
1776
+ "epoch": 1.48,
1777
+ "learning_rate": 1.5801001251564458e-05,
1778
+ "loss": 0.7227,
1779
+ "step": 295
1780
+ },
1781
+ {
1782
+ "epoch": 1.48,
1783
+ "learning_rate": 1.576971214017522e-05,
1784
+ "loss": 0.8125,
1785
+ "step": 296
1786
+ },
1787
+ {
1788
+ "epoch": 1.48,
1789
+ "learning_rate": 1.5738423028785986e-05,
1790
+ "loss": 0.7384,
1791
+ "step": 297
1792
+ },
1793
+ {
1794
+ "epoch": 1.49,
1795
+ "learning_rate": 1.5707133917396748e-05,
1796
+ "loss": 0.852,
1797
+ "step": 298
1798
+ },
1799
+ {
1800
+ "epoch": 1.5,
1801
+ "learning_rate": 1.567584480600751e-05,
1802
+ "loss": 0.8198,
1803
+ "step": 299
1804
+ },
1805
+ {
1806
+ "epoch": 1.5,
1807
+ "learning_rate": 1.5644555694618275e-05,
1808
+ "loss": 0.8817,
1809
+ "step": 300
1810
+ }
1811
+ ],
1812
+ "logging_steps": 1,
1813
+ "max_steps": 800,
1814
+ "num_input_tokens_seen": 0,
1815
+ "num_train_epochs": 4,
1816
+ "save_steps": 10,
1817
+ "total_flos": 3.140916098758944e+16,
1818
+ "train_batch_size": 1,
1819
+ "trial_name": null,
1820
+ "trial_params": null
1821
+ }
checkpoint-300/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3501b609227a6d61fef0435402a30ee750e1e3f7c04acadf47d4128368c928f
3
+ size 4728
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Viet-Mistral/Vistral-7B-Chat",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 32768,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 8,
18
+ "rms_norm_eps": 1e-05,
19
+ "rope_theta": 10000.0,
20
+ "sliding_window": 4096,
21
+ "tie_word_embeddings": false,
22
+ "torch_dtype": "float16",
23
+ "transformers_version": "4.38.0.dev0",
24
+ "use_cache": true,
25
+ "vocab_size": 38369
26
+ }
finetune.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging, TextStreamer
3
+ from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
4
+ import os, torch, wandb, platform, warnings
5
+ from datasets import load_dataset
6
+ from trl import SFTTrainer
7
+
8
+ hf_token = ''
9
+ wnb_token = ''
10
+ wnb_name = 'vistral-chatml'
11
+ MODEL = 'Viet-Mistral/Vistral-7B-Chat'
12
+ resume_from_checkpoint = False
13
+ output_dir = 'vistral-chatml'
14
+ tokenizer_path = '.'
15
+
16
+ #######################################################
17
+ ## DATASET
18
+
19
+
20
+ from datasets import load_dataset
21
+
22
+
23
+ def generate_system_prompt(i):
24
+ system_prompt = "Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực. Hãy luôn trả lời một cách hữu ích nhất có thể, đồng thời giữ an toàn."
25
+ if i % 2 == 0:
26
+ system_prompt += "\nCâu trả lời của bạn không nên chứa bất kỳ nội dung gây hại, phân biệt chủng tộc, phân biệt giới tính, độc hại, nguy hiểm hoặc bất hợp pháp nào. Hãy đảm bảo rằng các câu trả lời của bạn không có thiên kiến xã hội và mang tính tích cực."
27
+ if i % 5 == 0:
28
+ system_prompt += "\nNếu một câu hỏi không có ý nghĩa hoặc không hợp lý về mặt thông tin, hãy giải thích tại sao thay vì trả lời một điều gì đó không chính xác. Nếu bạn không biết câu trả lời cho một câu hỏi, hãy trẳ lời là bạn không biết và vui lòng không chia sẻ thông tin sai lệch."
29
+ return system_prompt
30
+
31
+ tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
32
+
33
+ def tokenize_chat(input, i):
34
+ print(generate_system_prompt(i))
35
+ conversation = [{'role': 'system', 'content': generate_system_prompt(i)}]
36
+ for msg in input['conversations']:
37
+ output = {'role': 'user', 'content': msg['value']}
38
+ if msg['from'] == 'gpt':
39
+ output['role'] = 'assistant'
40
+ conversation.append(output)
41
+ formatted = tokenizer.apply_chat_template(conversation, tokenize=False)
42
+ return tokenizer(formatted)
43
+
44
+ sharegpt_dataset = load_dataset('bkai-foundation-models/vi-self-chat-sharegpt-format')
45
+ train_data = sharegpt_dataset['train'].shuffle(seed=42)\
46
+ .select(range(800))\
47
+ .map(lambda x, i: tokenize_chat(x, i), remove_columns=["conversations"], with_indices=True)
48
+
49
+
50
+ #######################################################
51
+ ## SETUP
52
+
53
+ wandb.login(key=wnb_token)
54
+ wandb.init(name=wnb_name)
55
+ # use custom tokenizer instead of one comes from the model
56
+ #tokenizer = AutoTokenizer.from_pretrained(
57
+ # MODEL,
58
+ # add_eos_token=False,
59
+ # add_bos_token=False,
60
+ # token=hf_token,
61
+ #)
62
+ bnb_config = BitsAndBytesConfig(
63
+ load_in_4bit=True,
64
+ bnb_4bit_quant_type="nf4",
65
+ bnb_4bit_compute_dtype=torch.bfloat16,
66
+ bnb_4bit_use_double_quant=True,
67
+ )
68
+ model = AutoModelForCausalLM.from_pretrained(
69
+ MODEL,
70
+ device_map="auto",
71
+ token=hf_token,
72
+ quantization_config=bnb_config,
73
+ trust_remote_code=True,
74
+ )
75
+
76
+
77
+ #######################################################
78
+ ## LORA CONFIG
79
+
80
+ model.gradient_checkpointing_enable()
81
+ model = prepare_model_for_kbit_training(model)
82
+ peft_config = LoraConfig(
83
+ r=8,
84
+ lora_alpha=16,
85
+ target_modules=[
86
+ "q_proj",
87
+ "k_proj",
88
+ "v_proj",
89
+ "o_proj",
90
+ "gate_proj",
91
+ "up_proj",
92
+ "down_proj",
93
+ "lm_head",
94
+ ],
95
+ bias="none",
96
+ lora_dropout=0.05, # Conventional
97
+ task_type="CAUSAL_LM",
98
+ )
99
+ model = get_peft_model(model, peft_config)
100
+ model.print_trainable_parameters()
101
+
102
+ from accelerate import Accelerator
103
+ accelerator = Accelerator()
104
+ model = accelerator.prepare_model(model)
105
+
106
+
107
+ #######################################################
108
+ ## TRAIN
109
+
110
+ from transformers import Trainer, TrainingArguments, DataCollatorForLanguageModeling
111
+ trainer = Trainer(
112
+ model=model,
113
+ train_dataset=train_data,
114
+ args=TrainingArguments(
115
+ report_to='wandb',
116
+ warmup_steps=1,
117
+ per_device_train_batch_size=1,
118
+ gradient_accumulation_steps=4,
119
+ gradient_checkpointing=True,
120
+ num_train_epochs=4,
121
+ learning_rate=2.5e-5,
122
+ logging_steps=1,
123
+ optim="paged_adamw_8bit",
124
+ save_strategy="steps",
125
+ save_steps=10,
126
+ save_total_limit=4,
127
+ output_dir=output_dir
128
+ ),
129
+ data_collator=DataCollatorForLanguageModeling(tokenizer, mlm=False)
130
+ )
131
+ model.config.use_cache = False
132
+
133
+ trainer.train(resume_from_checkpoint=resume_from_checkpoint)
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.38.0.dev0",
6
+ "use_cache": false
7
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59dc9acb93ec34ca7dd6d92eaa56f0c4cf9e154141956f66d84888e971beb050
3
+ size 4995337088
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9befdd43080c0a6b4e6bd89a6dd4becf9ca9c48397aa36329d9fec60e5698922
3
+ size 4999819232
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:229ab0e866969c8e4f06dc42f6b5b6f7fcbb7d63f15eeb61760823dc89e1ce72
3
+ size 4592691112
model.safetensors.index.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 14587813888
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00003-of-00003.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00003.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00003.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00003.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00003.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00003.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00003.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00003.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00003.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00003.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00003.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00003.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00003.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00003.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00003.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00003.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00003.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00003.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00003-of-00003.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00003-of-00003.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
242
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
243
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
244
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
245
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
246
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
247
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
248
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
249
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
250
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
251
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors",
252
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
253
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
254
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
255
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
256
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
257
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
258
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
259
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
260
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors",
261
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
262
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
263
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
264
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
265
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
266
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
267
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
268
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
269
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00003.safetensors",
270
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
271
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
272
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
273
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
274
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
275
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
276
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
277
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
278
+ "model.layers.8.input_layernorm.weight": "model-00001-of-00003.safetensors",
279
+ "model.layers.8.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
280
+ "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
281
+ "model.layers.8.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
282
+ "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
283
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
284
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
285
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
286
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
287
+ "model.layers.9.input_layernorm.weight": "model-00001-of-00003.safetensors",
288
+ "model.layers.9.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
289
+ "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
290
+ "model.layers.9.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
291
+ "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
292
+ "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
293
+ "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
294
+ "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
295
+ "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
296
+ "model.norm.weight": "model-00003-of-00003.safetensors"
297
+ }
298
+ }
run.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, HfArgumentParser, TrainingArguments, pipeline, logging, TextStreamer
3
+ from peft import LoraConfig, PeftModel, prepare_model_for_kbit_training, get_peft_model
4
+ import os, torch, wandb, platform, warnings
5
+ from datasets import load_dataset
6
+ from trl import SFTTrainer
7
+
8
+ hf_token = '..........'
9
+
10
+ tokenizer = AutoTokenizer.from_pretrained('./vistral-tokenizer')
11
+ bnb_config = BitsAndBytesConfig(
12
+ load_in_4bit=True,
13
+ bnb_4bit_quant_type="nf4",
14
+ bnb_4bit_compute_dtype=torch.bfloat16,
15
+ bnb_4bit_use_double_quant=True,
16
+ )
17
+ model = AutoModelForCausalLM.from_pretrained(
18
+ 'Viet-Mistral/Vistral-7B-Chat',
19
+ device_map="auto",
20
+ token=hf_token,
21
+ quantization_config=bnb_config,
22
+ )
23
+ ft_model = PeftModel.from_pretrained(model, CHECKPOINT_PATH)
24
+
25
+ #torch.backends.cuda.enable_mem_efficient_sdp(False)
26
+ #torch.backends.cuda.enable_flash_sdp(False)
27
+
28
+ system_prompt = "Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực. Hãy luôn trả lời một cách hữu ích nhất có thể, đồng thời giữ an toàn."
29
+
30
+ stop_tokens = [tokenizer.eos_token_id, tokenizer('<|im_end|>')['input_ids'].pop()]
31
+
32
+ def chat_test():
33
+ conversation = [{"role": "system", "content": system_prompt }]
34
+ while True:
35
+ human = input("Human: ")
36
+ if human.lower() == "reset":
37
+ conversation = [{"role": "system", "content": system_prompt }]
38
+ print("The chat history has been cleared!")
39
+ continue
40
+
41
+ if human.lower() == "exit":
42
+ break
43
+
44
+ conversation.append({"role": "user", "content": human })
45
+ formatted = tokenizer.apply_chat_template(conversation, tokenize=False) + "<|im_start|>assistant"
46
+ tok = tokenizer(formatted, return_tensors="pt").to(ft_model.device)
47
+ input_ids = tok['input_ids']
48
+
49
+ out_ids = ft_model.generate(
50
+ input_ids=input_ids,
51
+ attention_mask=tok['attention_mask'],
52
+ eos_token_id=stop_tokens,
53
+ max_new_tokens=50,
54
+ do_sample=True,
55
+ top_p=0.95,
56
+ top_k=40,
57
+ temperature=0.1,
58
+ repetition_penalty=1.05,
59
+ )
60
+ assistant = tokenizer.batch_decode(out_ids[:, input_ids.size(1): ], skip_special_tokens=True)[0].strip()
61
+ print("Assistant: ", assistant)
62
+ conversation.append({"role": "assistant", "content": assistant })
63
+
64
+ chat_test()
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "<|im_end|>",
4
+ "pad_token": "</s>",
5
+ "unk_token": "<unk>"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e792a804bbfc19a96b61b87109b8f2b0b7c92830025f285b402ba27c0c309c6f
3
+ size 596883
tokenizer_config.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<unk>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<s>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "38365": {
28
+ "content": "<<SYS>>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": false
34
+ },
35
+ "38366": {
36
+ "content": "<</SYS>>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": false
42
+ },
43
+ "38367": {
44
+ "content": "<|im_start|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "38368": {
52
+ "content": "<|im_end|>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ }
59
+ },
60
+ "additional_special_tokens": [
61
+ "<unk>",
62
+ "<s>",
63
+ "</s>",
64
+ "<|im_start|>",
65
+ "<|im_end|>"
66
+ ],
67
+ "bos_token": "<s>",
68
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
69
+ "clean_up_tokenization_spaces": false,
70
+ "eos_token": "<|im_end|>",
71
+ "legacy": true,
72
+ "model_max_length": 1000000000000000019884624838656,
73
+ "pad_token": "<unk>",
74
+ "sp_model_kwargs": {},
75
+ "spaces_between_special_tokens": false,
76
+ "tokenizer_class": "LlamaTokenizer",
77
+ "unk_token": "<unk>",
78
+ "use_default_system_prompt": false,
79
+ "use_fast": true
80
+ }
vistral-7b-chatml-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5b27fb9fc3b2118d24f5476e5881b4000045a640500c464319849d557746e14
3
+ size 4404661312