mschonhardt commited on
Commit
2fb888a
·
verified ·
1 Parent(s): 787a92e

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - la
4
+ tags:
5
+ - text2text-generation
6
+ - punctuation-restoration
7
+ - seq2seq
8
+ - latin
9
+ - historical-text
10
+ license: mit
11
+ library_name: transformers
12
+ pipeline_tag: text2text-generation
13
+ base_model: google/mt5-large
14
+ widget:
15
+ - text: "punctuate: gallia est omnis divisa in partes tres quarum unam incolunt belgae aliam aquitani tertiam qui ipsorum lingua celtae nostra galli appellantur"
16
+ example_title: "Caesar (Classical)"
17
+ - text: "punctuate: consilium ad conceptionem mondini bononiensis de leuciis quia ex relatis principio sterilitatis causam fore duplicem horum coniugatorum unam ocultam scilicet disproportionem eorum nobis ignotam cuius remotioni altissimus provideat quia nostrum non est nec posse alicuius artis et aliam manifestam existimo esse complectionem eorum declinare ad frigidum et declinabilem in processu etatis etiam ad frigidum et humidum humiditatem accidentali corporibus eorum est subveniendum triplici instrumento medici declinante ad calidum et siccum quo ad medicinas et ad calidum et humidum quantum ad dictam"
18
+ example_title: "Mondino de' Liuzzi (Medieval Medical)"
19
+ ---
20
+
21
+ # mT5 Latin Punctuator (mt5-large)
22
+
23
+ ## Model Description
24
+
25
+ This model is a fine-tuned version of **[google/mt5-large](https://huggingface.co/google/mt5-large)** designed for **automatic punctuation restoration in Latin text**.
26
+
27
+ It takes unpunctuated Latin text as input and generates a fully punctuated version of the same text, adding sentence boundaries and internal punctuation. The model was optimized for **Classical and Medieval Latin prose** (approx. 400–1500 AD), making it suitable for digital editions and post-processing OCR/ATR outputs.
28
+
29
+ * **Task:** Sequence-to-Sequence Punctuation Restoration
30
+ * **Base Model:** mT5-Large
31
+ * **Language:** Latin (`la`)
32
+ * **Developer:** Michael Schonhardt (TU Darmstadt)
33
+
34
+ > **Note:** This model operates on continuous text streams. While it restores sentence boundaries (`.`, `?`, `!`) and capitalization, it is not designed to predict paragraph breaks or layout features.
35
+
36
+ ---
37
+
38
+ ## Intended Use
39
+
40
+ ### Primary Use Cases
41
+ * **OCR Post-processing:** Restoring punctuation to raw OCR output from early printed books or manuscripts.
42
+ * **NLP Pipeline Preparation:** Pre-formatting Latin text for downstream tasks like Machine Translation or Named Entity Recognition.
43
+ * **Pedagogical Aid:** Helping students or readers navigate raw Latin texts by providing suggested sentence structures.
44
+
45
+ ### Out-of-Scope / Limitations
46
+ * **Not a Critical Editor:** The model makes probabilistic guesses based on training data. In ambiguous cases, it may insert punctuation that disagrees with specific editorial conventions.
47
+ * **Diplomatic Transcription:** The model expects expanded spelling based on normalisation conventions and may struggle with raw diplomatic transcriptions containing heavy abbreviations.
48
+
49
+ ---
50
+
51
+ ## Usage
52
+
53
+ **Important:** The model was trained with the prefix `"punctuate: "` and expects lowercased input. The helper function below handles this automatically.
54
+
55
+ ```python
56
+ import torch
57
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
58
+
59
+ device = "cuda" if torch.cuda.is_available() else "cpu"
60
+
61
+ model_name = "mschonhardt/mt5-latin-punctuator-large"
62
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
63
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name).to(device)
64
+
65
+ def punctuate(text: str) -> str:
66
+ # Preprocessing: Add prefix and lowercase as per training script
67
+ input_text = "punctuate: " + text.lower()
68
+
69
+ inputs = tokenizer(
70
+ input_text,
71
+ return_tensors="pt",
72
+ truncation=True,
73
+ max_length=1024,
74
+ ).to(device)
75
+
76
+ with torch.no_grad():
77
+ output_ids = model.generate(
78
+ **inputs,
79
+ max_length=1024,
80
+ num_beams=4,
81
+ early_stopping=True,
82
+ )
83
+ return tokenizer.decode(output_ids[0], skip_special_tokens=True)
84
+
85
+ # Example usage
86
+ text = "gallia est omnis divisa in partes tres"
87
+ print(punctuate(text))
88
+ # Output: Gallia est omnis divisa in partes tres.
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Training Data
94
+
95
+ The model was trained on a custom dataset derived from the **[Latin Text Archive (LTA)](https://lta.bbaw.de)** as well as data created as part of the **[Burchards Dekret Digital Project](https://burchards-dekret-digital.de)**.
96
+
97
+ ### Data Preparation & Cleaning
98
+ The dataset was processed using the following pipeline:
99
+ 1. **Artifact Removal:** Line number references (e.g., "667 - 668") were removed via regex.
100
+ 2. **Normalization:** Whitespace was normalized to single spaces.
101
+ 3. **Source/Target Formatting:**
102
+ * **Source:** Text was **lowercased**, punctuation (`.,;?!`) was removed, and the prefix `"punctuate: "` was added.
103
+ * **Target:** Original text with case and punctuation preserved.
104
+ 4. **Splitting:** The data was split into **Train**, **Validation**, and **Test** sets using a random seed of 42.
105
+
106
+ ### Data Source & Acknowledgements
107
+ We gratefully acknowledge that the training data originates from the **[Latin Text Archive (LTA)](http://lta.bbaw.de)** (**Prof. Dr. Bernhard Jussen**, **Dr. Tim Geelhaar**) including data from Monumenta Germaniae Historica, Corpus Corporum and IRHT.
108
+
109
+ ---
110
+
111
+ ## Training Procedure
112
+
113
+ The model was fine-tuned on a high-performance compute node using the `transformers` Seq2SeqTrainer.
114
+
115
+ ### Hardware Configuration
116
+ * **GPU:** NVIDIA L40S (45 GB VRAM)
117
+ * **Precision:** `bfloat16` (BF16) mixed precision
118
+ * **Optimizer:** Adafactor
119
+
120
+ ### Hyperparameters
121
+
122
+ | Parameter | Value |
123
+ | :--- | :--- |
124
+ | **Batch Size** | 4 |
125
+ | **Grad Accumulation** | 16 steps |
126
+ | **Effective Batch Size** | 64 |
127
+ | **Learning Rate** | 5e-5 (Linear Decay) |
128
+ | **Max Sequence Length** | 1024 (Source and Target) |
129
+ | **Gradient Checkpointing** | True |
130
+
131
+ ### Training Dynamics
132
+
133
+ **Early Stopping:** Training was stopped at **~1.6 epochs** as validation gains diminished.
134
+
135
+ **Validation Loss Progression:**
136
+
137
+ | Epoch | Validation Loss |
138
+ | :--- | :--- |
139
+ | 0.2 | 0.1448 |
140
+ | 0.6 | 0.1137 |
141
+ | 1.0 | 0.1043 |
142
+ | 1.4 | 0.0982 |
143
+ | **1.6** | **0.0973 (Best)** |
144
+
145
+ ---
146
+
147
+ ## Example Outputs
148
+
149
+ **1. Classical Latin (Caesar)**
150
+ > **Input:** gallia est omnis divisa in partes tres quarum unam incolunt belgae aliam aquitani tertiam qui ipsorum lingua celtae nostra galli appellantur
151
+ >
152
+ > **Output:** Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.
153
+
154
+ **2. Medieval Medical Latin (Mondino de' Liuzzi)**
155
+ > **Input:** Consilium ad conceptionem mondini bononiensis de leuciis quia ex relatis principio sterilitatis causam fore duplicem horum coniugatorum unam ocultam scilicet disproportionem eorum nobis ignotam cuius remotioni altissimus provideat quia nostrum non est nec posse alicuius artis et aliam manifestam existimo esse complectionem eorum declinare ad frigidum et declinabilem in processu etatis etiam ad frigidum et humidum humiditatem accidentali corporibus eorum est subveniendum triplici instrumento medici declinante ad calidum et siccum quo ad medicinas et ad calidum et humidum quantum ad dictam
156
+ >
157
+ > **Output:** Consilium ad conceptionem Mondini Bononiensis de leuciis. Quia ex relatis principio sterilitatis causam fore duplicem horum coniugatorum, unam ocultam, scilicet disproportionem eorum nobis ignotam, cuius remotioni Altissimus provideat, quia nostrum non est nec posse alicuius artis, et aliam manifestam existimo esse complectionem eorum declinare ad frigidum et declinabilem in processu etatis etiam ad frigidum et humidum. Humiditatem accidentali corporibus eorum est subveniendum triplici instrumento medici declinante ad calidum et siccum quo ad medicinas et ad calidum et humidum quantum ad dictam.
158
+
159
+ ---
160
+
161
+ ## Model Development and Funding
162
+
163
+ This model was developed by Michael Schonhardt as part of the **Digital Editing Toolkit**.
164
+
165
+ **Affiliation:**
166
+ [Fachgebiet Digitale Editorik und Kulturgeschichte des Mittelalters](https://www.geschichte.tu-darmstadt.de/)
167
+ (Digital Editing and Cultural History of the Middle Ages)
168
+ **Technische Universität Darmstadt** *In cooperation with the Academy of Sciences and Literature | Mainz*
169
+
170
+ **Funding:**
171
+ The development was funded by the **Hessian Ministry of Higher Education, Research, Science and the Arts (HMWK)** within the **LOEWE Exploration** project: *"Embedding the Past"*.
172
+
173
+ The project focuses on developing transparent and responsible AI methods for the semantic analysis and editorial processing of historical documents.
174
+
175
+ ---
176
+
177
+ ## Citation
178
+
179
+ If you use this model in your research, please cite it as follows:
180
+
181
+ ```bibtex
182
+ @misc{schonhardt-2025-latin-punctuator,
183
+ author = {Schonhardt, Michael},
184
+ title = {mT5 Latin Punctuator (mt5-large)},
185
+ year = {2025},
186
+ publisher = {Hugging Face},
187
+ howpublished = {\url{[https://huggingface.co/YOUR_USERNAME/mt5-latin-punctuator-large](https://huggingface.co/YOUR_USERNAME/mt5-latin-punctuator-large)}},
188
+ note = {Part of the LOEWE Exploration 'Embedding the Past'. Data provided by LTA}
189
+ }
190
+ ```
191
+
192
+ Please also cite the original mT5 paper:
193
+
194
+ ```bibtex
195
+ @inproceedings{xue-etal-2021-mt5,
196
+ title = "m{T}5: A Massively Multilingual Pre-trained Text-to-Text Transformer",
197
+ author = "Xue, Linting and
198
+ Constant, Noah and
199
+ Roberts, Adam and
200
+ Kale, Mihir and
201
+ Al-Rfou, Rami and
202
+ Siddhant, Aditya and
203
+ Barua, Aditya and
204
+ Raffel, Colin",
205
+ editor = "Toutanova, Kristina and
206
+ Rumshisky, Anna and
207
+ Zettlemoyer, Luke and
208
+ Hakkani-Tur, Dilek and
209
+ Beltagy, Iz and
210
+ Bethard, Steven and
211
+ Cotterell, Ryan and
212
+ Chakraborty, Tanmoy and
213
+ Zhou, Yichao",
214
+ booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
215
+ month = jun,
216
+ year = "2021",
217
+ address = "Online",
218
+ publisher = "Association for Computational Linguistics",
219
+ url = "https://aclanthology.org/2021.naacl-main.41/",
220
+ doi = "10.18653/v1/2021.naacl-main.41",
221
+ pages = "483--498"
222
+
223
+ }
224
+ ```
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MT5ForConditionalGeneration"
4
+ ],
5
+ "classifier_dropout": 0.0,
6
+ "d_ff": 2816,
7
+ "d_kv": 64,
8
+ "d_model": 1024,
9
+ "decoder_start_token_id": 0,
10
+ "dense_act_fn": "gelu_new",
11
+ "dropout_rate": 0.1,
12
+ "dtype": "float32",
13
+ "eos_token_id": 1,
14
+ "feed_forward_proj": "gated-gelu",
15
+ "initializer_factor": 1.0,
16
+ "is_encoder_decoder": true,
17
+ "is_gated_act": true,
18
+ "layer_norm_epsilon": 1e-06,
19
+ "model_type": "mt5",
20
+ "num_decoder_layers": 24,
21
+ "num_heads": 16,
22
+ "num_layers": 24,
23
+ "output_past": true,
24
+ "pad_token_id": 0,
25
+ "relative_attention_max_distance": 128,
26
+ "relative_attention_num_buckets": 32,
27
+ "tie_word_embeddings": false,
28
+ "tokenizer_class": "T5Tokenizer",
29
+ "transformers_version": "4.57.3",
30
+ "use_cache": true,
31
+ "vocab_size": 250112
32
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "decoder_start_token_id": 0,
4
+ "eos_token_id": [
5
+ 1
6
+ ],
7
+ "pad_token_id": 0,
8
+ "transformers_version": "4.57.3"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b705a9a1866adee4c6cfb64188963ce71d95beca0efed65dc0d0b4188e1f61fa
3
+ size 4918393736
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d8283ad3820fe2debd6a0d0d38dc8cefcc57c9ad80c6c789badc9a4d90627e9
3
+ size 7521587
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:723ee72669283e1fa704467f831a4cfbf3f4a1a570dcc070291e8cf4ee042a12
3
+ size 14645
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e356711d012b62f57d5b6cac0c8d9d7f255705a52bc3309afc8bd788c08088fc
3
+ size 1465
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": {
3
+ "content": "</s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "pad_token": {
10
+ "content": "<pad>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef78f86560d809067d12bac6c09f19a462cb3af3f54d2b8acbba26e1433125d6
3
+ size 4309802
tokenizer_config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<pad>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "</s>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "<unk>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [],
30
+ "clean_up_tokenization_spaces": false,
31
+ "eos_token": "</s>",
32
+ "extra_ids": 0,
33
+ "extra_special_tokens": {},
34
+ "legacy": true,
35
+ "model_max_length": 1000000000000000019884624838656,
36
+ "pad_token": "<pad>",
37
+ "sp_model_kwargs": {},
38
+ "tokenizer_class": "T5Tokenizer",
39
+ "unk_token": "<unk>"
40
+ }
trainer_state.json ADDED
@@ -0,0 +1,658 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 8000,
3
+ "best_metric": 0.09730422496795654,
4
+ "best_model_checkpoint": "./mt5_latin_punctuator_large/checkpoint-8000",
5
+ "epoch": 1.6045835213880948,
6
+ "eval_steps": 1000,
7
+ "global_step": 8000,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.020059174564966652,
14
+ "grad_norm": 13.09343147277832,
15
+ "learning_rate": 4.9669073405535504e-05,
16
+ "loss": 15.4848,
17
+ "step": 100
18
+ },
19
+ {
20
+ "epoch": 0.040118349129933305,
21
+ "grad_norm": 0.4526735842227936,
22
+ "learning_rate": 4.9334804118197625e-05,
23
+ "loss": 0.66,
24
+ "step": 200
25
+ },
26
+ {
27
+ "epoch": 0.060177523694899954,
28
+ "grad_norm": 0.4390902817249298,
29
+ "learning_rate": 4.900053483085975e-05,
30
+ "loss": 0.385,
31
+ "step": 300
32
+ },
33
+ {
34
+ "epoch": 0.08023669825986661,
35
+ "grad_norm": 0.3624674677848816,
36
+ "learning_rate": 4.866626554352187e-05,
37
+ "loss": 0.3017,
38
+ "step": 400
39
+ },
40
+ {
41
+ "epoch": 0.10029587282483325,
42
+ "grad_norm": 0.2848065197467804,
43
+ "learning_rate": 4.833199625618399e-05,
44
+ "loss": 0.2648,
45
+ "step": 500
46
+ },
47
+ {
48
+ "epoch": 0.12035504738979991,
49
+ "grad_norm": 0.2836224138736725,
50
+ "learning_rate": 4.7997726968846105e-05,
51
+ "loss": 0.2419,
52
+ "step": 600
53
+ },
54
+ {
55
+ "epoch": 0.14041422195476655,
56
+ "grad_norm": 0.3000536561012268,
57
+ "learning_rate": 4.7663457681508226e-05,
58
+ "loss": 0.2238,
59
+ "step": 700
60
+ },
61
+ {
62
+ "epoch": 0.16047339651973322,
63
+ "grad_norm": 0.6995307803153992,
64
+ "learning_rate": 4.732918839417035e-05,
65
+ "loss": 0.2157,
66
+ "step": 800
67
+ },
68
+ {
69
+ "epoch": 0.18053257108469986,
70
+ "grad_norm": 0.1916164755821228,
71
+ "learning_rate": 4.699491910683247e-05,
72
+ "loss": 0.2061,
73
+ "step": 900
74
+ },
75
+ {
76
+ "epoch": 0.2005917456496665,
77
+ "grad_norm": 0.3005019426345825,
78
+ "learning_rate": 4.666064981949459e-05,
79
+ "loss": 0.2001,
80
+ "step": 1000
81
+ },
82
+ {
83
+ "epoch": 0.2005917456496665,
84
+ "eval_loss": 0.1447821706533432,
85
+ "eval_runtime": 687.5913,
86
+ "eval_samples_per_second": 25.778,
87
+ "eval_steps_per_second": 6.446,
88
+ "step": 1000
89
+ },
90
+ {
91
+ "epoch": 0.22065092021463317,
92
+ "grad_norm": 0.34013351798057556,
93
+ "learning_rate": 4.632638053215671e-05,
94
+ "loss": 0.1911,
95
+ "step": 1100
96
+ },
97
+ {
98
+ "epoch": 0.24071009477959981,
99
+ "grad_norm": 0.19066131114959717,
100
+ "learning_rate": 4.5992111244818834e-05,
101
+ "loss": 0.1868,
102
+ "step": 1200
103
+ },
104
+ {
105
+ "epoch": 0.26076926934456646,
106
+ "grad_norm": 0.1935589760541916,
107
+ "learning_rate": 4.565784195748095e-05,
108
+ "loss": 0.1828,
109
+ "step": 1300
110
+ },
111
+ {
112
+ "epoch": 0.2808284439095331,
113
+ "grad_norm": 0.31047841906547546,
114
+ "learning_rate": 4.532357267014307e-05,
115
+ "loss": 0.1798,
116
+ "step": 1400
117
+ },
118
+ {
119
+ "epoch": 0.3008876184744998,
120
+ "grad_norm": 0.24223153293132782,
121
+ "learning_rate": 4.498930338280519e-05,
122
+ "loss": 0.1751,
123
+ "step": 1500
124
+ },
125
+ {
126
+ "epoch": 0.32094679303946644,
127
+ "grad_norm": 1.5393741130828857,
128
+ "learning_rate": 4.465503409546731e-05,
129
+ "loss": 0.1704,
130
+ "step": 1600
131
+ },
132
+ {
133
+ "epoch": 0.3410059676044331,
134
+ "grad_norm": 0.21514640748500824,
135
+ "learning_rate": 4.4320764808129435e-05,
136
+ "loss": 0.1689,
137
+ "step": 1700
138
+ },
139
+ {
140
+ "epoch": 0.3610651421693997,
141
+ "grad_norm": 0.17480678856372833,
142
+ "learning_rate": 4.3986495520791556e-05,
143
+ "loss": 0.1664,
144
+ "step": 1800
145
+ },
146
+ {
147
+ "epoch": 0.38112431673436636,
148
+ "grad_norm": 0.1928788721561432,
149
+ "learning_rate": 4.365222623345368e-05,
150
+ "loss": 0.1646,
151
+ "step": 1900
152
+ },
153
+ {
154
+ "epoch": 0.401183491299333,
155
+ "grad_norm": 0.20150336623191833,
156
+ "learning_rate": 4.331795694611579e-05,
157
+ "loss": 0.1616,
158
+ "step": 2000
159
+ },
160
+ {
161
+ "epoch": 0.401183491299333,
162
+ "eval_loss": 0.11908746510744095,
163
+ "eval_runtime": 687.2579,
164
+ "eval_samples_per_second": 25.791,
165
+ "eval_steps_per_second": 6.449,
166
+ "step": 2000
167
+ },
168
+ {
169
+ "epoch": 0.4212426658642997,
170
+ "grad_norm": 0.17183753848075867,
171
+ "learning_rate": 4.2983687658777914e-05,
172
+ "loss": 0.1632,
173
+ "step": 2100
174
+ },
175
+ {
176
+ "epoch": 0.44130184042926635,
177
+ "grad_norm": 0.2742299735546112,
178
+ "learning_rate": 4.2649418371440035e-05,
179
+ "loss": 0.1578,
180
+ "step": 2200
181
+ },
182
+ {
183
+ "epoch": 0.461361014994233,
184
+ "grad_norm": 0.22588330507278442,
185
+ "learning_rate": 4.231514908410216e-05,
186
+ "loss": 0.1563,
187
+ "step": 2300
188
+ },
189
+ {
190
+ "epoch": 0.48142018955919963,
191
+ "grad_norm": 0.25857874751091003,
192
+ "learning_rate": 4.198087979676428e-05,
193
+ "loss": 0.1536,
194
+ "step": 2400
195
+ },
196
+ {
197
+ "epoch": 0.5014793641241663,
198
+ "grad_norm": 0.2725016474723816,
199
+ "learning_rate": 4.16466105094264e-05,
200
+ "loss": 0.155,
201
+ "step": 2500
202
+ },
203
+ {
204
+ "epoch": 0.5215385386891329,
205
+ "grad_norm": 0.14976142346858978,
206
+ "learning_rate": 4.131234122208852e-05,
207
+ "loss": 0.1507,
208
+ "step": 2600
209
+ },
210
+ {
211
+ "epoch": 0.5415977132540996,
212
+ "grad_norm": 0.16467268764972687,
213
+ "learning_rate": 4.0978071934750636e-05,
214
+ "loss": 0.1505,
215
+ "step": 2700
216
+ },
217
+ {
218
+ "epoch": 0.5616568878190662,
219
+ "grad_norm": 0.16063468158245087,
220
+ "learning_rate": 4.064380264741276e-05,
221
+ "loss": 0.147,
222
+ "step": 2800
223
+ },
224
+ {
225
+ "epoch": 0.581716062384033,
226
+ "grad_norm": 0.23703046143054962,
227
+ "learning_rate": 4.030953336007488e-05,
228
+ "loss": 0.1445,
229
+ "step": 2900
230
+ },
231
+ {
232
+ "epoch": 0.6017752369489996,
233
+ "grad_norm": 0.194139301776886,
234
+ "learning_rate": 3.9975264072737e-05,
235
+ "loss": 0.1444,
236
+ "step": 3000
237
+ },
238
+ {
239
+ "epoch": 0.6017752369489996,
240
+ "eval_loss": 0.11365870386362076,
241
+ "eval_runtime": 687.3052,
242
+ "eval_samples_per_second": 25.789,
243
+ "eval_steps_per_second": 6.448,
244
+ "step": 3000
245
+ },
246
+ {
247
+ "epoch": 0.6218344115139662,
248
+ "grad_norm": 0.2936673164367676,
249
+ "learning_rate": 3.964099478539912e-05,
250
+ "loss": 0.1443,
251
+ "step": 3100
252
+ },
253
+ {
254
+ "epoch": 0.6418935860789329,
255
+ "grad_norm": 0.15139873325824738,
256
+ "learning_rate": 3.9306725498061244e-05,
257
+ "loss": 0.1415,
258
+ "step": 3200
259
+ },
260
+ {
261
+ "epoch": 0.6619527606438995,
262
+ "grad_norm": 0.22842614352703094,
263
+ "learning_rate": 3.8972456210723365e-05,
264
+ "loss": 0.141,
265
+ "step": 3300
266
+ },
267
+ {
268
+ "epoch": 0.6820119352088662,
269
+ "grad_norm": 0.17998695373535156,
270
+ "learning_rate": 3.863818692338548e-05,
271
+ "loss": 0.1423,
272
+ "step": 3400
273
+ },
274
+ {
275
+ "epoch": 0.7020711097738328,
276
+ "grad_norm": 0.18952590227127075,
277
+ "learning_rate": 3.83039176360476e-05,
278
+ "loss": 0.1388,
279
+ "step": 3500
280
+ },
281
+ {
282
+ "epoch": 0.7221302843387994,
283
+ "grad_norm": 0.11938633769750595,
284
+ "learning_rate": 3.796964834870972e-05,
285
+ "loss": 0.1378,
286
+ "step": 3600
287
+ },
288
+ {
289
+ "epoch": 0.7421894589037661,
290
+ "grad_norm": 0.1671166867017746,
291
+ "learning_rate": 3.7635379061371845e-05,
292
+ "loss": 0.1389,
293
+ "step": 3700
294
+ },
295
+ {
296
+ "epoch": 0.7622486334687327,
297
+ "grad_norm": 0.1272394061088562,
298
+ "learning_rate": 3.7301109774033966e-05,
299
+ "loss": 0.1362,
300
+ "step": 3800
301
+ },
302
+ {
303
+ "epoch": 0.7823078080336994,
304
+ "grad_norm": 0.19626741111278534,
305
+ "learning_rate": 3.696684048669609e-05,
306
+ "loss": 0.1377,
307
+ "step": 3900
308
+ },
309
+ {
310
+ "epoch": 0.802366982598666,
311
+ "grad_norm": 0.3008900284767151,
312
+ "learning_rate": 3.663257119935821e-05,
313
+ "loss": 0.1347,
314
+ "step": 4000
315
+ },
316
+ {
317
+ "epoch": 0.802366982598666,
318
+ "eval_loss": 0.10825913399457932,
319
+ "eval_runtime": 687.2417,
320
+ "eval_samples_per_second": 25.792,
321
+ "eval_steps_per_second": 6.449,
322
+ "step": 4000
323
+ },
324
+ {
325
+ "epoch": 0.8224261571636328,
326
+ "grad_norm": 0.45567601919174194,
327
+ "learning_rate": 3.6298301912020324e-05,
328
+ "loss": 0.1363,
329
+ "step": 4100
330
+ },
331
+ {
332
+ "epoch": 0.8424853317285994,
333
+ "grad_norm": 0.17759402096271515,
334
+ "learning_rate": 3.5964032624682446e-05,
335
+ "loss": 0.1358,
336
+ "step": 4200
337
+ },
338
+ {
339
+ "epoch": 0.862544506293566,
340
+ "grad_norm": 0.15186358988285065,
341
+ "learning_rate": 3.562976333734457e-05,
342
+ "loss": 0.1365,
343
+ "step": 4300
344
+ },
345
+ {
346
+ "epoch": 0.8826036808585327,
347
+ "grad_norm": 0.20942702889442444,
348
+ "learning_rate": 3.529549405000669e-05,
349
+ "loss": 0.1341,
350
+ "step": 4400
351
+ },
352
+ {
353
+ "epoch": 0.9026628554234993,
354
+ "grad_norm": 0.37031808495521545,
355
+ "learning_rate": 3.496122476266881e-05,
356
+ "loss": 0.1325,
357
+ "step": 4500
358
+ },
359
+ {
360
+ "epoch": 0.922722029988466,
361
+ "grad_norm": 0.13902556896209717,
362
+ "learning_rate": 3.462695547533093e-05,
363
+ "loss": 0.1305,
364
+ "step": 4600
365
+ },
366
+ {
367
+ "epoch": 0.9427812045534326,
368
+ "grad_norm": 0.48744386434555054,
369
+ "learning_rate": 3.429268618799305e-05,
370
+ "loss": 0.1315,
371
+ "step": 4700
372
+ },
373
+ {
374
+ "epoch": 0.9628403791183993,
375
+ "grad_norm": 0.164585679769516,
376
+ "learning_rate": 3.395841690065517e-05,
377
+ "loss": 0.1307,
378
+ "step": 4800
379
+ },
380
+ {
381
+ "epoch": 0.9828995536833659,
382
+ "grad_norm": 0.2665926218032837,
383
+ "learning_rate": 3.362414761331729e-05,
384
+ "loss": 0.1295,
385
+ "step": 4900
386
+ },
387
+ {
388
+ "epoch": 1.0028082844390953,
389
+ "grad_norm": 0.16074395179748535,
390
+ "learning_rate": 3.328987832597941e-05,
391
+ "loss": 0.1285,
392
+ "step": 5000
393
+ },
394
+ {
395
+ "epoch": 1.0028082844390953,
396
+ "eval_loss": 0.1043267473578453,
397
+ "eval_runtime": 687.1542,
398
+ "eval_samples_per_second": 25.795,
399
+ "eval_steps_per_second": 6.45,
400
+ "step": 5000
401
+ },
402
+ {
403
+ "epoch": 1.022867459004062,
404
+ "grad_norm": 0.20015545189380646,
405
+ "learning_rate": 3.295560903864153e-05,
406
+ "loss": 0.1275,
407
+ "step": 5100
408
+ },
409
+ {
410
+ "epoch": 1.0429266335690286,
411
+ "grad_norm": 0.13576115667819977,
412
+ "learning_rate": 3.2621339751303654e-05,
413
+ "loss": 0.1269,
414
+ "step": 5200
415
+ },
416
+ {
417
+ "epoch": 1.0629858081339953,
418
+ "grad_norm": 0.12735939025878906,
419
+ "learning_rate": 3.2287070463965776e-05,
420
+ "loss": 0.1265,
421
+ "step": 5300
422
+ },
423
+ {
424
+ "epoch": 1.0830449826989619,
425
+ "grad_norm": 0.13942281901836395,
426
+ "learning_rate": 3.19528011766279e-05,
427
+ "loss": 0.1264,
428
+ "step": 5400
429
+ },
430
+ {
431
+ "epoch": 1.1031041572639286,
432
+ "grad_norm": 0.15262341499328613,
433
+ "learning_rate": 3.161853188929001e-05,
434
+ "loss": 0.1253,
435
+ "step": 5500
436
+ },
437
+ {
438
+ "epoch": 1.1231633318288952,
439
+ "grad_norm": 0.1289774477481842,
440
+ "learning_rate": 3.1284262601952133e-05,
441
+ "loss": 0.1252,
442
+ "step": 5600
443
+ },
444
+ {
445
+ "epoch": 1.143222506393862,
446
+ "grad_norm": 0.13571390509605408,
447
+ "learning_rate": 3.0949993314614255e-05,
448
+ "loss": 0.1239,
449
+ "step": 5700
450
+ },
451
+ {
452
+ "epoch": 1.1632816809588284,
453
+ "grad_norm": 0.13661526143550873,
454
+ "learning_rate": 3.0615724027276377e-05,
455
+ "loss": 0.125,
456
+ "step": 5800
457
+ },
458
+ {
459
+ "epoch": 1.1833408555237952,
460
+ "grad_norm": 0.20611687004566193,
461
+ "learning_rate": 3.0281454739938498e-05,
462
+ "loss": 0.1242,
463
+ "step": 5900
464
+ },
465
+ {
466
+ "epoch": 1.203400030088762,
467
+ "grad_norm": 0.12380609661340714,
468
+ "learning_rate": 2.994718545260062e-05,
469
+ "loss": 0.1231,
470
+ "step": 6000
471
+ },
472
+ {
473
+ "epoch": 1.203400030088762,
474
+ "eval_loss": 0.10073110461235046,
475
+ "eval_runtime": 687.1346,
476
+ "eval_samples_per_second": 25.796,
477
+ "eval_steps_per_second": 6.45,
478
+ "step": 6000
479
+ },
480
+ {
481
+ "epoch": 1.2234592046537285,
482
+ "grad_norm": 0.1408674120903015,
483
+ "learning_rate": 2.9612916165262738e-05,
484
+ "loss": 0.1245,
485
+ "step": 6100
486
+ },
487
+ {
488
+ "epoch": 1.2435183792186952,
489
+ "grad_norm": 0.14142949879169464,
490
+ "learning_rate": 2.927864687792486e-05,
491
+ "loss": 0.1218,
492
+ "step": 6200
493
+ },
494
+ {
495
+ "epoch": 1.2635775537836618,
496
+ "grad_norm": 0.13047949969768524,
497
+ "learning_rate": 2.894437759058698e-05,
498
+ "loss": 0.121,
499
+ "step": 6300
500
+ },
501
+ {
502
+ "epoch": 1.2836367283486285,
503
+ "grad_norm": 5.7425217628479,
504
+ "learning_rate": 2.86101083032491e-05,
505
+ "loss": 0.1207,
506
+ "step": 6400
507
+ },
508
+ {
509
+ "epoch": 1.303695902913595,
510
+ "grad_norm": 0.28052738308906555,
511
+ "learning_rate": 2.827583901591122e-05,
512
+ "loss": 0.12,
513
+ "step": 6500
514
+ },
515
+ {
516
+ "epoch": 1.3237550774785618,
517
+ "grad_norm": 0.13514311611652374,
518
+ "learning_rate": 2.7941569728573342e-05,
519
+ "loss": 0.1199,
520
+ "step": 6600
521
+ },
522
+ {
523
+ "epoch": 1.3438142520435283,
524
+ "grad_norm": 0.14283640682697296,
525
+ "learning_rate": 2.7607300441235463e-05,
526
+ "loss": 0.1197,
527
+ "step": 6700
528
+ },
529
+ {
530
+ "epoch": 1.363873426608495,
531
+ "grad_norm": 0.14133544266223907,
532
+ "learning_rate": 2.727303115389758e-05,
533
+ "loss": 0.1201,
534
+ "step": 6800
535
+ },
536
+ {
537
+ "epoch": 1.3839326011734618,
538
+ "grad_norm": 0.20595553517341614,
539
+ "learning_rate": 2.6938761866559703e-05,
540
+ "loss": 0.1213,
541
+ "step": 6900
542
+ },
543
+ {
544
+ "epoch": 1.4039917757384284,
545
+ "grad_norm": 0.133372962474823,
546
+ "learning_rate": 2.6604492579221825e-05,
547
+ "loss": 0.118,
548
+ "step": 7000
549
+ },
550
+ {
551
+ "epoch": 1.4039917757384284,
552
+ "eval_loss": 0.09819206595420837,
553
+ "eval_runtime": 687.1022,
554
+ "eval_samples_per_second": 25.797,
555
+ "eval_steps_per_second": 6.45,
556
+ "step": 7000
557
+ },
558
+ {
559
+ "epoch": 1.424050950303395,
560
+ "grad_norm": 0.21542303264141083,
561
+ "learning_rate": 2.6270223291883943e-05,
562
+ "loss": 0.1215,
563
+ "step": 7100
564
+ },
565
+ {
566
+ "epoch": 1.4441101248683617,
567
+ "grad_norm": 0.24275696277618408,
568
+ "learning_rate": 2.5935954004546064e-05,
569
+ "loss": 0.1187,
570
+ "step": 7200
571
+ },
572
+ {
573
+ "epoch": 1.4641692994333284,
574
+ "grad_norm": 0.14183971285820007,
575
+ "learning_rate": 2.5601684717208186e-05,
576
+ "loss": 0.1173,
577
+ "step": 7300
578
+ },
579
+ {
580
+ "epoch": 1.484228473998295,
581
+ "grad_norm": 0.11123021692037582,
582
+ "learning_rate": 2.5267415429870307e-05,
583
+ "loss": 0.1167,
584
+ "step": 7400
585
+ },
586
+ {
587
+ "epoch": 1.5042876485632615,
588
+ "grad_norm": 0.1129390299320221,
589
+ "learning_rate": 2.4933146142532426e-05,
590
+ "loss": 0.1196,
591
+ "step": 7500
592
+ },
593
+ {
594
+ "epoch": 1.5243468231282282,
595
+ "grad_norm": 0.1165638417005539,
596
+ "learning_rate": 2.4598876855194547e-05,
597
+ "loss": 0.1186,
598
+ "step": 7600
599
+ },
600
+ {
601
+ "epoch": 1.544405997693195,
602
+ "grad_norm": 0.3278215527534485,
603
+ "learning_rate": 2.426460756785667e-05,
604
+ "loss": 0.1161,
605
+ "step": 7700
606
+ },
607
+ {
608
+ "epoch": 1.5644651722581617,
609
+ "grad_norm": 0.2158752679824829,
610
+ "learning_rate": 2.3930338280518787e-05,
611
+ "loss": 0.1184,
612
+ "step": 7800
613
+ },
614
+ {
615
+ "epoch": 1.5845243468231283,
616
+ "grad_norm": 0.16784250736236572,
617
+ "learning_rate": 2.3596068993180908e-05,
618
+ "loss": 0.118,
619
+ "step": 7900
620
+ },
621
+ {
622
+ "epoch": 1.6045835213880948,
623
+ "grad_norm": 0.16192170977592468,
624
+ "learning_rate": 2.326179970584303e-05,
625
+ "loss": 0.1154,
626
+ "step": 8000
627
+ },
628
+ {
629
+ "epoch": 1.6045835213880948,
630
+ "eval_loss": 0.09730422496795654,
631
+ "eval_runtime": 687.1621,
632
+ "eval_samples_per_second": 25.794,
633
+ "eval_steps_per_second": 6.45,
634
+ "step": 8000
635
+ }
636
+ ],
637
+ "logging_steps": 100,
638
+ "max_steps": 14958,
639
+ "num_input_tokens_seen": 0,
640
+ "num_train_epochs": 3,
641
+ "save_steps": 1000,
642
+ "stateful_callbacks": {
643
+ "TrainerControl": {
644
+ "args": {
645
+ "should_epoch_stop": false,
646
+ "should_evaluate": false,
647
+ "should_log": false,
648
+ "should_save": true,
649
+ "should_training_stop": false
650
+ },
651
+ "attributes": {}
652
+ }
653
+ },
654
+ "total_flos": 1.5259044426479616e+18,
655
+ "train_batch_size": 4,
656
+ "trial_name": null,
657
+ "trial_params": null
658
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f6822618a8e3b7538b9ad49376197658aa70f04f45dd2330d4aa34463a6e5fb
3
+ size 5969