ducdatit2002 commited on
Commit
82df4a4
·
verified ·
1 Parent(s): 42fc057

Upload folder using huggingface_hub

Browse files
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sử dụng image Python 3.9 slim làm base image
2
+ FROM python:3.9-slim
3
+
4
+ # Thiết lập thư mục làm việc
5
+ WORKDIR /app
6
+
7
+ # Cài đặt các gói hệ thống cần thiết
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy file requirements.txt vào container
13
+ COPY requirements.txt .
14
+
15
+ # Nâng cấp pip và cài đặt các thư viện Python từ requirements.txt
16
+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy toàn bộ mã nguồn vào container (bao gồm cả thư mục checkpoint)
19
+ COPY . .
20
+
21
+ # Expose cổng mà API sẽ chạy
22
+ EXPOSE 8000
23
+
24
+ # Khởi chạy ứng dụng với uvicorn
25
+ CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"]
abbreviations.json ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "ad": [
3
+ "admin",
4
+ "quản trị viên"
5
+ ],
6
+ "bb": [
7
+ "bye bye",
8
+ "tạm biệt"
9
+ ],
10
+ "bl": [
11
+ "bình luận"
12
+ ],
13
+ "bth": [
14
+ "bình thường"
15
+ ],
16
+ "bmn": [
17
+ "bạn muốn"
18
+ ],
19
+ "cxk": [
20
+ "cũng không"
21
+ ],
22
+ "đm": [
23
+ "đ** m**"
24
+ ],
25
+ "gg": [
26
+ "good game",
27
+ "Google"
28
+ ],
29
+ "hc": [
30
+ "học"
31
+ ],
32
+ "kq": [
33
+ "kết quả"
34
+ ],
35
+ "kb": [
36
+ "kết bạn"
37
+ ],
38
+ "khá": [
39
+ "khá là"
40
+ ],
41
+ "lq": [
42
+ "liên quan"
43
+ ],
44
+ "lmh": [
45
+ "làm gì thế"
46
+ ],
47
+ "ng": [
48
+ "người"
49
+ ],
50
+ "nsao": [
51
+ "nói sao"
52
+ ],
53
+ "nv": [
54
+ "nhân vật"
55
+ ],
56
+ "nvay": [
57
+ "như vậy"
58
+ ],
59
+ "nxk": [
60
+ "nói không"
61
+ ],
62
+ "ob": [
63
+ "ông bà"
64
+ ],
65
+ "pc": [
66
+ "phải không"
67
+ ],
68
+ "ph": [
69
+ "phim"
70
+ ],
71
+ "ql": [
72
+ "quản lý"
73
+ ],
74
+ "qt": [
75
+ "quá trời"
76
+ ],
77
+ "sdt": [
78
+ "số điện thoại"
79
+ ],
80
+ "sk": [
81
+ "sức khỏe"
82
+ ],
83
+ "tc": [
84
+ "tài chính"
85
+ ],
86
+ "td": [
87
+ "tâm điểm",
88
+ "tập đoàn"
89
+ ],
90
+ "th": [
91
+ "thôi"
92
+ ],
93
+ "tl": [
94
+ "trả lời"
95
+ ],
96
+ "ty": [
97
+ "tình yêu"
98
+ ],
99
+ "up": [
100
+ "cập nhật",
101
+ "update"
102
+ ],
103
+ "xđ": [
104
+ "xác định"
105
+ ],
106
+ "zui": [
107
+ "vui"
108
+ ],
109
+ "zời": [
110
+ "trời"
111
+ ],
112
+ "hdsd": [
113
+ "hướng dẫn sử dụng"
114
+ ],
115
+ "bbq": [
116
+ "barbecue",
117
+ "tiệc nướng"
118
+ ],
119
+ "cx": [
120
+ "chắc chắn",
121
+ "cũng"
122
+ ],
123
+ "vkc": [
124
+ "vãi kinh"
125
+ ],
126
+ "kt": [
127
+ "kiểm tra",
128
+ "không thèm"
129
+ ],
130
+ "tks": [
131
+ "thanks",
132
+ "cảm ơn"
133
+ ],
134
+ "đg": [
135
+ "đang"
136
+ ],
137
+ "qa": [
138
+ "quá"
139
+ ],
140
+ "ht": [
141
+ "học tập",
142
+ "hoàn tất"
143
+ ],
144
+ "clgt": [
145
+ "cái l** gì thế"
146
+ ],
147
+ "pls": [
148
+ "please",
149
+ "làm ơn"
150
+ ],
151
+ "qtqđ": [
152
+ "quá trời quá đất"
153
+ ],
154
+ "klq": [
155
+ "không liên quan"
156
+ ],
157
+ "mn": [
158
+ "mọi người"
159
+ ],
160
+ "vc": [
161
+ "vãi chưởng",
162
+ "vợ chồng"
163
+ ],
164
+ "vch": [
165
+ "vãi chưởng"
166
+ ],
167
+ "cđ": [
168
+ "cuộc đời"
169
+ ],
170
+ "đhs": [
171
+ "đ** hiểu sao"
172
+ ],
173
+ "ib": [
174
+ "inbox",
175
+ "nhắn tin"
176
+ ],
177
+ "ttyl": [
178
+ "talk to you later",
179
+ "nói chuyện sau"
180
+ ],
181
+ "stt": [
182
+ "status",
183
+ "trạng thái"
184
+ ],
185
+ "sr": [
186
+ "sorry",
187
+ "xin lỗi"
188
+ ],
189
+ "bn": [
190
+ "bao nhiêu",
191
+ "bạn"
192
+ ],
193
+ "ckmnl": [
194
+ "chào cả nhà mình nha l"
195
+ ],
196
+ "cr": [
197
+ "crush"
198
+ ],
199
+ "mng": [
200
+ "mọi người"
201
+ ],
202
+ "vl": [
203
+ "vãi l",
204
+ "rất"
205
+ ],
206
+ "khbn": [
207
+ "không biết nữa"
208
+ ],
209
+ "qtq": [
210
+ "quá trời quá"
211
+ ],
212
+ "sml": [
213
+ "sấp mặt luôn"
214
+ ],
215
+ "ns": [
216
+ "nói"
217
+ ],
218
+ "ăn h": [
219
+ "ăn hành"
220
+ ],
221
+ "qh": [
222
+ "quan hệ"
223
+ ],
224
+ "ăn b": [
225
+ "ăn bánh"
226
+ ],
227
+ "hph": [
228
+ "hạnh phúc"
229
+ ],
230
+ "ngta": [
231
+ "người ta"
232
+ ],
233
+ "mnk": [
234
+ "mọi người không"
235
+ ],
236
+ "ahihi": [
237
+ "cười đùa"
238
+ ],
239
+ "chz": [
240
+ "chuyện"
241
+ ],
242
+ "vđ": [
243
+ "vấn đề"
244
+ ],
245
+ "pp": [
246
+ "bye bye",
247
+ "tạm biệt"
248
+ ],
249
+ "dc": [
250
+ "được"
251
+ ],
252
+ "nt": [
253
+ "nhắn tin"
254
+ ],
255
+ "thik": [
256
+ "thích"
257
+ ],
258
+ "bt": [
259
+ "biết",
260
+ "bình thường"
261
+ ],
262
+ "kp": [
263
+ "không phải"
264
+ ],
265
+ "mik": [
266
+ "mình"
267
+ ],
268
+ "lm": [
269
+ "làm"
270
+ ],
271
+ "nx": [
272
+ "nữa"
273
+ ],
274
+ "mk": [
275
+ "mình",
276
+ "mày"
277
+ ],
278
+ "cmt": [
279
+ "comment",
280
+ "bình luận"
281
+ ],
282
+ "rep": [
283
+ "trả lời",
284
+ "phản hồi"
285
+ ],
286
+ "fa": [
287
+ "độc thân",
288
+ "forever alone"
289
+ ],
290
+ "chx": [
291
+ "chưa"
292
+ ],
293
+ "qlq": [
294
+ "quản lý quán"
295
+ ],
296
+ "a": [
297
+ "anh"
298
+ ],
299
+ "e": [
300
+ "em"
301
+ ],
302
+ "ko": [
303
+ "không"
304
+ ],
305
+ "kh": [
306
+ "không"
307
+ ],
308
+ "z": [
309
+ "vậy"
310
+ ],
311
+ "ny": [
312
+ "người yêu"
313
+ ],
314
+ "l": [
315
+ "là"
316
+ ],
317
+ "sn": [
318
+ "sinh nhật"
319
+ ],
320
+ "ckk": [
321
+ "chúc ngủ ngon"
322
+ ],
323
+ "hpbd": [
324
+ "happy birthday"
325
+ ],
326
+ "tt": [
327
+ "thông tin",
328
+ "tương tác"
329
+ ],
330
+ "ms": [
331
+ "mới"
332
+ ],
333
+ "k": [
334
+ "không"
335
+ ],
336
+ "vk": [
337
+ "vợ"
338
+ ],
339
+ "ck": [
340
+ "chồng"
341
+ ],
342
+ "j": [
343
+ "gì"
344
+ ],
345
+ "m": [
346
+ "mày"
347
+ ],
348
+ "t": [
349
+ "tao"
350
+ ],
351
+ "sgk": [
352
+ "sách giáo khoa"
353
+ ],
354
+ "cv": [
355
+ "công việc"
356
+ ],
357
+ "pv": [
358
+ "phục vụ"
359
+ ],
360
+ "dth":["dễ thương"],
361
+ "gato": ["ghen ăn tức ở"]
362
+
363
+ }
api.py ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # demo_phobert_api.py
2
+ # -*- coding: utf-8 -*-
3
+
4
+ from fastapi import FastAPI
5
+ from pydantic import BaseModel
6
+ import torch
7
+ import re
8
+ import json
9
+ import emoji
10
+ from underthesea import word_tokenize
11
+ from transformers import AutoConfig, AutoTokenizer, AutoModelForSequenceClassification
12
+
13
+ # Khởi tạo FastAPI app
14
+ app = FastAPI(
15
+ title="PhoBERT Emotion Classification API",
16
+ description="API dự đoán cảm xúc của câu tiếng Việt sử dụng PhoBERT.",
17
+ version="1.0"
18
+ )
19
+
20
+ ###############################################################################
21
+ # TẢI MAPPING EMOJI - COPY Y NGUYÊN TỪ FILE TRAIN
22
+ ###############################################################################
23
+ emoji_mapping = {
24
+ "😀": "[joy]", "😃": "[joy]", "😄": "[joy]", "😁": "[joy]", "😆": "[joy]", "😅": "[joy]", "😂": "[joy]", "🤣": "[joy]",
25
+ "🙂": "[love]", "🙃": "[love]", "😉": "[love]", "😊": "[love]", "😇": "[love]", "🥰": "[love]", "😍": "[love]",
26
+ "🤩": "[love]", "😘": "[love]", "😗": "[love]", "☺": "[love]", "😚": "[love]", "😙": "[love]",
27
+ "😋": "[satisfaction]", "😛": "[satisfaction]", "😜": "[satisfaction]", "🤪": "[satisfaction]", "😝": "[satisfaction]",
28
+ "🤑": "[satisfaction]",
29
+ "🤐": "[neutral]", "🤨": "[neutral]", "😐": "[neutral]", "😑": "[neutral]", "😶": "[neutral]",
30
+ "😏": "[sarcasm]",
31
+ "😒": "[disappointment]", "🙄": "[disappointment]", "😬": "[disappointment]",
32
+ "😔": "[sadness]", "😪": "[sadness]", "😢": "[sadness]", "😭": "[sadness]", "😥": "[sadness]", "😓": "[sadness]",
33
+ "😩": "[tiredness]", "😫": "[tiredness]", "🥱": "[tiredness]",
34
+ "🤤": "[discomfort]", "🤢": "[discomfort]", "🤮": "[discomfort]", "🤧": "[discomfort]", "🥵": "[discomfort]",
35
+ "🥶": "[discomfort]", "🥴": "[discomfort]", "😵": "[discomfort]", "🤯": "[discomfort]",
36
+ "😕": "[confused]", "😟": "[confused]", "🙁": "[confused]", "☹": "[confused]",
37
+ "😮": "[surprise]", "😯": "[surprise]", "😲": "[surprise]", "😳": "[surprise]", "🥺": "[pleading]",
38
+ "😦": "[fear]", "😧": "[fear]", "😨": "[fear]", "😰": "[fear]", "😱": "[fear]",
39
+ "😖": "[confusion]", "😣": "[confusion]", "😞": "[confusion]",
40
+ "😤": "[anger]", "😡": "[anger]", "😠": "[anger]", "🤬": "[anger]", "😈": "[mischievous]", "👿": "[mischievous]"
41
+ }
42
+
43
+ ###############################################################################
44
+ # HÀM XỬ LÝ (COPY TỪ FILE TRAIN)
45
+ ###############################################################################
46
+ def replace_emojis(sentence, emoji_mapping):
47
+ processed_sentence = []
48
+ for char in sentence:
49
+ if char in emoji_mapping:
50
+ processed_sentence.append(emoji_mapping[char])
51
+ elif not emoji.is_emoji(char):
52
+ processed_sentence.append(char)
53
+ return ''.join(processed_sentence)
54
+
55
+ def remove_profanity(sentence):
56
+ profane_words = ["loz", "vloz", "vl", "dm", "đm", "clgt", "dmm", "cc", "vc", "đù mé", "vãi"]
57
+ words = sentence.split()
58
+ filtered = [w for w in words if w.lower() not in profane_words]
59
+ return ' '.join(filtered)
60
+
61
+ def remove_special_characters(sentence):
62
+ return re.sub(r"[\^\*@#&$%<>~{}|\\]", "", sentence)
63
+
64
+ def normalize_whitespace(sentence):
65
+ return ' '.join(sentence.split())
66
+
67
+ def remove_repeated_characters(sentence):
68
+ return re.sub(r"(.)\1{2,}", r"\1", sentence)
69
+
70
+ def replace_numbers(sentence):
71
+ return re.sub(r"\d+", "[number]", sentence)
72
+
73
+ def tokenize_underthesea(sentence):
74
+ tokens = word_tokenize(sentence)
75
+ return " ".join(tokens)
76
+
77
+ # Nếu có abbreviations.json, load nó. Nếu không thì để rỗng.
78
+ try:
79
+ with open("abbreviations.json", "r", encoding="utf-8") as f:
80
+ abbreviations = json.load(f)
81
+ except Exception as e:
82
+ abbreviations = {}
83
+
84
+ def preprocess_sentence(sentence):
85
+ sentence = sentence.lower()
86
+ sentence = replace_emojis(sentence, emoji_mapping)
87
+ sentence = remove_profanity(sentence)
88
+ sentence = remove_special_characters(sentence)
89
+ sentence = normalize_whitespace(sentence)
90
+ # Thay thế từ viết tắt nếu có trong abbreviations
91
+ words = sentence.split()
92
+ replaced = []
93
+ for w in words:
94
+ if w in abbreviations:
95
+ replaced.append(" ".join(abbreviations[w]))
96
+ else:
97
+ replaced.append(w)
98
+ sentence = " ".join(replaced)
99
+ sentence = remove_repeated_characters(sentence)
100
+ sentence = replace_numbers(sentence)
101
+ sentence = tokenize_underthesea(sentence)
102
+ return sentence
103
+
104
+ ###############################################################################
105
+ # LOAD CHECKPOINT
106
+ ###############################################################################
107
+ checkpoint_dir = "./checkpoint" # Đường dẫn đến folder checkpoint
108
+ device = "cuda" if torch.cuda.is_available() else "cpu"
109
+
110
+ print("Loading config...")
111
+ config = AutoConfig.from_pretrained(checkpoint_dir)
112
+
113
+ # Mapping id to label theo thứ tự bạn cung cấp
114
+ custom_id2label = {
115
+ 0: 'Anger',
116
+ 1: 'Disgust',
117
+ 2: 'Enjoyment',
118
+ 3: 'Fear',
119
+ 4: 'Other',
120
+ 5: 'Sadness',
121
+ 6: 'Surprise'
122
+ }
123
+
124
+ if hasattr(config, "id2label") and config.id2label:
125
+ if all(label.startswith("LABEL_") for label in config.id2label.values()):
126
+ id2label = custom_id2label
127
+ else:
128
+ id2label = {int(k): v for k, v in config.id2label.items()}
129
+ else:
130
+ id2label = custom_id2label
131
+
132
+ print("id2label loaded:", id2label)
133
+
134
+ print("Loading tokenizer...")
135
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint_dir)
136
+
137
+ print("Loading model...")
138
+ model = AutoModelForSequenceClassification.from_pretrained(checkpoint_dir, config=config)
139
+ model.to(device)
140
+ model.eval()
141
+
142
+ ###############################################################################
143
+ # HÀM PREDICT
144
+ ###############################################################################
145
+ label2message = {
146
+ 'Anger': 'Hãy bình tĩnh và giải quyết vấn đề một cách bình thản.',
147
+ 'Disgust': 'Hãy tránh xa những thứ khiến bạn không thích.',
148
+ 'Enjoyment': 'Chúc mừng bạn có một ngày tuyệt vời!',
149
+ 'Fear': 'Hãy đối mặt với nỗi sợ để vượt qua chúng.',
150
+ 'Other': 'Cảm xúc của bạn hiện tại không được phân loại rõ ràng.',
151
+ 'Sadness': 'Hãy tìm kiếm sự hỗ trợ khi cần thiết.',
152
+ 'Surprise': 'Thật bất ngờ! Hãy tận hưởng khoảnh khắc này.'
153
+ }
154
+
155
+ def predict_text(text: str) -> str:
156
+ text_proc = preprocess_sentence(text)
157
+ inputs = tokenizer(
158
+ [text_proc],
159
+ padding=True,
160
+ truncation=True,
161
+ max_length=256,
162
+ return_tensors="pt"
163
+ ).to(device)
164
+
165
+ with torch.no_grad():
166
+ outputs = model(**inputs)
167
+ pred_id = outputs.logits.argmax(dim=-1).item()
168
+
169
+ if pred_id in id2label:
170
+ label = id2label[pred_id]
171
+ message = label2message.get(label, "")
172
+ if message:
173
+ return f"Dự đoán cảm xúc: {label}. {message}"
174
+ else:
175
+ return f"Dự đoán cảm xúc: {label}."
176
+ else:
177
+ return f"Nhãn không xác định (id={pred_id})"
178
+
179
+ ###############################################################################
180
+ # ĐỊNH NGHĨA MODEL INPUT
181
+ ###############################################################################
182
+ class InputText(BaseModel):
183
+ text: str
184
+
185
+ ###############################################################################
186
+ # API ENDPOINT
187
+ ###############################################################################
188
+ @app.post("/predict")
189
+ def predict(input_text: InputText):
190
+ """
191
+ Nhận một câu tiếng Việt và trả về dự đoán cảm xúc.
192
+ """
193
+ result = predict_text(input_text.text)
194
+ return {"result": result}
195
+
196
+ ###############################################################################
197
+ # CHẠY API SERVER
198
+ ###############################################################################
199
+ if __name__ == "__main__":
200
+ import uvicorn
201
+ uvicorn.run(app, host="0.0.0.0", port=8000)
app.py ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # demo_phobert_gradio.py
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import gradio as gr
5
+ import torch
6
+ import re
7
+ import json
8
+ import emoji
9
+ import numpy as np
10
+ from underthesea import word_tokenize
11
+
12
+ from transformers import (
13
+ AutoConfig,
14
+ AutoTokenizer,
15
+ AutoModelForSequenceClassification
16
+ )
17
+
18
+ ###############################################################################
19
+ # TẢI MAPPING EMOJI - COPY Y NGUYÊN TỪ FILE TRAIN
20
+ ###############################################################################
21
+ emoji_mapping = {
22
+ "😀": "[joy]", "😃": "[joy]", "😄": "[joy]", "😁": "[joy]", "😆": "[joy]", "😅": "[joy]", "😂": "[joy]", "🤣": "[joy]",
23
+ "🙂": "[love]", "🙃": "[love]", "😉": "[love]", "😊": "[love]", "😇": "[love]", "🥰": "[love]", "😍": "[love]",
24
+ "🤩": "[love]", "😘": "[love]", "😗": "[love]", "☺": "[love]", "😚": "[love]", "😙": "[love]",
25
+ "😋": "[satisfaction]", "😛": "[satisfaction]", "😜": "[satisfaction]", "🤪": "[satisfaction]", "😝": "[satisfaction]",
26
+ "🤑": "[satisfaction]",
27
+ "🤐": "[neutral]", "🤨": "[neutral]", "😐": "[neutral]", "😑": "[neutral]", "😶": "[neutral]",
28
+ "😏": "[sarcasm]",
29
+ "😒": "[disappointment]", "🙄": "[disappointment]", "😬": "[disappointment]",
30
+ "😔": "[sadness]", "😪": "[sadness]", "😢": "[sadness]", "😭": "[sadness]", "😥": "[sadness]", "😓": "[sadness]",
31
+ "😩": "[tiredness]", "😫": "[tiredness]", "🥱": "[tiredness]",
32
+ "🤤": "[discomfort]", "🤢": "[discomfort]", "🤮": "[discomfort]", "🤧": "[discomfort]", "🥵": "[discomfort]",
33
+ "🥶": "[discomfort]", "🥴": "[discomfort]", "😵": "[discomfort]", "🤯": "[discomfort]",
34
+ "😕": "[confused]", "😟": "[confused]", "🙁": "[confused]", "☹": "[confused]",
35
+ "😮": "[surprise]", "😯": "[surprise]", "😲": "[surprise]", "😳": "[surprise]", "🥺": "[pleading]",
36
+ "😦": "[fear]", "😧": "[fear]", "😨": "[fear]", "😰": "[fear]", "😱": "[fear]",
37
+ "😖": "[confusion]", "😣": "[confusion]", "😞": "[confusion]",
38
+ "😤": "[anger]", "😡": "[anger]", "😠": "[anger]", "🤬": "[anger]", "😈": "[mischievous]", "👿": "[mischievous]"
39
+ }
40
+
41
+ ###############################################################################
42
+ # HÀM XỬ LÝ (COPY TỪ FILE TRAIN)
43
+ ###############################################################################
44
+ def replace_emojis(sentence, emoji_mapping):
45
+ processed_sentence = []
46
+ for char in sentence:
47
+ if char in emoji_mapping:
48
+ processed_sentence.append(emoji_mapping[char])
49
+ elif not emoji.is_emoji(char):
50
+ processed_sentence.append(char)
51
+ return ''.join(processed_sentence)
52
+
53
+ def remove_profanity(sentence):
54
+ profane_words = ["loz", "vloz", "vl", "dm", "đm", "clgt", "dmm", "cc", "vc", "đù mé", "vãi"]
55
+ words = sentence.split()
56
+ filtered = [w for w in words if w.lower() not in profane_words]
57
+ return ' '.join(filtered)
58
+
59
+ def remove_special_characters(sentence):
60
+ return re.sub(r"[\^\*@#&$%<>~{}|\\]", "", sentence)
61
+
62
+ def normalize_whitespace(sentence):
63
+ return ' '.join(sentence.split())
64
+
65
+ def remove_repeated_characters(sentence):
66
+ return re.sub(r"(.)\1{2,}", r"\1", sentence)
67
+
68
+ def replace_numbers(sentence):
69
+ return re.sub(r"\d+", "[number]", sentence)
70
+
71
+ def tokenize_underthesea(sentence):
72
+ tokens = word_tokenize(sentence)
73
+ return " ".join(tokens)
74
+
75
+ # Nếu có abbreviations.json, bạn load. Nếu không thì để rỗng.
76
+ try:
77
+ with open("abbreviations.json", "r", encoding="utf-8") as f:
78
+ abbreviations = json.load(f)
79
+ except:
80
+ abbreviations = {}
81
+
82
+ def preprocess_sentence(sentence):
83
+ # hạ thấp
84
+ sentence = sentence.lower()
85
+ # thay thế emoji
86
+ sentence = replace_emojis(sentence, emoji_mapping)
87
+ # loại bỏ từ nhạy cảm
88
+ sentence = remove_profanity(sentence)
89
+ # bỏ ký tự đặc biệt
90
+ sentence = remove_special_characters(sentence)
91
+ # chuẩn hoá khoảng trắng
92
+ sentence = normalize_whitespace(sentence)
93
+ # thay thế viết tắt
94
+ words = sentence.split()
95
+ replaced = []
96
+ for w in words:
97
+ if w in abbreviations:
98
+ replaced.append(" ".join(abbreviations[w]))
99
+ else:
100
+ replaced.append(w)
101
+ sentence = " ".join(replaced)
102
+ # bỏ bớt kí tự lặp
103
+ sentence = remove_repeated_characters(sentence)
104
+ # thay số thành [number]
105
+ sentence = replace_numbers(sentence)
106
+ # tokenize tiếng Việt
107
+ sentence = tokenize_underthesea(sentence)
108
+ return sentence
109
+
110
+ ###############################################################################
111
+ # LOAD CHECKPOINT
112
+ ###############################################################################
113
+ checkpoint_dir = "./checkpoint" # Folder checkpoint nằm trong cùng thư mục với file script
114
+ device = "cuda" if torch.cuda.is_available() else "cpu"
115
+
116
+ print("Loading config...")
117
+ config = AutoConfig.from_pretrained(checkpoint_dir)
118
+
119
+ # Mapping id to label theo thứ tự bạn cung cấp
120
+ custom_id2label = {
121
+ 0: 'Anger',
122
+ 1: 'Disgust',
123
+ 2: 'Enjoyment',
124
+ 3: 'Fear',
125
+ 4: 'Other',
126
+ 5: 'Sadness',
127
+ 6: 'Surprise'
128
+ }
129
+
130
+ # Kiểm tra và sử dụng custom_id2label nếu config.id2label không đúng
131
+ if hasattr(config, "id2label") and config.id2label:
132
+ # Nếu config.id2label chứa 'LABEL_x', sử dụng custom mapping
133
+ if all(label.startswith("LABEL_") for label in config.id2label.values()):
134
+ id2label = custom_id2label
135
+ else:
136
+ id2label = {int(k): v for k, v in config.id2label.items()}
137
+ else:
138
+ id2label = custom_id2label # Sử dụng mapping mặc định nếu config không có id2label
139
+
140
+ print("id2label loaded:", id2label)
141
+
142
+ print("Loading tokenizer...")
143
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint_dir)
144
+
145
+ print("Loading model...")
146
+ model = AutoModelForSequenceClassification.from_pretrained(checkpoint_dir, config=config)
147
+ model.to(device)
148
+ model.eval()
149
+
150
+ ###############################################################################
151
+ # HÀM PREDICT
152
+ ###############################################################################
153
+ # Mapping từ label đến thông điệp tương ứng
154
+ label2message = {
155
+ 'Anger': 'Hãy bình tĩnh và giải quyết vấn đề một cách bình thản.',
156
+ 'Disgust': 'Hãy tránh xa những thứ khiến bạn không thích.',
157
+ 'Enjoyment': 'Chúc mừng bạn có một ngày tuyệt vời!',
158
+ 'Fear': 'Hãy đối mặt với nỗi sợ để vượt qua chúng.',
159
+ 'Other': 'Cảm xúc của bạn hiện tại không được phân loại rõ ràng.',
160
+ 'Sadness': 'Hãy tìm kiếm sự hỗ trợ khi cần thiết.',
161
+ 'Surprise': 'Thật bất ngờ! Hãy tận hưởng khoảnh khắc này.'
162
+ }
163
+
164
+ def predict_text(text: str) -> str:
165
+ """Tiền xử lý, token hoá và chạy model => trả về label và thông điệp."""
166
+ text_proc = preprocess_sentence(text)
167
+ inputs = tokenizer(
168
+ [text_proc],
169
+ padding=True,
170
+ truncation=True,
171
+ max_length=256,
172
+ return_tensors="pt"
173
+ ).to(device)
174
+
175
+ with torch.no_grad():
176
+ outputs = model(**inputs)
177
+ pred_id = outputs.logits.argmax(dim=-1).item()
178
+
179
+ if pred_id in id2label:
180
+ label = id2label[pred_id]
181
+ message = label2message.get(label, "")
182
+ if message:
183
+ return f"Dự đoán cảm xúc: {label}. {message}"
184
+ else:
185
+ return f"Dự đoán cảm xúc: {label}."
186
+ else:
187
+ return f"Nhãn không xác định (id={pred_id})"
188
+
189
+ ###############################################################################
190
+ # GRADIO APP
191
+ ###############################################################################
192
+ def run_demo(input_text):
193
+ predicted_emotion = predict_text(input_text)
194
+ return predicted_emotion
195
+
196
+ demo = gr.Interface(
197
+ fn=run_demo,
198
+ inputs=gr.Textbox(lines=3, label="Nhập câu tiếng Việt"),
199
+ outputs=gr.Textbox(label="Kết quả"),
200
+ title="PhoBERT Emotion Classification",
201
+ description="Nhập vào 1 câu tiếng Việt để dự đoán cảm xúc."
202
+ )
203
+
204
+ if __name__ == "__main__":
205
+ demo.launch(share=True)
checkpoint/added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<mask>": 64000
3
+ }
checkpoint/bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint/config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "vinai/phobert-base",
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "LABEL_0",
16
+ "1": "LABEL_1",
17
+ "2": "LABEL_2",
18
+ "3": "LABEL_3",
19
+ "4": "LABEL_4",
20
+ "5": "LABEL_5",
21
+ "6": "LABEL_6"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "label2id": {
26
+ "LABEL_0": 0,
27
+ "LABEL_1": 1,
28
+ "LABEL_2": 2,
29
+ "LABEL_3": 3,
30
+ "LABEL_4": 4,
31
+ "LABEL_5": 5,
32
+ "LABEL_6": 6
33
+ },
34
+ "layer_norm_eps": 1e-05,
35
+ "max_position_embeddings": 258,
36
+ "model_type": "roberta",
37
+ "num_attention_heads": 12,
38
+ "num_hidden_layers": 12,
39
+ "pad_token_id": 1,
40
+ "position_embedding_type": "absolute",
41
+ "problem_type": "single_label_classification",
42
+ "tokenizer_class": "PhobertTokenizer",
43
+ "torch_dtype": "float32",
44
+ "transformers_version": "4.40.0",
45
+ "type_vocab_size": 1,
46
+ "use_cache": true,
47
+ "vocab_size": 64001
48
+ }
checkpoint/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86f3641eb1ff4401aa0e03d123ddb83fc09d65ce445c8fd3873d12a40d352572
3
+ size 540038764
checkpoint/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4776808b26a175a918f4eee95b5c1fe8f9e300980a0621451a3d287ebdb86fe5
3
+ size 14575
checkpoint/special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": "<mask>",
6
+ "pad_token": "<pad>",
7
+ "sep_token": "</s>",
8
+ "unk_token": "<unk>"
9
+ }
checkpoint/tokenizer_config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
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
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "64000": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 1000000000000000019884624838656,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "tokenizer_class": "PhobertTokenizer",
53
+ "unk_token": "<unk>"
54
+ }
checkpoint/trainer_state.json ADDED
@@ -0,0 +1,2540 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.943651823029255,
3
+ "best_model_checkpoint": "./phobert_results/checkpoint-12145",
4
+ "epoch": 10.0,
5
+ "eval_steps": 500,
6
+ "global_step": 17350,
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.02881844380403458,
13
+ "grad_norm": 4.970236301422119,
14
+ "learning_rate": 1.994236311239193e-05,
15
+ "loss": 1.9031,
16
+ "step": 50
17
+ },
18
+ {
19
+ "epoch": 0.05763688760806916,
20
+ "grad_norm": 9.052480697631836,
21
+ "learning_rate": 1.9884726224783863e-05,
22
+ "loss": 1.7452,
23
+ "step": 100
24
+ },
25
+ {
26
+ "epoch": 0.08645533141210375,
27
+ "grad_norm": 10.461433410644531,
28
+ "learning_rate": 1.9827089337175795e-05,
29
+ "loss": 1.6609,
30
+ "step": 150
31
+ },
32
+ {
33
+ "epoch": 0.11527377521613832,
34
+ "grad_norm": 9.097572326660156,
35
+ "learning_rate": 1.9769452449567724e-05,
36
+ "loss": 1.5037,
37
+ "step": 200
38
+ },
39
+ {
40
+ "epoch": 0.1440922190201729,
41
+ "grad_norm": 11.013162612915039,
42
+ "learning_rate": 1.9711815561959656e-05,
43
+ "loss": 1.4436,
44
+ "step": 250
45
+ },
46
+ {
47
+ "epoch": 0.1729106628242075,
48
+ "grad_norm": 10.979734420776367,
49
+ "learning_rate": 1.9654178674351588e-05,
50
+ "loss": 1.3187,
51
+ "step": 300
52
+ },
53
+ {
54
+ "epoch": 0.2017291066282421,
55
+ "grad_norm": 12.8245849609375,
56
+ "learning_rate": 1.9596541786743517e-05,
57
+ "loss": 1.2895,
58
+ "step": 350
59
+ },
60
+ {
61
+ "epoch": 0.23054755043227665,
62
+ "grad_norm": 13.686446189880371,
63
+ "learning_rate": 1.953890489913545e-05,
64
+ "loss": 1.2117,
65
+ "step": 400
66
+ },
67
+ {
68
+ "epoch": 0.25936599423631124,
69
+ "grad_norm": 11.00157356262207,
70
+ "learning_rate": 1.9481268011527378e-05,
71
+ "loss": 1.2032,
72
+ "step": 450
73
+ },
74
+ {
75
+ "epoch": 0.2881844380403458,
76
+ "grad_norm": 13.596818923950195,
77
+ "learning_rate": 1.942363112391931e-05,
78
+ "loss": 1.1336,
79
+ "step": 500
80
+ },
81
+ {
82
+ "epoch": 0.3170028818443804,
83
+ "grad_norm": 13.817182540893555,
84
+ "learning_rate": 1.936599423631124e-05,
85
+ "loss": 1.1091,
86
+ "step": 550
87
+ },
88
+ {
89
+ "epoch": 0.345821325648415,
90
+ "grad_norm": 6.913839817047119,
91
+ "learning_rate": 1.930835734870317e-05,
92
+ "loss": 1.0896,
93
+ "step": 600
94
+ },
95
+ {
96
+ "epoch": 0.3746397694524496,
97
+ "grad_norm": 11.378829002380371,
98
+ "learning_rate": 1.9250720461095104e-05,
99
+ "loss": 0.9832,
100
+ "step": 650
101
+ },
102
+ {
103
+ "epoch": 0.4034582132564842,
104
+ "grad_norm": 16.737525939941406,
105
+ "learning_rate": 1.9193083573487033e-05,
106
+ "loss": 0.978,
107
+ "step": 700
108
+ },
109
+ {
110
+ "epoch": 0.4322766570605187,
111
+ "grad_norm": 12.594534873962402,
112
+ "learning_rate": 1.9135446685878965e-05,
113
+ "loss": 0.9757,
114
+ "step": 750
115
+ },
116
+ {
117
+ "epoch": 0.4610951008645533,
118
+ "grad_norm": 11.076528549194336,
119
+ "learning_rate": 1.9077809798270894e-05,
120
+ "loss": 0.9533,
121
+ "step": 800
122
+ },
123
+ {
124
+ "epoch": 0.4899135446685879,
125
+ "grad_norm": 12.495336532592773,
126
+ "learning_rate": 1.9020172910662826e-05,
127
+ "loss": 0.9399,
128
+ "step": 850
129
+ },
130
+ {
131
+ "epoch": 0.5187319884726225,
132
+ "grad_norm": 10.985849380493164,
133
+ "learning_rate": 1.8962536023054755e-05,
134
+ "loss": 0.8982,
135
+ "step": 900
136
+ },
137
+ {
138
+ "epoch": 0.547550432276657,
139
+ "grad_norm": 13.00562572479248,
140
+ "learning_rate": 1.8904899135446687e-05,
141
+ "loss": 0.9525,
142
+ "step": 950
143
+ },
144
+ {
145
+ "epoch": 0.5763688760806917,
146
+ "grad_norm": 13.221843719482422,
147
+ "learning_rate": 1.884726224783862e-05,
148
+ "loss": 0.9063,
149
+ "step": 1000
150
+ },
151
+ {
152
+ "epoch": 0.6051873198847262,
153
+ "grad_norm": 15.107306480407715,
154
+ "learning_rate": 1.878962536023055e-05,
155
+ "loss": 0.8538,
156
+ "step": 1050
157
+ },
158
+ {
159
+ "epoch": 0.6340057636887608,
160
+ "grad_norm": 16.602313995361328,
161
+ "learning_rate": 1.873198847262248e-05,
162
+ "loss": 0.8626,
163
+ "step": 1100
164
+ },
165
+ {
166
+ "epoch": 0.6628242074927954,
167
+ "grad_norm": 13.856719017028809,
168
+ "learning_rate": 1.867435158501441e-05,
169
+ "loss": 0.8186,
170
+ "step": 1150
171
+ },
172
+ {
173
+ "epoch": 0.69164265129683,
174
+ "grad_norm": 15.631819725036621,
175
+ "learning_rate": 1.861671469740634e-05,
176
+ "loss": 0.8228,
177
+ "step": 1200
178
+ },
179
+ {
180
+ "epoch": 0.7204610951008645,
181
+ "grad_norm": 25.166427612304688,
182
+ "learning_rate": 1.855907780979827e-05,
183
+ "loss": 0.837,
184
+ "step": 1250
185
+ },
186
+ {
187
+ "epoch": 0.7492795389048992,
188
+ "grad_norm": 18.48745346069336,
189
+ "learning_rate": 1.8501440922190203e-05,
190
+ "loss": 0.7323,
191
+ "step": 1300
192
+ },
193
+ {
194
+ "epoch": 0.7780979827089337,
195
+ "grad_norm": 19.641643524169922,
196
+ "learning_rate": 1.8443804034582135e-05,
197
+ "loss": 0.8067,
198
+ "step": 1350
199
+ },
200
+ {
201
+ "epoch": 0.8069164265129684,
202
+ "grad_norm": 18.942670822143555,
203
+ "learning_rate": 1.8386167146974067e-05,
204
+ "loss": 0.8028,
205
+ "step": 1400
206
+ },
207
+ {
208
+ "epoch": 0.8357348703170029,
209
+ "grad_norm": 17.313879013061523,
210
+ "learning_rate": 1.8328530259365996e-05,
211
+ "loss": 0.7598,
212
+ "step": 1450
213
+ },
214
+ {
215
+ "epoch": 0.8645533141210374,
216
+ "grad_norm": 10.607074737548828,
217
+ "learning_rate": 1.8270893371757928e-05,
218
+ "loss": 0.8624,
219
+ "step": 1500
220
+ },
221
+ {
222
+ "epoch": 0.8933717579250721,
223
+ "grad_norm": 12.565463066101074,
224
+ "learning_rate": 1.8213256484149857e-05,
225
+ "loss": 0.7614,
226
+ "step": 1550
227
+ },
228
+ {
229
+ "epoch": 0.9221902017291066,
230
+ "grad_norm": 21.289403915405273,
231
+ "learning_rate": 1.815561959654179e-05,
232
+ "loss": 0.7644,
233
+ "step": 1600
234
+ },
235
+ {
236
+ "epoch": 0.9510086455331412,
237
+ "grad_norm": 17.60152816772461,
238
+ "learning_rate": 1.8097982708933718e-05,
239
+ "loss": 0.7546,
240
+ "step": 1650
241
+ },
242
+ {
243
+ "epoch": 0.9798270893371758,
244
+ "grad_norm": 17.39754867553711,
245
+ "learning_rate": 1.804034582132565e-05,
246
+ "loss": 0.7933,
247
+ "step": 1700
248
+ },
249
+ {
250
+ "epoch": 1.0,
251
+ "eval_accuracy": 0.7976653696498055,
252
+ "eval_loss": 0.6221615076065063,
253
+ "eval_runtime": 37.0936,
254
+ "eval_samples_per_second": 187.067,
255
+ "eval_steps_per_second": 11.7,
256
+ "step": 1735
257
+ },
258
+ {
259
+ "epoch": 1.0086455331412103,
260
+ "grad_norm": 18.93373680114746,
261
+ "learning_rate": 1.7982708933717582e-05,
262
+ "loss": 0.7119,
263
+ "step": 1750
264
+ },
265
+ {
266
+ "epoch": 1.037463976945245,
267
+ "grad_norm": 15.846963882446289,
268
+ "learning_rate": 1.792507204610951e-05,
269
+ "loss": 0.5235,
270
+ "step": 1800
271
+ },
272
+ {
273
+ "epoch": 1.0662824207492796,
274
+ "grad_norm": 9.528020858764648,
275
+ "learning_rate": 1.7867435158501444e-05,
276
+ "loss": 0.5441,
277
+ "step": 1850
278
+ },
279
+ {
280
+ "epoch": 1.0951008645533142,
281
+ "grad_norm": 22.303991317749023,
282
+ "learning_rate": 1.7809798270893372e-05,
283
+ "loss": 0.5471,
284
+ "step": 1900
285
+ },
286
+ {
287
+ "epoch": 1.1239193083573487,
288
+ "grad_norm": 13.73653507232666,
289
+ "learning_rate": 1.7752161383285305e-05,
290
+ "loss": 0.5555,
291
+ "step": 1950
292
+ },
293
+ {
294
+ "epoch": 1.1527377521613833,
295
+ "grad_norm": 16.266706466674805,
296
+ "learning_rate": 1.7694524495677234e-05,
297
+ "loss": 0.6031,
298
+ "step": 2000
299
+ },
300
+ {
301
+ "epoch": 1.181556195965418,
302
+ "grad_norm": 12.598456382751465,
303
+ "learning_rate": 1.7636887608069166e-05,
304
+ "loss": 0.5668,
305
+ "step": 2050
306
+ },
307
+ {
308
+ "epoch": 1.2103746397694524,
309
+ "grad_norm": 14.683968544006348,
310
+ "learning_rate": 1.7579250720461095e-05,
311
+ "loss": 0.5748,
312
+ "step": 2100
313
+ },
314
+ {
315
+ "epoch": 1.239193083573487,
316
+ "grad_norm": 15.514312744140625,
317
+ "learning_rate": 1.7521613832853027e-05,
318
+ "loss": 0.5473,
319
+ "step": 2150
320
+ },
321
+ {
322
+ "epoch": 1.2680115273775217,
323
+ "grad_norm": 12.627583503723145,
324
+ "learning_rate": 1.746397694524496e-05,
325
+ "loss": 0.4907,
326
+ "step": 2200
327
+ },
328
+ {
329
+ "epoch": 1.2968299711815563,
330
+ "grad_norm": 9.212458610534668,
331
+ "learning_rate": 1.7406340057636888e-05,
332
+ "loss": 0.5064,
333
+ "step": 2250
334
+ },
335
+ {
336
+ "epoch": 1.3256484149855907,
337
+ "grad_norm": 9.678365707397461,
338
+ "learning_rate": 1.734870317002882e-05,
339
+ "loss": 0.5415,
340
+ "step": 2300
341
+ },
342
+ {
343
+ "epoch": 1.3544668587896254,
344
+ "grad_norm": 26.177536010742188,
345
+ "learning_rate": 1.729106628242075e-05,
346
+ "loss": 0.4821,
347
+ "step": 2350
348
+ },
349
+ {
350
+ "epoch": 1.38328530259366,
351
+ "grad_norm": 11.909614562988281,
352
+ "learning_rate": 1.723342939481268e-05,
353
+ "loss": 0.4962,
354
+ "step": 2400
355
+ },
356
+ {
357
+ "epoch": 1.4121037463976944,
358
+ "grad_norm": 16.271272659301758,
359
+ "learning_rate": 1.717579250720461e-05,
360
+ "loss": 0.5287,
361
+ "step": 2450
362
+ },
363
+ {
364
+ "epoch": 1.440922190201729,
365
+ "grad_norm": 25.189302444458008,
366
+ "learning_rate": 1.7118155619596542e-05,
367
+ "loss": 0.5096,
368
+ "step": 2500
369
+ },
370
+ {
371
+ "epoch": 1.4697406340057637,
372
+ "grad_norm": 23.7978515625,
373
+ "learning_rate": 1.7060518731988475e-05,
374
+ "loss": 0.4859,
375
+ "step": 2550
376
+ },
377
+ {
378
+ "epoch": 1.4985590778097984,
379
+ "grad_norm": 6.646437168121338,
380
+ "learning_rate": 1.7002881844380407e-05,
381
+ "loss": 0.4467,
382
+ "step": 2600
383
+ },
384
+ {
385
+ "epoch": 1.527377521613833,
386
+ "grad_norm": 18.11911964416504,
387
+ "learning_rate": 1.6945244956772336e-05,
388
+ "loss": 0.4939,
389
+ "step": 2650
390
+ },
391
+ {
392
+ "epoch": 1.5561959654178674,
393
+ "grad_norm": 17.764862060546875,
394
+ "learning_rate": 1.6887608069164268e-05,
395
+ "loss": 0.4876,
396
+ "step": 2700
397
+ },
398
+ {
399
+ "epoch": 1.585014409221902,
400
+ "grad_norm": 16.96575927734375,
401
+ "learning_rate": 1.6829971181556197e-05,
402
+ "loss": 0.4426,
403
+ "step": 2750
404
+ },
405
+ {
406
+ "epoch": 1.6138328530259365,
407
+ "grad_norm": 20.623233795166016,
408
+ "learning_rate": 1.6772334293948126e-05,
409
+ "loss": 0.5638,
410
+ "step": 2800
411
+ },
412
+ {
413
+ "epoch": 1.6426512968299711,
414
+ "grad_norm": 16.03717041015625,
415
+ "learning_rate": 1.6714697406340058e-05,
416
+ "loss": 0.4558,
417
+ "step": 2850
418
+ },
419
+ {
420
+ "epoch": 1.6714697406340058,
421
+ "grad_norm": 27.027576446533203,
422
+ "learning_rate": 1.665706051873199e-05,
423
+ "loss": 0.4227,
424
+ "step": 2900
425
+ },
426
+ {
427
+ "epoch": 1.7002881844380404,
428
+ "grad_norm": 16.704652786254883,
429
+ "learning_rate": 1.6599423631123922e-05,
430
+ "loss": 0.4521,
431
+ "step": 2950
432
+ },
433
+ {
434
+ "epoch": 1.729106628242075,
435
+ "grad_norm": 19.68289566040039,
436
+ "learning_rate": 1.654178674351585e-05,
437
+ "loss": 0.4419,
438
+ "step": 3000
439
+ },
440
+ {
441
+ "epoch": 1.7579250720461095,
442
+ "grad_norm": 13.75253677368164,
443
+ "learning_rate": 1.6484149855907783e-05,
444
+ "loss": 0.4428,
445
+ "step": 3050
446
+ },
447
+ {
448
+ "epoch": 1.7867435158501441,
449
+ "grad_norm": 44.23019790649414,
450
+ "learning_rate": 1.6426512968299712e-05,
451
+ "loss": 0.4416,
452
+ "step": 3100
453
+ },
454
+ {
455
+ "epoch": 1.8155619596541785,
456
+ "grad_norm": 14.690359115600586,
457
+ "learning_rate": 1.6368876080691644e-05,
458
+ "loss": 0.3885,
459
+ "step": 3150
460
+ },
461
+ {
462
+ "epoch": 1.8443804034582132,
463
+ "grad_norm": 12.004839897155762,
464
+ "learning_rate": 1.6311239193083573e-05,
465
+ "loss": 0.3744,
466
+ "step": 3200
467
+ },
468
+ {
469
+ "epoch": 1.8731988472622478,
470
+ "grad_norm": 10.716139793395996,
471
+ "learning_rate": 1.6253602305475506e-05,
472
+ "loss": 0.398,
473
+ "step": 3250
474
+ },
475
+ {
476
+ "epoch": 1.9020172910662825,
477
+ "grad_norm": 17.37589454650879,
478
+ "learning_rate": 1.6195965417867438e-05,
479
+ "loss": 0.4649,
480
+ "step": 3300
481
+ },
482
+ {
483
+ "epoch": 1.9308357348703171,
484
+ "grad_norm": 13.404267311096191,
485
+ "learning_rate": 1.613832853025937e-05,
486
+ "loss": 0.3985,
487
+ "step": 3350
488
+ },
489
+ {
490
+ "epoch": 1.9596541786743515,
491
+ "grad_norm": 14.350135803222656,
492
+ "learning_rate": 1.60806916426513e-05,
493
+ "loss": 0.4282,
494
+ "step": 3400
495
+ },
496
+ {
497
+ "epoch": 1.9884726224783862,
498
+ "grad_norm": 20.828453063964844,
499
+ "learning_rate": 1.6023054755043228e-05,
500
+ "loss": 0.3764,
501
+ "step": 3450
502
+ },
503
+ {
504
+ "epoch": 2.0,
505
+ "eval_accuracy": 0.8651102464332037,
506
+ "eval_loss": 0.4364924728870392,
507
+ "eval_runtime": 37.9177,
508
+ "eval_samples_per_second": 183.002,
509
+ "eval_steps_per_second": 11.446,
510
+ "step": 3470
511
+ },
512
+ {
513
+ "epoch": 2.0172910662824206,
514
+ "grad_norm": 10.62299633026123,
515
+ "learning_rate": 1.596541786743516e-05,
516
+ "loss": 0.3511,
517
+ "step": 3500
518
+ },
519
+ {
520
+ "epoch": 2.0461095100864553,
521
+ "grad_norm": 21.19414710998535,
522
+ "learning_rate": 1.590778097982709e-05,
523
+ "loss": 0.3166,
524
+ "step": 3550
525
+ },
526
+ {
527
+ "epoch": 2.07492795389049,
528
+ "grad_norm": 9.603983879089355,
529
+ "learning_rate": 1.585014409221902e-05,
530
+ "loss": 0.257,
531
+ "step": 3600
532
+ },
533
+ {
534
+ "epoch": 2.1037463976945245,
535
+ "grad_norm": 14.70697021484375,
536
+ "learning_rate": 1.5792507204610953e-05,
537
+ "loss": 0.2606,
538
+ "step": 3650
539
+ },
540
+ {
541
+ "epoch": 2.132564841498559,
542
+ "grad_norm": 25.806259155273438,
543
+ "learning_rate": 1.5734870317002882e-05,
544
+ "loss": 0.2505,
545
+ "step": 3700
546
+ },
547
+ {
548
+ "epoch": 2.161383285302594,
549
+ "grad_norm": 20.40934181213379,
550
+ "learning_rate": 1.5677233429394814e-05,
551
+ "loss": 0.3198,
552
+ "step": 3750
553
+ },
554
+ {
555
+ "epoch": 2.1902017291066285,
556
+ "grad_norm": 34.36139678955078,
557
+ "learning_rate": 1.5619596541786747e-05,
558
+ "loss": 0.2689,
559
+ "step": 3800
560
+ },
561
+ {
562
+ "epoch": 2.2190201729106627,
563
+ "grad_norm": 23.640975952148438,
564
+ "learning_rate": 1.5561959654178675e-05,
565
+ "loss": 0.2744,
566
+ "step": 3850
567
+ },
568
+ {
569
+ "epoch": 2.2478386167146973,
570
+ "grad_norm": 15.340378761291504,
571
+ "learning_rate": 1.5504322766570608e-05,
572
+ "loss": 0.332,
573
+ "step": 3900
574
+ },
575
+ {
576
+ "epoch": 2.276657060518732,
577
+ "grad_norm": 29.153423309326172,
578
+ "learning_rate": 1.5446685878962537e-05,
579
+ "loss": 0.2945,
580
+ "step": 3950
581
+ },
582
+ {
583
+ "epoch": 2.3054755043227666,
584
+ "grad_norm": 9.021677017211914,
585
+ "learning_rate": 1.538904899135447e-05,
586
+ "loss": 0.284,
587
+ "step": 4000
588
+ },
589
+ {
590
+ "epoch": 2.3342939481268012,
591
+ "grad_norm": 32.12895584106445,
592
+ "learning_rate": 1.5331412103746398e-05,
593
+ "loss": 0.2429,
594
+ "step": 4050
595
+ },
596
+ {
597
+ "epoch": 2.363112391930836,
598
+ "grad_norm": 36.411773681640625,
599
+ "learning_rate": 1.527377521613833e-05,
600
+ "loss": 0.2723,
601
+ "step": 4100
602
+ },
603
+ {
604
+ "epoch": 2.39193083573487,
605
+ "grad_norm": 18.912567138671875,
606
+ "learning_rate": 1.521613832853026e-05,
607
+ "loss": 0.2702,
608
+ "step": 4150
609
+ },
610
+ {
611
+ "epoch": 2.4207492795389047,
612
+ "grad_norm": 17.08293342590332,
613
+ "learning_rate": 1.5158501440922191e-05,
614
+ "loss": 0.3458,
615
+ "step": 4200
616
+ },
617
+ {
618
+ "epoch": 2.4495677233429394,
619
+ "grad_norm": 24.516544342041016,
620
+ "learning_rate": 1.5100864553314123e-05,
621
+ "loss": 0.2542,
622
+ "step": 4250
623
+ },
624
+ {
625
+ "epoch": 2.478386167146974,
626
+ "grad_norm": 3.7018916606903076,
627
+ "learning_rate": 1.5043227665706052e-05,
628
+ "loss": 0.2958,
629
+ "step": 4300
630
+ },
631
+ {
632
+ "epoch": 2.5072046109510087,
633
+ "grad_norm": 24.21662712097168,
634
+ "learning_rate": 1.4985590778097984e-05,
635
+ "loss": 0.2693,
636
+ "step": 4350
637
+ },
638
+ {
639
+ "epoch": 2.5360230547550433,
640
+ "grad_norm": 36.85274124145508,
641
+ "learning_rate": 1.4927953890489915e-05,
642
+ "loss": 0.2769,
643
+ "step": 4400
644
+ },
645
+ {
646
+ "epoch": 2.564841498559078,
647
+ "grad_norm": 26.23798179626465,
648
+ "learning_rate": 1.4870317002881847e-05,
649
+ "loss": 0.2443,
650
+ "step": 4450
651
+ },
652
+ {
653
+ "epoch": 2.5936599423631126,
654
+ "grad_norm": 40.98781204223633,
655
+ "learning_rate": 1.4812680115273776e-05,
656
+ "loss": 0.2789,
657
+ "step": 4500
658
+ },
659
+ {
660
+ "epoch": 2.6224783861671472,
661
+ "grad_norm": 33.100223541259766,
662
+ "learning_rate": 1.4755043227665706e-05,
663
+ "loss": 0.2776,
664
+ "step": 4550
665
+ },
666
+ {
667
+ "epoch": 2.6512968299711814,
668
+ "grad_norm": 158.5146942138672,
669
+ "learning_rate": 1.4697406340057639e-05,
670
+ "loss": 0.2852,
671
+ "step": 4600
672
+ },
673
+ {
674
+ "epoch": 2.680115273775216,
675
+ "grad_norm": 19.569507598876953,
676
+ "learning_rate": 1.4639769452449568e-05,
677
+ "loss": 0.2743,
678
+ "step": 4650
679
+ },
680
+ {
681
+ "epoch": 2.7089337175792507,
682
+ "grad_norm": 15.44676685333252,
683
+ "learning_rate": 1.45821325648415e-05,
684
+ "loss": 0.2746,
685
+ "step": 4700
686
+ },
687
+ {
688
+ "epoch": 2.7377521613832854,
689
+ "grad_norm": 11.913484573364258,
690
+ "learning_rate": 1.452449567723343e-05,
691
+ "loss": 0.2309,
692
+ "step": 4750
693
+ },
694
+ {
695
+ "epoch": 2.76657060518732,
696
+ "grad_norm": 17.194211959838867,
697
+ "learning_rate": 1.4466858789625363e-05,
698
+ "loss": 0.2497,
699
+ "step": 4800
700
+ },
701
+ {
702
+ "epoch": 2.795389048991354,
703
+ "grad_norm": 1.0725657939910889,
704
+ "learning_rate": 1.4409221902017291e-05,
705
+ "loss": 0.2903,
706
+ "step": 4850
707
+ },
708
+ {
709
+ "epoch": 2.824207492795389,
710
+ "grad_norm": 10.74899959564209,
711
+ "learning_rate": 1.4351585014409224e-05,
712
+ "loss": 0.2968,
713
+ "step": 4900
714
+ },
715
+ {
716
+ "epoch": 2.8530259365994235,
717
+ "grad_norm": 29.902647018432617,
718
+ "learning_rate": 1.4293948126801154e-05,
719
+ "loss": 0.2935,
720
+ "step": 4950
721
+ },
722
+ {
723
+ "epoch": 2.881844380403458,
724
+ "grad_norm": 11.288642883300781,
725
+ "learning_rate": 1.4236311239193086e-05,
726
+ "loss": 0.2928,
727
+ "step": 5000
728
+ },
729
+ {
730
+ "epoch": 2.910662824207493,
731
+ "grad_norm": 14.153397560119629,
732
+ "learning_rate": 1.4178674351585015e-05,
733
+ "loss": 0.1799,
734
+ "step": 5050
735
+ },
736
+ {
737
+ "epoch": 2.9394812680115274,
738
+ "grad_norm": 15.782369613647461,
739
+ "learning_rate": 1.4121037463976946e-05,
740
+ "loss": 0.2154,
741
+ "step": 5100
742
+ },
743
+ {
744
+ "epoch": 2.968299711815562,
745
+ "grad_norm": 3.8253252506256104,
746
+ "learning_rate": 1.4063400576368878e-05,
747
+ "loss": 0.2628,
748
+ "step": 5150
749
+ },
750
+ {
751
+ "epoch": 2.9971181556195967,
752
+ "grad_norm": 6.50337553024292,
753
+ "learning_rate": 1.4005763688760807e-05,
754
+ "loss": 0.2194,
755
+ "step": 5200
756
+ },
757
+ {
758
+ "epoch": 3.0,
759
+ "eval_accuracy": 0.9028678483931403,
760
+ "eval_loss": 0.3793924152851105,
761
+ "eval_runtime": 36.9217,
762
+ "eval_samples_per_second": 187.938,
763
+ "eval_steps_per_second": 11.755,
764
+ "step": 5205
765
+ },
766
+ {
767
+ "epoch": 3.025936599423631,
768
+ "grad_norm": 37.30765914916992,
769
+ "learning_rate": 1.3948126801152739e-05,
770
+ "loss": 0.1946,
771
+ "step": 5250
772
+ },
773
+ {
774
+ "epoch": 3.0547550432276656,
775
+ "grad_norm": 38.157142639160156,
776
+ "learning_rate": 1.389048991354467e-05,
777
+ "loss": 0.1694,
778
+ "step": 5300
779
+ },
780
+ {
781
+ "epoch": 3.0835734870317,
782
+ "grad_norm": 22.551681518554688,
783
+ "learning_rate": 1.3832853025936602e-05,
784
+ "loss": 0.2151,
785
+ "step": 5350
786
+ },
787
+ {
788
+ "epoch": 3.112391930835735,
789
+ "grad_norm": 3.1120803356170654,
790
+ "learning_rate": 1.377521613832853e-05,
791
+ "loss": 0.1945,
792
+ "step": 5400
793
+ },
794
+ {
795
+ "epoch": 3.1412103746397695,
796
+ "grad_norm": 24.61436653137207,
797
+ "learning_rate": 1.3717579250720463e-05,
798
+ "loss": 0.13,
799
+ "step": 5450
800
+ },
801
+ {
802
+ "epoch": 3.170028818443804,
803
+ "grad_norm": 15.621273040771484,
804
+ "learning_rate": 1.3659942363112394e-05,
805
+ "loss": 0.1603,
806
+ "step": 5500
807
+ },
808
+ {
809
+ "epoch": 3.1988472622478388,
810
+ "grad_norm": 10.645062446594238,
811
+ "learning_rate": 1.3602305475504324e-05,
812
+ "loss": 0.1814,
813
+ "step": 5550
814
+ },
815
+ {
816
+ "epoch": 3.227665706051873,
817
+ "grad_norm": 37.47835159301758,
818
+ "learning_rate": 1.3544668587896255e-05,
819
+ "loss": 0.1527,
820
+ "step": 5600
821
+ },
822
+ {
823
+ "epoch": 3.2564841498559076,
824
+ "grad_norm": 0.6854817271232605,
825
+ "learning_rate": 1.3487031700288185e-05,
826
+ "loss": 0.209,
827
+ "step": 5650
828
+ },
829
+ {
830
+ "epoch": 3.2853025936599423,
831
+ "grad_norm": 1.353789210319519,
832
+ "learning_rate": 1.3429394812680117e-05,
833
+ "loss": 0.1542,
834
+ "step": 5700
835
+ },
836
+ {
837
+ "epoch": 3.314121037463977,
838
+ "grad_norm": 9.835870742797852,
839
+ "learning_rate": 1.3371757925072046e-05,
840
+ "loss": 0.2365,
841
+ "step": 5750
842
+ },
843
+ {
844
+ "epoch": 3.3429394812680115,
845
+ "grad_norm": 13.969425201416016,
846
+ "learning_rate": 1.3314121037463979e-05,
847
+ "loss": 0.1715,
848
+ "step": 5800
849
+ },
850
+ {
851
+ "epoch": 3.371757925072046,
852
+ "grad_norm": 21.74212074279785,
853
+ "learning_rate": 1.3256484149855909e-05,
854
+ "loss": 0.1726,
855
+ "step": 5850
856
+ },
857
+ {
858
+ "epoch": 3.400576368876081,
859
+ "grad_norm": 6.624606609344482,
860
+ "learning_rate": 1.319884726224784e-05,
861
+ "loss": 0.1997,
862
+ "step": 5900
863
+ },
864
+ {
865
+ "epoch": 3.4293948126801155,
866
+ "grad_norm": 24.518829345703125,
867
+ "learning_rate": 1.314121037463977e-05,
868
+ "loss": 0.1027,
869
+ "step": 5950
870
+ },
871
+ {
872
+ "epoch": 3.4582132564841497,
873
+ "grad_norm": 1.1079559326171875,
874
+ "learning_rate": 1.3083573487031702e-05,
875
+ "loss": 0.1708,
876
+ "step": 6000
877
+ },
878
+ {
879
+ "epoch": 3.4870317002881843,
880
+ "grad_norm": 89.6827163696289,
881
+ "learning_rate": 1.3025936599423631e-05,
882
+ "loss": 0.2025,
883
+ "step": 6050
884
+ },
885
+ {
886
+ "epoch": 3.515850144092219,
887
+ "grad_norm": 3.5336265563964844,
888
+ "learning_rate": 1.2968299711815563e-05,
889
+ "loss": 0.188,
890
+ "step": 6100
891
+ },
892
+ {
893
+ "epoch": 3.5446685878962536,
894
+ "grad_norm": 3.5633816719055176,
895
+ "learning_rate": 1.2910662824207494e-05,
896
+ "loss": 0.1638,
897
+ "step": 6150
898
+ },
899
+ {
900
+ "epoch": 3.5734870317002883,
901
+ "grad_norm": 1.318528175354004,
902
+ "learning_rate": 1.2853025936599423e-05,
903
+ "loss": 0.142,
904
+ "step": 6200
905
+ },
906
+ {
907
+ "epoch": 3.602305475504323,
908
+ "grad_norm": 18.405723571777344,
909
+ "learning_rate": 1.2795389048991355e-05,
910
+ "loss": 0.1707,
911
+ "step": 6250
912
+ },
913
+ {
914
+ "epoch": 3.631123919308357,
915
+ "grad_norm": 2.065215587615967,
916
+ "learning_rate": 1.2737752161383286e-05,
917
+ "loss": 0.1858,
918
+ "step": 6300
919
+ },
920
+ {
921
+ "epoch": 3.6599423631123917,
922
+ "grad_norm": 1.1660606861114502,
923
+ "learning_rate": 1.2680115273775218e-05,
924
+ "loss": 0.1406,
925
+ "step": 6350
926
+ },
927
+ {
928
+ "epoch": 3.6887608069164264,
929
+ "grad_norm": 0.28399357199668884,
930
+ "learning_rate": 1.2622478386167147e-05,
931
+ "loss": 0.1398,
932
+ "step": 6400
933
+ },
934
+ {
935
+ "epoch": 3.717579250720461,
936
+ "grad_norm": 9.657651901245117,
937
+ "learning_rate": 1.2564841498559079e-05,
938
+ "loss": 0.1322,
939
+ "step": 6450
940
+ },
941
+ {
942
+ "epoch": 3.7463976945244957,
943
+ "grad_norm": 42.729248046875,
944
+ "learning_rate": 1.250720461095101e-05,
945
+ "loss": 0.2353,
946
+ "step": 6500
947
+ },
948
+ {
949
+ "epoch": 3.7752161383285303,
950
+ "grad_norm": 1.589701771736145,
951
+ "learning_rate": 1.2449567723342942e-05,
952
+ "loss": 0.2107,
953
+ "step": 6550
954
+ },
955
+ {
956
+ "epoch": 3.804034582132565,
957
+ "grad_norm": 9.485612869262695,
958
+ "learning_rate": 1.239193083573487e-05,
959
+ "loss": 0.2303,
960
+ "step": 6600
961
+ },
962
+ {
963
+ "epoch": 3.8328530259365996,
964
+ "grad_norm": 15.697033882141113,
965
+ "learning_rate": 1.2334293948126803e-05,
966
+ "loss": 0.1243,
967
+ "step": 6650
968
+ },
969
+ {
970
+ "epoch": 3.8616714697406342,
971
+ "grad_norm": 13.186999320983887,
972
+ "learning_rate": 1.2276657060518733e-05,
973
+ "loss": 0.1802,
974
+ "step": 6700
975
+ },
976
+ {
977
+ "epoch": 3.8904899135446684,
978
+ "grad_norm": 0.07961810380220413,
979
+ "learning_rate": 1.2219020172910662e-05,
980
+ "loss": 0.1776,
981
+ "step": 6750
982
+ },
983
+ {
984
+ "epoch": 3.919308357348703,
985
+ "grad_norm": 19.50320053100586,
986
+ "learning_rate": 1.2161383285302594e-05,
987
+ "loss": 0.1825,
988
+ "step": 6800
989
+ },
990
+ {
991
+ "epoch": 3.9481268011527377,
992
+ "grad_norm": 0.9466652870178223,
993
+ "learning_rate": 1.2103746397694525e-05,
994
+ "loss": 0.247,
995
+ "step": 6850
996
+ },
997
+ {
998
+ "epoch": 3.9769452449567724,
999
+ "grad_norm": 0.9334861636161804,
1000
+ "learning_rate": 1.2046109510086457e-05,
1001
+ "loss": 0.1826,
1002
+ "step": 6900
1003
+ },
1004
+ {
1005
+ "epoch": 4.0,
1006
+ "eval_accuracy": 0.9244847960801268,
1007
+ "eval_loss": 0.34017300605773926,
1008
+ "eval_runtime": 37.1217,
1009
+ "eval_samples_per_second": 186.926,
1010
+ "eval_steps_per_second": 11.691,
1011
+ "step": 6940
1012
+ },
1013
+ {
1014
+ "epoch": 4.005763688760807,
1015
+ "grad_norm": 38.7332763671875,
1016
+ "learning_rate": 1.1988472622478386e-05,
1017
+ "loss": 0.1516,
1018
+ "step": 6950
1019
+ },
1020
+ {
1021
+ "epoch": 4.034582132564841,
1022
+ "grad_norm": 1.7459765672683716,
1023
+ "learning_rate": 1.1930835734870318e-05,
1024
+ "loss": 0.1305,
1025
+ "step": 7000
1026
+ },
1027
+ {
1028
+ "epoch": 4.063400576368876,
1029
+ "grad_norm": 1.0959562063217163,
1030
+ "learning_rate": 1.1873198847262249e-05,
1031
+ "loss": 0.1054,
1032
+ "step": 7050
1033
+ },
1034
+ {
1035
+ "epoch": 4.0922190201729105,
1036
+ "grad_norm": 26.440959930419922,
1037
+ "learning_rate": 1.1815561959654181e-05,
1038
+ "loss": 0.1426,
1039
+ "step": 7100
1040
+ },
1041
+ {
1042
+ "epoch": 4.121037463976945,
1043
+ "grad_norm": 0.2572319805622101,
1044
+ "learning_rate": 1.175792507204611e-05,
1045
+ "loss": 0.0893,
1046
+ "step": 7150
1047
+ },
1048
+ {
1049
+ "epoch": 4.14985590778098,
1050
+ "grad_norm": 2.3376266956329346,
1051
+ "learning_rate": 1.1700288184438042e-05,
1052
+ "loss": 0.1211,
1053
+ "step": 7200
1054
+ },
1055
+ {
1056
+ "epoch": 4.178674351585014,
1057
+ "grad_norm": 27.235889434814453,
1058
+ "learning_rate": 1.1642651296829973e-05,
1059
+ "loss": 0.1125,
1060
+ "step": 7250
1061
+ },
1062
+ {
1063
+ "epoch": 4.207492795389049,
1064
+ "grad_norm": 0.729739785194397,
1065
+ "learning_rate": 1.1585014409221902e-05,
1066
+ "loss": 0.1263,
1067
+ "step": 7300
1068
+ },
1069
+ {
1070
+ "epoch": 4.236311239193084,
1071
+ "grad_norm": 95.56041717529297,
1072
+ "learning_rate": 1.1527377521613834e-05,
1073
+ "loss": 0.1196,
1074
+ "step": 7350
1075
+ },
1076
+ {
1077
+ "epoch": 4.265129682997118,
1078
+ "grad_norm": 0.6992059350013733,
1079
+ "learning_rate": 1.1469740634005764e-05,
1080
+ "loss": 0.1289,
1081
+ "step": 7400
1082
+ },
1083
+ {
1084
+ "epoch": 4.293948126801153,
1085
+ "grad_norm": 5.825665473937988,
1086
+ "learning_rate": 1.1412103746397697e-05,
1087
+ "loss": 0.0838,
1088
+ "step": 7450
1089
+ },
1090
+ {
1091
+ "epoch": 4.322766570605188,
1092
+ "grad_norm": 12.848553657531738,
1093
+ "learning_rate": 1.1354466858789625e-05,
1094
+ "loss": 0.109,
1095
+ "step": 7500
1096
+ },
1097
+ {
1098
+ "epoch": 4.351585014409222,
1099
+ "grad_norm": 0.7549734711647034,
1100
+ "learning_rate": 1.1296829971181558e-05,
1101
+ "loss": 0.1136,
1102
+ "step": 7550
1103
+ },
1104
+ {
1105
+ "epoch": 4.380403458213257,
1106
+ "grad_norm": 11.627622604370117,
1107
+ "learning_rate": 1.1239193083573488e-05,
1108
+ "loss": 0.1387,
1109
+ "step": 7600
1110
+ },
1111
+ {
1112
+ "epoch": 4.409221902017291,
1113
+ "grad_norm": 2.81147837638855,
1114
+ "learning_rate": 1.1181556195965419e-05,
1115
+ "loss": 0.0966,
1116
+ "step": 7650
1117
+ },
1118
+ {
1119
+ "epoch": 4.438040345821325,
1120
+ "grad_norm": 68.66207885742188,
1121
+ "learning_rate": 1.112391930835735e-05,
1122
+ "loss": 0.1238,
1123
+ "step": 7700
1124
+ },
1125
+ {
1126
+ "epoch": 4.46685878962536,
1127
+ "grad_norm": 0.8019499182701111,
1128
+ "learning_rate": 1.1066282420749282e-05,
1129
+ "loss": 0.1062,
1130
+ "step": 7750
1131
+ },
1132
+ {
1133
+ "epoch": 4.495677233429395,
1134
+ "grad_norm": 48.5037841796875,
1135
+ "learning_rate": 1.100864553314121e-05,
1136
+ "loss": 0.0796,
1137
+ "step": 7800
1138
+ },
1139
+ {
1140
+ "epoch": 4.524495677233429,
1141
+ "grad_norm": 1.2362786531448364,
1142
+ "learning_rate": 1.0951008645533141e-05,
1143
+ "loss": 0.1219,
1144
+ "step": 7850
1145
+ },
1146
+ {
1147
+ "epoch": 4.553314121037464,
1148
+ "grad_norm": 8.287176132202148,
1149
+ "learning_rate": 1.0893371757925073e-05,
1150
+ "loss": 0.1102,
1151
+ "step": 7900
1152
+ },
1153
+ {
1154
+ "epoch": 4.582132564841499,
1155
+ "grad_norm": 0.1790919452905655,
1156
+ "learning_rate": 1.0835734870317004e-05,
1157
+ "loss": 0.0486,
1158
+ "step": 7950
1159
+ },
1160
+ {
1161
+ "epoch": 4.610951008645533,
1162
+ "grad_norm": 36.70028305053711,
1163
+ "learning_rate": 1.0778097982708934e-05,
1164
+ "loss": 0.1433,
1165
+ "step": 8000
1166
+ },
1167
+ {
1168
+ "epoch": 4.639769452449568,
1169
+ "grad_norm": 22.68642807006836,
1170
+ "learning_rate": 1.0720461095100865e-05,
1171
+ "loss": 0.1598,
1172
+ "step": 8050
1173
+ },
1174
+ {
1175
+ "epoch": 4.6685878962536025,
1176
+ "grad_norm": 0.10349202156066895,
1177
+ "learning_rate": 1.0662824207492797e-05,
1178
+ "loss": 0.0742,
1179
+ "step": 8100
1180
+ },
1181
+ {
1182
+ "epoch": 4.697406340057637,
1183
+ "grad_norm": 14.959641456604004,
1184
+ "learning_rate": 1.0605187319884726e-05,
1185
+ "loss": 0.1328,
1186
+ "step": 8150
1187
+ },
1188
+ {
1189
+ "epoch": 4.726224783861672,
1190
+ "grad_norm": 1.050648808479309,
1191
+ "learning_rate": 1.0547550432276658e-05,
1192
+ "loss": 0.137,
1193
+ "step": 8200
1194
+ },
1195
+ {
1196
+ "epoch": 4.755043227665706,
1197
+ "grad_norm": 2.9457409381866455,
1198
+ "learning_rate": 1.0489913544668589e-05,
1199
+ "loss": 0.0624,
1200
+ "step": 8250
1201
+ },
1202
+ {
1203
+ "epoch": 4.78386167146974,
1204
+ "grad_norm": 0.5071529746055603,
1205
+ "learning_rate": 1.0432276657060521e-05,
1206
+ "loss": 0.1035,
1207
+ "step": 8300
1208
+ },
1209
+ {
1210
+ "epoch": 4.812680115273775,
1211
+ "grad_norm": 19.162033081054688,
1212
+ "learning_rate": 1.037463976945245e-05,
1213
+ "loss": 0.1705,
1214
+ "step": 8350
1215
+ },
1216
+ {
1217
+ "epoch": 4.8414985590778095,
1218
+ "grad_norm": 1.8972758054733276,
1219
+ "learning_rate": 1.031700288184438e-05,
1220
+ "loss": 0.1543,
1221
+ "step": 8400
1222
+ },
1223
+ {
1224
+ "epoch": 4.870317002881844,
1225
+ "grad_norm": 0.05384368821978569,
1226
+ "learning_rate": 1.0259365994236313e-05,
1227
+ "loss": 0.1049,
1228
+ "step": 8450
1229
+ },
1230
+ {
1231
+ "epoch": 4.899135446685879,
1232
+ "grad_norm": 9.819040298461914,
1233
+ "learning_rate": 1.0201729106628241e-05,
1234
+ "loss": 0.1305,
1235
+ "step": 8500
1236
+ },
1237
+ {
1238
+ "epoch": 4.927953890489913,
1239
+ "grad_norm": 2.4009037017822266,
1240
+ "learning_rate": 1.0144092219020174e-05,
1241
+ "loss": 0.1294,
1242
+ "step": 8550
1243
+ },
1244
+ {
1245
+ "epoch": 4.956772334293948,
1246
+ "grad_norm": 44.24007034301758,
1247
+ "learning_rate": 1.0086455331412104e-05,
1248
+ "loss": 0.1563,
1249
+ "step": 8600
1250
+ },
1251
+ {
1252
+ "epoch": 4.985590778097983,
1253
+ "grad_norm": 0.5839857459068298,
1254
+ "learning_rate": 1.0028818443804036e-05,
1255
+ "loss": 0.1116,
1256
+ "step": 8650
1257
+ },
1258
+ {
1259
+ "epoch": 5.0,
1260
+ "eval_accuracy": 0.9311139933708027,
1261
+ "eval_loss": 0.3880128860473633,
1262
+ "eval_runtime": 37.4244,
1263
+ "eval_samples_per_second": 185.414,
1264
+ "eval_steps_per_second": 11.597,
1265
+ "step": 8675
1266
+ },
1267
+ {
1268
+ "epoch": 5.014409221902017,
1269
+ "grad_norm": 23.385534286499023,
1270
+ "learning_rate": 9.971181556195965e-06,
1271
+ "loss": 0.1166,
1272
+ "step": 8700
1273
+ },
1274
+ {
1275
+ "epoch": 5.043227665706052,
1276
+ "grad_norm": 0.4506791830062866,
1277
+ "learning_rate": 9.913544668587897e-06,
1278
+ "loss": 0.057,
1279
+ "step": 8750
1280
+ },
1281
+ {
1282
+ "epoch": 5.072046109510087,
1283
+ "grad_norm": 49.61991882324219,
1284
+ "learning_rate": 9.855907780979828e-06,
1285
+ "loss": 0.0734,
1286
+ "step": 8800
1287
+ },
1288
+ {
1289
+ "epoch": 5.100864553314121,
1290
+ "grad_norm": 0.0602734349668026,
1291
+ "learning_rate": 9.798270893371759e-06,
1292
+ "loss": 0.0681,
1293
+ "step": 8850
1294
+ },
1295
+ {
1296
+ "epoch": 5.129682997118156,
1297
+ "grad_norm": 0.023745020851492882,
1298
+ "learning_rate": 9.740634005763689e-06,
1299
+ "loss": 0.072,
1300
+ "step": 8900
1301
+ },
1302
+ {
1303
+ "epoch": 5.1585014409221905,
1304
+ "grad_norm": 31.497879028320312,
1305
+ "learning_rate": 9.68299711815562e-06,
1306
+ "loss": 0.0474,
1307
+ "step": 8950
1308
+ },
1309
+ {
1310
+ "epoch": 5.187319884726225,
1311
+ "grad_norm": 1.734765648841858,
1312
+ "learning_rate": 9.625360230547552e-06,
1313
+ "loss": 0.0688,
1314
+ "step": 9000
1315
+ },
1316
+ {
1317
+ "epoch": 5.216138328530259,
1318
+ "grad_norm": 98.79872131347656,
1319
+ "learning_rate": 9.567723342939482e-06,
1320
+ "loss": 0.1255,
1321
+ "step": 9050
1322
+ },
1323
+ {
1324
+ "epoch": 5.244956772334294,
1325
+ "grad_norm": 6.518857002258301,
1326
+ "learning_rate": 9.510086455331413e-06,
1327
+ "loss": 0.0974,
1328
+ "step": 9100
1329
+ },
1330
+ {
1331
+ "epoch": 5.273775216138328,
1332
+ "grad_norm": 31.412202835083008,
1333
+ "learning_rate": 9.452449567723344e-06,
1334
+ "loss": 0.0412,
1335
+ "step": 9150
1336
+ },
1337
+ {
1338
+ "epoch": 5.302593659942363,
1339
+ "grad_norm": 2.6872849464416504,
1340
+ "learning_rate": 9.394812680115276e-06,
1341
+ "loss": 0.0679,
1342
+ "step": 9200
1343
+ },
1344
+ {
1345
+ "epoch": 5.3314121037463975,
1346
+ "grad_norm": 28.229368209838867,
1347
+ "learning_rate": 9.337175792507205e-06,
1348
+ "loss": 0.0817,
1349
+ "step": 9250
1350
+ },
1351
+ {
1352
+ "epoch": 5.360230547550432,
1353
+ "grad_norm": 0.24797913432121277,
1354
+ "learning_rate": 9.279538904899135e-06,
1355
+ "loss": 0.0768,
1356
+ "step": 9300
1357
+ },
1358
+ {
1359
+ "epoch": 5.389048991354467,
1360
+ "grad_norm": 0.3930692970752716,
1361
+ "learning_rate": 9.221902017291067e-06,
1362
+ "loss": 0.0945,
1363
+ "step": 9350
1364
+ },
1365
+ {
1366
+ "epoch": 5.417867435158501,
1367
+ "grad_norm": 3.4596047401428223,
1368
+ "learning_rate": 9.164265129682998e-06,
1369
+ "loss": 0.0729,
1370
+ "step": 9400
1371
+ },
1372
+ {
1373
+ "epoch": 5.446685878962536,
1374
+ "grad_norm": 3.12446665763855,
1375
+ "learning_rate": 9.106628242074928e-06,
1376
+ "loss": 0.0695,
1377
+ "step": 9450
1378
+ },
1379
+ {
1380
+ "epoch": 5.475504322766571,
1381
+ "grad_norm": 0.043711356818675995,
1382
+ "learning_rate": 9.048991354466859e-06,
1383
+ "loss": 0.0656,
1384
+ "step": 9500
1385
+ },
1386
+ {
1387
+ "epoch": 5.504322766570605,
1388
+ "grad_norm": 63.43326950073242,
1389
+ "learning_rate": 8.991354466858791e-06,
1390
+ "loss": 0.0684,
1391
+ "step": 9550
1392
+ },
1393
+ {
1394
+ "epoch": 5.53314121037464,
1395
+ "grad_norm": 2.399331569671631,
1396
+ "learning_rate": 8.933717579250722e-06,
1397
+ "loss": 0.1072,
1398
+ "step": 9600
1399
+ },
1400
+ {
1401
+ "epoch": 5.561959654178675,
1402
+ "grad_norm": 0.027092283591628075,
1403
+ "learning_rate": 8.876080691642652e-06,
1404
+ "loss": 0.1134,
1405
+ "step": 9650
1406
+ },
1407
+ {
1408
+ "epoch": 5.590778097982709,
1409
+ "grad_norm": 0.9653186798095703,
1410
+ "learning_rate": 8.818443804034583e-06,
1411
+ "loss": 0.0805,
1412
+ "step": 9700
1413
+ },
1414
+ {
1415
+ "epoch": 5.619596541786743,
1416
+ "grad_norm": 0.43673309683799744,
1417
+ "learning_rate": 8.760806916426513e-06,
1418
+ "loss": 0.0879,
1419
+ "step": 9750
1420
+ },
1421
+ {
1422
+ "epoch": 5.648414985590778,
1423
+ "grad_norm": 0.3906983435153961,
1424
+ "learning_rate": 8.703170028818444e-06,
1425
+ "loss": 0.1068,
1426
+ "step": 9800
1427
+ },
1428
+ {
1429
+ "epoch": 5.677233429394812,
1430
+ "grad_norm": 16.26913070678711,
1431
+ "learning_rate": 8.645533141210375e-06,
1432
+ "loss": 0.1136,
1433
+ "step": 9850
1434
+ },
1435
+ {
1436
+ "epoch": 5.706051873198847,
1437
+ "grad_norm": 2.990417242050171,
1438
+ "learning_rate": 8.587896253602305e-06,
1439
+ "loss": 0.0682,
1440
+ "step": 9900
1441
+ },
1442
+ {
1443
+ "epoch": 5.734870317002882,
1444
+ "grad_norm": 0.40273919701576233,
1445
+ "learning_rate": 8.530259365994237e-06,
1446
+ "loss": 0.0974,
1447
+ "step": 9950
1448
+ },
1449
+ {
1450
+ "epoch": 5.763688760806916,
1451
+ "grad_norm": 0.6563950777053833,
1452
+ "learning_rate": 8.472622478386168e-06,
1453
+ "loss": 0.0612,
1454
+ "step": 10000
1455
+ },
1456
+ {
1457
+ "epoch": 5.792507204610951,
1458
+ "grad_norm": 0.04713226109743118,
1459
+ "learning_rate": 8.414985590778098e-06,
1460
+ "loss": 0.058,
1461
+ "step": 10050
1462
+ },
1463
+ {
1464
+ "epoch": 5.821325648414986,
1465
+ "grad_norm": 155.84222412109375,
1466
+ "learning_rate": 8.357348703170029e-06,
1467
+ "loss": 0.0765,
1468
+ "step": 10100
1469
+ },
1470
+ {
1471
+ "epoch": 5.85014409221902,
1472
+ "grad_norm": 0.14352348446846008,
1473
+ "learning_rate": 8.299711815561961e-06,
1474
+ "loss": 0.1251,
1475
+ "step": 10150
1476
+ },
1477
+ {
1478
+ "epoch": 5.878962536023055,
1479
+ "grad_norm": 0.05221036821603775,
1480
+ "learning_rate": 8.242074927953892e-06,
1481
+ "loss": 0.0724,
1482
+ "step": 10200
1483
+ },
1484
+ {
1485
+ "epoch": 5.9077809798270895,
1486
+ "grad_norm": 44.994606018066406,
1487
+ "learning_rate": 8.184438040345822e-06,
1488
+ "loss": 0.0597,
1489
+ "step": 10250
1490
+ },
1491
+ {
1492
+ "epoch": 5.936599423631124,
1493
+ "grad_norm": 57.5409049987793,
1494
+ "learning_rate": 8.126801152737753e-06,
1495
+ "loss": 0.0747,
1496
+ "step": 10300
1497
+ },
1498
+ {
1499
+ "epoch": 5.965417867435159,
1500
+ "grad_norm": 40.75551986694336,
1501
+ "learning_rate": 8.069164265129685e-06,
1502
+ "loss": 0.11,
1503
+ "step": 10350
1504
+ },
1505
+ {
1506
+ "epoch": 5.994236311239193,
1507
+ "grad_norm": 21.53359603881836,
1508
+ "learning_rate": 8.011527377521614e-06,
1509
+ "loss": 0.0721,
1510
+ "step": 10400
1511
+ },
1512
+ {
1513
+ "epoch": 6.0,
1514
+ "eval_accuracy": 0.9414901282605562,
1515
+ "eval_loss": 0.37702837586402893,
1516
+ "eval_runtime": 37.3615,
1517
+ "eval_samples_per_second": 185.726,
1518
+ "eval_steps_per_second": 11.616,
1519
+ "step": 10410
1520
+ },
1521
+ {
1522
+ "epoch": 6.023054755043228,
1523
+ "grad_norm": 11.95662784576416,
1524
+ "learning_rate": 7.953890489913544e-06,
1525
+ "loss": 0.0444,
1526
+ "step": 10450
1527
+ },
1528
+ {
1529
+ "epoch": 6.051873198847262,
1530
+ "grad_norm": 0.17058134078979492,
1531
+ "learning_rate": 7.896253602305477e-06,
1532
+ "loss": 0.0413,
1533
+ "step": 10500
1534
+ },
1535
+ {
1536
+ "epoch": 6.0806916426512965,
1537
+ "grad_norm": 0.023899082094430923,
1538
+ "learning_rate": 7.838616714697407e-06,
1539
+ "loss": 0.0283,
1540
+ "step": 10550
1541
+ },
1542
+ {
1543
+ "epoch": 6.109510086455331,
1544
+ "grad_norm": 5.194774627685547,
1545
+ "learning_rate": 7.780979827089338e-06,
1546
+ "loss": 0.029,
1547
+ "step": 10600
1548
+ },
1549
+ {
1550
+ "epoch": 6.138328530259366,
1551
+ "grad_norm": 47.05008316040039,
1552
+ "learning_rate": 7.723342939481268e-06,
1553
+ "loss": 0.0639,
1554
+ "step": 10650
1555
+ },
1556
+ {
1557
+ "epoch": 6.1671469740634,
1558
+ "grad_norm": 1.5677424669265747,
1559
+ "learning_rate": 7.665706051873199e-06,
1560
+ "loss": 0.013,
1561
+ "step": 10700
1562
+ },
1563
+ {
1564
+ "epoch": 6.195965417867435,
1565
+ "grad_norm": 0.054807789623737335,
1566
+ "learning_rate": 7.60806916426513e-06,
1567
+ "loss": 0.0314,
1568
+ "step": 10750
1569
+ },
1570
+ {
1571
+ "epoch": 6.22478386167147,
1572
+ "grad_norm": 0.005258807446807623,
1573
+ "learning_rate": 7.550432276657062e-06,
1574
+ "loss": 0.0773,
1575
+ "step": 10800
1576
+ },
1577
+ {
1578
+ "epoch": 6.253602305475504,
1579
+ "grad_norm": 6.556185722351074,
1580
+ "learning_rate": 7.492795389048992e-06,
1581
+ "loss": 0.055,
1582
+ "step": 10850
1583
+ },
1584
+ {
1585
+ "epoch": 6.282420749279539,
1586
+ "grad_norm": 0.009452180936932564,
1587
+ "learning_rate": 7.4351585014409235e-06,
1588
+ "loss": 0.0428,
1589
+ "step": 10900
1590
+ },
1591
+ {
1592
+ "epoch": 6.311239193083574,
1593
+ "grad_norm": 1.1048903465270996,
1594
+ "learning_rate": 7.377521613832853e-06,
1595
+ "loss": 0.023,
1596
+ "step": 10950
1597
+ },
1598
+ {
1599
+ "epoch": 6.340057636887608,
1600
+ "grad_norm": 0.10645721852779388,
1601
+ "learning_rate": 7.319884726224784e-06,
1602
+ "loss": 0.0403,
1603
+ "step": 11000
1604
+ },
1605
+ {
1606
+ "epoch": 6.368876080691643,
1607
+ "grad_norm": 0.03314146026968956,
1608
+ "learning_rate": 7.262247838616715e-06,
1609
+ "loss": 0.0632,
1610
+ "step": 11050
1611
+ },
1612
+ {
1613
+ "epoch": 6.3976945244956775,
1614
+ "grad_norm": 0.010250965133309364,
1615
+ "learning_rate": 7.204610951008646e-06,
1616
+ "loss": 0.0461,
1617
+ "step": 11100
1618
+ },
1619
+ {
1620
+ "epoch": 6.426512968299712,
1621
+ "grad_norm": 0.663324773311615,
1622
+ "learning_rate": 7.146974063400577e-06,
1623
+ "loss": 0.0706,
1624
+ "step": 11150
1625
+ },
1626
+ {
1627
+ "epoch": 6.455331412103746,
1628
+ "grad_norm": 0.016964536160230637,
1629
+ "learning_rate": 7.089337175792508e-06,
1630
+ "loss": 0.0623,
1631
+ "step": 11200
1632
+ },
1633
+ {
1634
+ "epoch": 6.484149855907781,
1635
+ "grad_norm": 0.8198705911636353,
1636
+ "learning_rate": 7.031700288184439e-06,
1637
+ "loss": 0.0486,
1638
+ "step": 11250
1639
+ },
1640
+ {
1641
+ "epoch": 6.512968299711815,
1642
+ "grad_norm": 0.014807182364165783,
1643
+ "learning_rate": 6.9740634005763696e-06,
1644
+ "loss": 0.0125,
1645
+ "step": 11300
1646
+ },
1647
+ {
1648
+ "epoch": 6.54178674351585,
1649
+ "grad_norm": 101.77655029296875,
1650
+ "learning_rate": 6.916426512968301e-06,
1651
+ "loss": 0.0436,
1652
+ "step": 11350
1653
+ },
1654
+ {
1655
+ "epoch": 6.5706051873198845,
1656
+ "grad_norm": 0.8024958968162537,
1657
+ "learning_rate": 6.8587896253602315e-06,
1658
+ "loss": 0.0525,
1659
+ "step": 11400
1660
+ },
1661
+ {
1662
+ "epoch": 6.599423631123919,
1663
+ "grad_norm": 0.010165904648602009,
1664
+ "learning_rate": 6.801152737752162e-06,
1665
+ "loss": 0.0255,
1666
+ "step": 11450
1667
+ },
1668
+ {
1669
+ "epoch": 6.628242074927954,
1670
+ "grad_norm": 0.31986117362976074,
1671
+ "learning_rate": 6.743515850144093e-06,
1672
+ "loss": 0.0765,
1673
+ "step": 11500
1674
+ },
1675
+ {
1676
+ "epoch": 6.6570605187319885,
1677
+ "grad_norm": 0.01843302696943283,
1678
+ "learning_rate": 6.685878962536023e-06,
1679
+ "loss": 0.0396,
1680
+ "step": 11550
1681
+ },
1682
+ {
1683
+ "epoch": 6.685878962536023,
1684
+ "grad_norm": 51.702552795410156,
1685
+ "learning_rate": 6.6282420749279545e-06,
1686
+ "loss": 0.1131,
1687
+ "step": 11600
1688
+ },
1689
+ {
1690
+ "epoch": 6.714697406340058,
1691
+ "grad_norm": 0.10061511397361755,
1692
+ "learning_rate": 6.570605187319885e-06,
1693
+ "loss": 0.0528,
1694
+ "step": 11650
1695
+ },
1696
+ {
1697
+ "epoch": 6.743515850144092,
1698
+ "grad_norm": 0.010481205768883228,
1699
+ "learning_rate": 6.512968299711816e-06,
1700
+ "loss": 0.0537,
1701
+ "step": 11700
1702
+ },
1703
+ {
1704
+ "epoch": 6.772334293948127,
1705
+ "grad_norm": 0.07575374096632004,
1706
+ "learning_rate": 6.455331412103747e-06,
1707
+ "loss": 0.0478,
1708
+ "step": 11750
1709
+ },
1710
+ {
1711
+ "epoch": 6.801152737752162,
1712
+ "grad_norm": 0.0058944206684827805,
1713
+ "learning_rate": 6.3976945244956775e-06,
1714
+ "loss": 0.065,
1715
+ "step": 11800
1716
+ },
1717
+ {
1718
+ "epoch": 6.829971181556196,
1719
+ "grad_norm": 0.9527530074119568,
1720
+ "learning_rate": 6.340057636887609e-06,
1721
+ "loss": 0.0505,
1722
+ "step": 11850
1723
+ },
1724
+ {
1725
+ "epoch": 6.858789625360231,
1726
+ "grad_norm": 22.32554054260254,
1727
+ "learning_rate": 6.2824207492795395e-06,
1728
+ "loss": 0.0858,
1729
+ "step": 11900
1730
+ },
1731
+ {
1732
+ "epoch": 6.887608069164266,
1733
+ "grad_norm": 0.04536249861121178,
1734
+ "learning_rate": 6.224783861671471e-06,
1735
+ "loss": 0.0618,
1736
+ "step": 11950
1737
+ },
1738
+ {
1739
+ "epoch": 6.916426512968299,
1740
+ "grad_norm": 0.030509620904922485,
1741
+ "learning_rate": 6.167146974063401e-06,
1742
+ "loss": 0.06,
1743
+ "step": 12000
1744
+ },
1745
+ {
1746
+ "epoch": 6.945244956772334,
1747
+ "grad_norm": 4.554119110107422,
1748
+ "learning_rate": 6.109510086455331e-06,
1749
+ "loss": 0.0478,
1750
+ "step": 12050
1751
+ },
1752
+ {
1753
+ "epoch": 6.974063400576369,
1754
+ "grad_norm": 0.03110508993268013,
1755
+ "learning_rate": 6.0518731988472625e-06,
1756
+ "loss": 0.0486,
1757
+ "step": 12100
1758
+ },
1759
+ {
1760
+ "epoch": 7.0,
1761
+ "eval_accuracy": 0.943651823029255,
1762
+ "eval_loss": 0.4001205563545227,
1763
+ "eval_runtime": 43.9647,
1764
+ "eval_samples_per_second": 157.831,
1765
+ "eval_steps_per_second": 9.872,
1766
+ "step": 12145
1767
+ },
1768
+ {
1769
+ "epoch": 7.002881844380403,
1770
+ "grad_norm": 3.505014181137085,
1771
+ "learning_rate": 5.994236311239193e-06,
1772
+ "loss": 0.0951,
1773
+ "step": 12150
1774
+ },
1775
+ {
1776
+ "epoch": 7.031700288184438,
1777
+ "grad_norm": 0.1990944892168045,
1778
+ "learning_rate": 5.9365994236311244e-06,
1779
+ "loss": 0.0131,
1780
+ "step": 12200
1781
+ },
1782
+ {
1783
+ "epoch": 7.060518731988473,
1784
+ "grad_norm": 0.19344107806682587,
1785
+ "learning_rate": 5.878962536023055e-06,
1786
+ "loss": 0.0247,
1787
+ "step": 12250
1788
+ },
1789
+ {
1790
+ "epoch": 7.089337175792507,
1791
+ "grad_norm": 0.5416840314865112,
1792
+ "learning_rate": 5.821325648414986e-06,
1793
+ "loss": 0.069,
1794
+ "step": 12300
1795
+ },
1796
+ {
1797
+ "epoch": 7.118155619596542,
1798
+ "grad_norm": 0.029165951535105705,
1799
+ "learning_rate": 5.763688760806917e-06,
1800
+ "loss": 0.029,
1801
+ "step": 12350
1802
+ },
1803
+ {
1804
+ "epoch": 7.1469740634005765,
1805
+ "grad_norm": 0.0034562216605991125,
1806
+ "learning_rate": 5.706051873198848e-06,
1807
+ "loss": 0.0337,
1808
+ "step": 12400
1809
+ },
1810
+ {
1811
+ "epoch": 7.175792507204611,
1812
+ "grad_norm": 0.048965733498334885,
1813
+ "learning_rate": 5.648414985590779e-06,
1814
+ "loss": 0.0214,
1815
+ "step": 12450
1816
+ },
1817
+ {
1818
+ "epoch": 7.204610951008646,
1819
+ "grad_norm": 0.05087200552225113,
1820
+ "learning_rate": 5.590778097982709e-06,
1821
+ "loss": 0.0071,
1822
+ "step": 12500
1823
+ },
1824
+ {
1825
+ "epoch": 7.23342939481268,
1826
+ "grad_norm": 0.0026253710966557264,
1827
+ "learning_rate": 5.533141210374641e-06,
1828
+ "loss": 0.0254,
1829
+ "step": 12550
1830
+ },
1831
+ {
1832
+ "epoch": 7.262247838616715,
1833
+ "grad_norm": 0.01383883971720934,
1834
+ "learning_rate": 5.4755043227665705e-06,
1835
+ "loss": 0.0354,
1836
+ "step": 12600
1837
+ },
1838
+ {
1839
+ "epoch": 7.291066282420749,
1840
+ "grad_norm": 0.06278753280639648,
1841
+ "learning_rate": 5.417867435158502e-06,
1842
+ "loss": 0.0499,
1843
+ "step": 12650
1844
+ },
1845
+ {
1846
+ "epoch": 7.3198847262247835,
1847
+ "grad_norm": 91.43658447265625,
1848
+ "learning_rate": 5.360230547550432e-06,
1849
+ "loss": 0.0162,
1850
+ "step": 12700
1851
+ },
1852
+ {
1853
+ "epoch": 7.348703170028818,
1854
+ "grad_norm": 0.042137544602155685,
1855
+ "learning_rate": 5.302593659942363e-06,
1856
+ "loss": 0.0183,
1857
+ "step": 12750
1858
+ },
1859
+ {
1860
+ "epoch": 7.377521613832853,
1861
+ "grad_norm": 0.5085373520851135,
1862
+ "learning_rate": 5.244956772334294e-06,
1863
+ "loss": 0.0623,
1864
+ "step": 12800
1865
+ },
1866
+ {
1867
+ "epoch": 7.406340057636887,
1868
+ "grad_norm": 0.07125350832939148,
1869
+ "learning_rate": 5.187319884726225e-06,
1870
+ "loss": 0.0403,
1871
+ "step": 12850
1872
+ },
1873
+ {
1874
+ "epoch": 7.435158501440922,
1875
+ "grad_norm": 0.0029079755768179893,
1876
+ "learning_rate": 5.129682997118156e-06,
1877
+ "loss": 0.0294,
1878
+ "step": 12900
1879
+ },
1880
+ {
1881
+ "epoch": 7.463976945244957,
1882
+ "grad_norm": 0.19476212561130524,
1883
+ "learning_rate": 5.072046109510087e-06,
1884
+ "loss": 0.0136,
1885
+ "step": 12950
1886
+ },
1887
+ {
1888
+ "epoch": 7.492795389048991,
1889
+ "grad_norm": 0.0114585617557168,
1890
+ "learning_rate": 5.014409221902018e-06,
1891
+ "loss": 0.0207,
1892
+ "step": 13000
1893
+ },
1894
+ {
1895
+ "epoch": 7.521613832853026,
1896
+ "grad_norm": 72.99742889404297,
1897
+ "learning_rate": 4.956772334293949e-06,
1898
+ "loss": 0.031,
1899
+ "step": 13050
1900
+ },
1901
+ {
1902
+ "epoch": 7.550432276657061,
1903
+ "grad_norm": 0.003232621820643544,
1904
+ "learning_rate": 4.899135446685879e-06,
1905
+ "loss": 0.0328,
1906
+ "step": 13100
1907
+ },
1908
+ {
1909
+ "epoch": 7.579250720461095,
1910
+ "grad_norm": 32.08872985839844,
1911
+ "learning_rate": 4.84149855907781e-06,
1912
+ "loss": 0.025,
1913
+ "step": 13150
1914
+ },
1915
+ {
1916
+ "epoch": 7.60806916426513,
1917
+ "grad_norm": 101.10234832763672,
1918
+ "learning_rate": 4.783861671469741e-06,
1919
+ "loss": 0.0514,
1920
+ "step": 13200
1921
+ },
1922
+ {
1923
+ "epoch": 7.636887608069165,
1924
+ "grad_norm": 0.02673684060573578,
1925
+ "learning_rate": 4.726224783861672e-06,
1926
+ "loss": 0.0423,
1927
+ "step": 13250
1928
+ },
1929
+ {
1930
+ "epoch": 7.665706051873199,
1931
+ "grad_norm": 0.09100785851478577,
1932
+ "learning_rate": 4.668587896253602e-06,
1933
+ "loss": 0.0128,
1934
+ "step": 13300
1935
+ },
1936
+ {
1937
+ "epoch": 7.694524495677234,
1938
+ "grad_norm": 0.014528327621519566,
1939
+ "learning_rate": 4.610951008645534e-06,
1940
+ "loss": 0.0401,
1941
+ "step": 13350
1942
+ },
1943
+ {
1944
+ "epoch": 7.7233429394812685,
1945
+ "grad_norm": 0.005020576063543558,
1946
+ "learning_rate": 4.553314121037464e-06,
1947
+ "loss": 0.0407,
1948
+ "step": 13400
1949
+ },
1950
+ {
1951
+ "epoch": 7.752161383285302,
1952
+ "grad_norm": 0.006958292331546545,
1953
+ "learning_rate": 4.495677233429396e-06,
1954
+ "loss": 0.0355,
1955
+ "step": 13450
1956
+ },
1957
+ {
1958
+ "epoch": 7.780979827089337,
1959
+ "grad_norm": 0.005842278711497784,
1960
+ "learning_rate": 4.438040345821326e-06,
1961
+ "loss": 0.0928,
1962
+ "step": 13500
1963
+ },
1964
+ {
1965
+ "epoch": 7.8097982708933715,
1966
+ "grad_norm": 0.0038527839351445436,
1967
+ "learning_rate": 4.380403458213257e-06,
1968
+ "loss": 0.049,
1969
+ "step": 13550
1970
+ },
1971
+ {
1972
+ "epoch": 7.838616714697406,
1973
+ "grad_norm": 0.10149471461772919,
1974
+ "learning_rate": 4.322766570605187e-06,
1975
+ "loss": 0.0537,
1976
+ "step": 13600
1977
+ },
1978
+ {
1979
+ "epoch": 7.867435158501441,
1980
+ "grad_norm": 0.20959939062595367,
1981
+ "learning_rate": 4.265129682997119e-06,
1982
+ "loss": 0.0314,
1983
+ "step": 13650
1984
+ },
1985
+ {
1986
+ "epoch": 7.8962536023054755,
1987
+ "grad_norm": 0.15081147849559784,
1988
+ "learning_rate": 4.207492795389049e-06,
1989
+ "loss": 0.0347,
1990
+ "step": 13700
1991
+ },
1992
+ {
1993
+ "epoch": 7.92507204610951,
1994
+ "grad_norm": 0.0020617288537323475,
1995
+ "learning_rate": 4.149855907780981e-06,
1996
+ "loss": 0.0193,
1997
+ "step": 13750
1998
+ },
1999
+ {
2000
+ "epoch": 7.953890489913545,
2001
+ "grad_norm": 1.0864264965057373,
2002
+ "learning_rate": 4.092219020172911e-06,
2003
+ "loss": 0.0307,
2004
+ "step": 13800
2005
+ },
2006
+ {
2007
+ "epoch": 7.982708933717579,
2008
+ "grad_norm": 0.8607079386711121,
2009
+ "learning_rate": 4.0345821325648425e-06,
2010
+ "loss": 0.0353,
2011
+ "step": 13850
2012
+ },
2013
+ {
2014
+ "epoch": 8.0,
2015
+ "eval_accuracy": 0.9432194840755153,
2016
+ "eval_loss": 0.4078510105609894,
2017
+ "eval_runtime": 37.2866,
2018
+ "eval_samples_per_second": 186.099,
2019
+ "eval_steps_per_second": 11.64,
2020
+ "step": 13880
2021
+ },
2022
+ {
2023
+ "epoch": 8.011527377521613,
2024
+ "grad_norm": 1.9995282888412476,
2025
+ "learning_rate": 3.976945244956772e-06,
2026
+ "loss": 0.0205,
2027
+ "step": 13900
2028
+ },
2029
+ {
2030
+ "epoch": 8.040345821325648,
2031
+ "grad_norm": 0.00989406555891037,
2032
+ "learning_rate": 3.919308357348704e-06,
2033
+ "loss": 0.0358,
2034
+ "step": 13950
2035
+ },
2036
+ {
2037
+ "epoch": 8.069164265129682,
2038
+ "grad_norm": 0.029149776324629784,
2039
+ "learning_rate": 3.861671469740634e-06,
2040
+ "loss": 0.0201,
2041
+ "step": 14000
2042
+ },
2043
+ {
2044
+ "epoch": 8.097982708933717,
2045
+ "grad_norm": 0.013825014233589172,
2046
+ "learning_rate": 3.804034582132565e-06,
2047
+ "loss": 0.0201,
2048
+ "step": 14050
2049
+ },
2050
+ {
2051
+ "epoch": 8.126801152737752,
2052
+ "grad_norm": 0.002229891484603286,
2053
+ "learning_rate": 3.746397694524496e-06,
2054
+ "loss": 0.0152,
2055
+ "step": 14100
2056
+ },
2057
+ {
2058
+ "epoch": 8.155619596541786,
2059
+ "grad_norm": 0.22877122461795807,
2060
+ "learning_rate": 3.6887608069164266e-06,
2061
+ "loss": 0.017,
2062
+ "step": 14150
2063
+ },
2064
+ {
2065
+ "epoch": 8.184438040345821,
2066
+ "grad_norm": 0.014974354766309261,
2067
+ "learning_rate": 3.6311239193083576e-06,
2068
+ "loss": 0.01,
2069
+ "step": 14200
2070
+ },
2071
+ {
2072
+ "epoch": 8.213256484149856,
2073
+ "grad_norm": 49.01778030395508,
2074
+ "learning_rate": 3.5734870317002885e-06,
2075
+ "loss": 0.0324,
2076
+ "step": 14250
2077
+ },
2078
+ {
2079
+ "epoch": 8.24207492795389,
2080
+ "grad_norm": 2.350428581237793,
2081
+ "learning_rate": 3.5158501440922195e-06,
2082
+ "loss": 0.0119,
2083
+ "step": 14300
2084
+ },
2085
+ {
2086
+ "epoch": 8.270893371757925,
2087
+ "grad_norm": 0.037689752876758575,
2088
+ "learning_rate": 3.4582132564841505e-06,
2089
+ "loss": 0.0205,
2090
+ "step": 14350
2091
+ },
2092
+ {
2093
+ "epoch": 8.29971181556196,
2094
+ "grad_norm": 0.15642857551574707,
2095
+ "learning_rate": 3.400576368876081e-06,
2096
+ "loss": 0.0346,
2097
+ "step": 14400
2098
+ },
2099
+ {
2100
+ "epoch": 8.328530259365994,
2101
+ "grad_norm": 0.0028990712016820908,
2102
+ "learning_rate": 3.3429394812680116e-06,
2103
+ "loss": 0.0316,
2104
+ "step": 14450
2105
+ },
2106
+ {
2107
+ "epoch": 8.357348703170029,
2108
+ "grad_norm": 42.16065979003906,
2109
+ "learning_rate": 3.2853025936599425e-06,
2110
+ "loss": 0.021,
2111
+ "step": 14500
2112
+ },
2113
+ {
2114
+ "epoch": 8.386167146974064,
2115
+ "grad_norm": 0.1258460283279419,
2116
+ "learning_rate": 3.2276657060518735e-06,
2117
+ "loss": 0.0258,
2118
+ "step": 14550
2119
+ },
2120
+ {
2121
+ "epoch": 8.414985590778098,
2122
+ "grad_norm": 0.015242321416735649,
2123
+ "learning_rate": 3.1700288184438045e-06,
2124
+ "loss": 0.0116,
2125
+ "step": 14600
2126
+ },
2127
+ {
2128
+ "epoch": 8.443804034582133,
2129
+ "grad_norm": 10.062729835510254,
2130
+ "learning_rate": 3.1123919308357354e-06,
2131
+ "loss": 0.0279,
2132
+ "step": 14650
2133
+ },
2134
+ {
2135
+ "epoch": 8.472622478386167,
2136
+ "grad_norm": 0.005074836779385805,
2137
+ "learning_rate": 3.0547550432276656e-06,
2138
+ "loss": 0.0294,
2139
+ "step": 14700
2140
+ },
2141
+ {
2142
+ "epoch": 8.501440922190202,
2143
+ "grad_norm": 0.029905997216701508,
2144
+ "learning_rate": 2.9971181556195965e-06,
2145
+ "loss": 0.0352,
2146
+ "step": 14750
2147
+ },
2148
+ {
2149
+ "epoch": 8.530259365994237,
2150
+ "grad_norm": 134.86546325683594,
2151
+ "learning_rate": 2.9394812680115275e-06,
2152
+ "loss": 0.0458,
2153
+ "step": 14800
2154
+ },
2155
+ {
2156
+ "epoch": 8.559077809798271,
2157
+ "grad_norm": 0.03388785198330879,
2158
+ "learning_rate": 2.8818443804034585e-06,
2159
+ "loss": 0.0014,
2160
+ "step": 14850
2161
+ },
2162
+ {
2163
+ "epoch": 8.587896253602306,
2164
+ "grad_norm": 0.0030293685849756002,
2165
+ "learning_rate": 2.8242074927953894e-06,
2166
+ "loss": 0.0098,
2167
+ "step": 14900
2168
+ },
2169
+ {
2170
+ "epoch": 8.61671469740634,
2171
+ "grad_norm": 0.008076900616288185,
2172
+ "learning_rate": 2.7665706051873204e-06,
2173
+ "loss": 0.0196,
2174
+ "step": 14950
2175
+ },
2176
+ {
2177
+ "epoch": 8.645533141210375,
2178
+ "grad_norm": 3.2185356616973877,
2179
+ "learning_rate": 2.708933717579251e-06,
2180
+ "loss": 0.0191,
2181
+ "step": 15000
2182
+ },
2183
+ {
2184
+ "epoch": 8.67435158501441,
2185
+ "grad_norm": 0.04700352996587753,
2186
+ "learning_rate": 2.6512968299711815e-06,
2187
+ "loss": 0.021,
2188
+ "step": 15050
2189
+ },
2190
+ {
2191
+ "epoch": 8.703170028818445,
2192
+ "grad_norm": 0.07113181054592133,
2193
+ "learning_rate": 2.5936599423631124e-06,
2194
+ "loss": 0.0325,
2195
+ "step": 15100
2196
+ },
2197
+ {
2198
+ "epoch": 8.73198847262248,
2199
+ "grad_norm": 36.98723220825195,
2200
+ "learning_rate": 2.5360230547550434e-06,
2201
+ "loss": 0.0391,
2202
+ "step": 15150
2203
+ },
2204
+ {
2205
+ "epoch": 8.760806916426514,
2206
+ "grad_norm": 0.005969559773802757,
2207
+ "learning_rate": 2.4783861671469744e-06,
2208
+ "loss": 0.0041,
2209
+ "step": 15200
2210
+ },
2211
+ {
2212
+ "epoch": 8.789625360230547,
2213
+ "grad_norm": 0.05540904030203819,
2214
+ "learning_rate": 2.420749279538905e-06,
2215
+ "loss": 0.0175,
2216
+ "step": 15250
2217
+ },
2218
+ {
2219
+ "epoch": 8.818443804034581,
2220
+ "grad_norm": 5.187469482421875,
2221
+ "learning_rate": 2.363112391930836e-06,
2222
+ "loss": 0.0574,
2223
+ "step": 15300
2224
+ },
2225
+ {
2226
+ "epoch": 8.847262247838616,
2227
+ "grad_norm": 0.02656296268105507,
2228
+ "learning_rate": 2.305475504322767e-06,
2229
+ "loss": 0.0076,
2230
+ "step": 15350
2231
+ },
2232
+ {
2233
+ "epoch": 8.87608069164265,
2234
+ "grad_norm": 62.193111419677734,
2235
+ "learning_rate": 2.247838616714698e-06,
2236
+ "loss": 0.0349,
2237
+ "step": 15400
2238
+ },
2239
+ {
2240
+ "epoch": 8.904899135446685,
2241
+ "grad_norm": 0.0021070409566164017,
2242
+ "learning_rate": 2.1902017291066284e-06,
2243
+ "loss": 0.0124,
2244
+ "step": 15450
2245
+ },
2246
+ {
2247
+ "epoch": 8.93371757925072,
2248
+ "grad_norm": 0.007772780489176512,
2249
+ "learning_rate": 2.1325648414985593e-06,
2250
+ "loss": 0.0116,
2251
+ "step": 15500
2252
+ },
2253
+ {
2254
+ "epoch": 8.962536023054755,
2255
+ "grad_norm": 0.012445935048162937,
2256
+ "learning_rate": 2.0749279538904903e-06,
2257
+ "loss": 0.0432,
2258
+ "step": 15550
2259
+ },
2260
+ {
2261
+ "epoch": 8.99135446685879,
2262
+ "grad_norm": 0.005035657435655594,
2263
+ "learning_rate": 2.0172910662824213e-06,
2264
+ "loss": 0.0311,
2265
+ "step": 15600
2266
+ },
2267
+ {
2268
+ "epoch": 9.0,
2269
+ "eval_accuracy": 0.9409136763222367,
2270
+ "eval_loss": 0.45458710193634033,
2271
+ "eval_runtime": 37.2035,
2272
+ "eval_samples_per_second": 186.515,
2273
+ "eval_steps_per_second": 11.666,
2274
+ "step": 15615
2275
+ },
2276
+ {
2277
+ "epoch": 9.020172910662824,
2278
+ "grad_norm": 0.31200042366981506,
2279
+ "learning_rate": 1.959654178674352e-06,
2280
+ "loss": 0.0366,
2281
+ "step": 15650
2282
+ },
2283
+ {
2284
+ "epoch": 9.048991354466859,
2285
+ "grad_norm": 0.0019912293646484613,
2286
+ "learning_rate": 1.9020172910662826e-06,
2287
+ "loss": 0.0083,
2288
+ "step": 15700
2289
+ },
2290
+ {
2291
+ "epoch": 9.077809798270893,
2292
+ "grad_norm": 0.00532187195494771,
2293
+ "learning_rate": 1.8443804034582133e-06,
2294
+ "loss": 0.0064,
2295
+ "step": 15750
2296
+ },
2297
+ {
2298
+ "epoch": 9.106628242074928,
2299
+ "grad_norm": 0.0012970577226951718,
2300
+ "learning_rate": 1.7867435158501443e-06,
2301
+ "loss": 0.0279,
2302
+ "step": 15800
2303
+ },
2304
+ {
2305
+ "epoch": 9.135446685878962,
2306
+ "grad_norm": 0.002228269586339593,
2307
+ "learning_rate": 1.7291066282420752e-06,
2308
+ "loss": 0.0084,
2309
+ "step": 15850
2310
+ },
2311
+ {
2312
+ "epoch": 9.164265129682997,
2313
+ "grad_norm": 0.006390728056430817,
2314
+ "learning_rate": 1.6714697406340058e-06,
2315
+ "loss": 0.0265,
2316
+ "step": 15900
2317
+ },
2318
+ {
2319
+ "epoch": 9.193083573487032,
2320
+ "grad_norm": 0.00681735435500741,
2321
+ "learning_rate": 1.6138328530259367e-06,
2322
+ "loss": 0.0183,
2323
+ "step": 15950
2324
+ },
2325
+ {
2326
+ "epoch": 9.221902017291066,
2327
+ "grad_norm": 0.0014511954504996538,
2328
+ "learning_rate": 1.5561959654178677e-06,
2329
+ "loss": 0.0135,
2330
+ "step": 16000
2331
+ },
2332
+ {
2333
+ "epoch": 9.250720461095101,
2334
+ "grad_norm": 0.05415060743689537,
2335
+ "learning_rate": 1.4985590778097983e-06,
2336
+ "loss": 0.0243,
2337
+ "step": 16050
2338
+ },
2339
+ {
2340
+ "epoch": 9.279538904899136,
2341
+ "grad_norm": 0.003793516429141164,
2342
+ "learning_rate": 1.4409221902017292e-06,
2343
+ "loss": 0.031,
2344
+ "step": 16100
2345
+ },
2346
+ {
2347
+ "epoch": 9.30835734870317,
2348
+ "grad_norm": 0.0018004026496782899,
2349
+ "learning_rate": 1.3832853025936602e-06,
2350
+ "loss": 0.0193,
2351
+ "step": 16150
2352
+ },
2353
+ {
2354
+ "epoch": 9.337175792507205,
2355
+ "grad_norm": 0.9138274192810059,
2356
+ "learning_rate": 1.3256484149855907e-06,
2357
+ "loss": 0.021,
2358
+ "step": 16200
2359
+ },
2360
+ {
2361
+ "epoch": 9.36599423631124,
2362
+ "grad_norm": 0.0023099486716091633,
2363
+ "learning_rate": 1.2680115273775217e-06,
2364
+ "loss": 0.0052,
2365
+ "step": 16250
2366
+ },
2367
+ {
2368
+ "epoch": 9.394812680115274,
2369
+ "grad_norm": 0.004157908260822296,
2370
+ "learning_rate": 1.2103746397694525e-06,
2371
+ "loss": 0.016,
2372
+ "step": 16300
2373
+ },
2374
+ {
2375
+ "epoch": 9.423631123919309,
2376
+ "grad_norm": 0.00460004573687911,
2377
+ "learning_rate": 1.1527377521613834e-06,
2378
+ "loss": 0.0248,
2379
+ "step": 16350
2380
+ },
2381
+ {
2382
+ "epoch": 9.452449567723344,
2383
+ "grad_norm": 0.024985365569591522,
2384
+ "learning_rate": 1.0951008645533142e-06,
2385
+ "loss": 0.0312,
2386
+ "step": 16400
2387
+ },
2388
+ {
2389
+ "epoch": 9.481268011527378,
2390
+ "grad_norm": 0.09961481392383575,
2391
+ "learning_rate": 1.0374639769452451e-06,
2392
+ "loss": 0.041,
2393
+ "step": 16450
2394
+ },
2395
+ {
2396
+ "epoch": 9.510086455331413,
2397
+ "grad_norm": 0.004411065485328436,
2398
+ "learning_rate": 9.79827089337176e-07,
2399
+ "loss": 0.0116,
2400
+ "step": 16500
2401
+ },
2402
+ {
2403
+ "epoch": 9.538904899135447,
2404
+ "grad_norm": 0.0155422892421484,
2405
+ "learning_rate": 9.221902017291067e-07,
2406
+ "loss": 0.0178,
2407
+ "step": 16550
2408
+ },
2409
+ {
2410
+ "epoch": 9.56772334293948,
2411
+ "grad_norm": 0.003015684662386775,
2412
+ "learning_rate": 8.645533141210376e-07,
2413
+ "loss": 0.0107,
2414
+ "step": 16600
2415
+ },
2416
+ {
2417
+ "epoch": 9.596541786743515,
2418
+ "grad_norm": 0.17505097389221191,
2419
+ "learning_rate": 8.069164265129684e-07,
2420
+ "loss": 0.0057,
2421
+ "step": 16650
2422
+ },
2423
+ {
2424
+ "epoch": 9.62536023054755,
2425
+ "grad_norm": 0.02643350511789322,
2426
+ "learning_rate": 7.492795389048991e-07,
2427
+ "loss": 0.0131,
2428
+ "step": 16700
2429
+ },
2430
+ {
2431
+ "epoch": 9.654178674351584,
2432
+ "grad_norm": 0.0013237950624898076,
2433
+ "learning_rate": 6.916426512968301e-07,
2434
+ "loss": 0.0009,
2435
+ "step": 16750
2436
+ },
2437
+ {
2438
+ "epoch": 9.682997118155619,
2439
+ "grad_norm": 0.10223102569580078,
2440
+ "learning_rate": 6.340057636887609e-07,
2441
+ "loss": 0.0116,
2442
+ "step": 16800
2443
+ },
2444
+ {
2445
+ "epoch": 9.711815561959654,
2446
+ "grad_norm": 0.018011650070548058,
2447
+ "learning_rate": 5.763688760806917e-07,
2448
+ "loss": 0.0551,
2449
+ "step": 16850
2450
+ },
2451
+ {
2452
+ "epoch": 9.740634005763688,
2453
+ "grad_norm": 0.017454462125897408,
2454
+ "learning_rate": 5.187319884726226e-07,
2455
+ "loss": 0.0011,
2456
+ "step": 16900
2457
+ },
2458
+ {
2459
+ "epoch": 9.769452449567723,
2460
+ "grad_norm": 0.0015755228232592344,
2461
+ "learning_rate": 4.6109510086455333e-07,
2462
+ "loss": 0.013,
2463
+ "step": 16950
2464
+ },
2465
+ {
2466
+ "epoch": 9.798270893371757,
2467
+ "grad_norm": 0.009967944584786892,
2468
+ "learning_rate": 4.034582132564842e-07,
2469
+ "loss": 0.0189,
2470
+ "step": 17000
2471
+ },
2472
+ {
2473
+ "epoch": 9.827089337175792,
2474
+ "grad_norm": 31.352365493774414,
2475
+ "learning_rate": 3.4582132564841505e-07,
2476
+ "loss": 0.0139,
2477
+ "step": 17050
2478
+ },
2479
+ {
2480
+ "epoch": 9.855907780979827,
2481
+ "grad_norm": 0.010829967446625233,
2482
+ "learning_rate": 2.8818443804034586e-07,
2483
+ "loss": 0.0091,
2484
+ "step": 17100
2485
+ },
2486
+ {
2487
+ "epoch": 9.884726224783861,
2488
+ "grad_norm": 0.002866011345759034,
2489
+ "learning_rate": 2.3054755043227666e-07,
2490
+ "loss": 0.0264,
2491
+ "step": 17150
2492
+ },
2493
+ {
2494
+ "epoch": 9.913544668587896,
2495
+ "grad_norm": 0.0031210549641400576,
2496
+ "learning_rate": 1.7291066282420752e-07,
2497
+ "loss": 0.0137,
2498
+ "step": 17200
2499
+ },
2500
+ {
2501
+ "epoch": 9.94236311239193,
2502
+ "grad_norm": 0.020828669890761375,
2503
+ "learning_rate": 1.1527377521613833e-07,
2504
+ "loss": 0.0216,
2505
+ "step": 17250
2506
+ },
2507
+ {
2508
+ "epoch": 9.971181556195965,
2509
+ "grad_norm": 0.13391831517219543,
2510
+ "learning_rate": 5.7636887608069166e-08,
2511
+ "loss": 0.0065,
2512
+ "step": 17300
2513
+ },
2514
+ {
2515
+ "epoch": 10.0,
2516
+ "grad_norm": 0.0037497931625694036,
2517
+ "learning_rate": 0.0,
2518
+ "loss": 0.009,
2519
+ "step": 17350
2520
+ },
2521
+ {
2522
+ "epoch": 10.0,
2523
+ "eval_accuracy": 0.9424989191526156,
2524
+ "eval_loss": 0.4487462341785431,
2525
+ "eval_runtime": 37.4007,
2526
+ "eval_samples_per_second": 185.531,
2527
+ "eval_steps_per_second": 11.604,
2528
+ "step": 17350
2529
+ }
2530
+ ],
2531
+ "logging_steps": 50,
2532
+ "max_steps": 17350,
2533
+ "num_input_tokens_seen": 0,
2534
+ "num_train_epochs": 10,
2535
+ "save_steps": 500,
2536
+ "total_flos": 3.6512244667008e+16,
2537
+ "train_batch_size": 16,
2538
+ "trial_name": null,
2539
+ "trial_params": null
2540
+ }
checkpoint/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5d20cba11007bc1587d687389e1ce5ab5dd1204018c719bc37caf1123313db4
3
+ size 4539
checkpoint/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pandas
2
+ emoji
3
+ json5
4
+ torch==2.0.0
5
+ torchvision
6
+ torchaudio
7
+ tqdm
8
+ torchtext==0.15.1
9
+ scikit-learn
10
+ keras
11
+ underthesea
12
+ tensorflow==2.12
13
+ numpy
14
+ nvidia-cudnn-cu11
15
+ gradio
16
+ transformers