Translation
Transformers
Safetensors
Akkadian
English
umt5
text2text-generation
multilingual
ancient-languages
akkadian
Eval Results (legacy)
Instructions to use Thalesian/AKK_300m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thalesian/AKK_300m with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Thalesian/AKK_300m")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Thalesian/AKK_300m") model = AutoModelForSeq2SeqLM.from_pretrained("Thalesian/AKK_300m") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,199 +1,187 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
|
|
|
| 7 |
|
| 8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
-
##
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
### Model Sources [optional]
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
#
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
|
|
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
[
|
| 51 |
|
| 52 |
-
###
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
##
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
##
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
-
##
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 100 |
-
|
| 101 |
-
[More Information Needed]
|
| 102 |
-
|
| 103 |
-
## Evaluation
|
| 104 |
-
|
| 105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 106 |
-
|
| 107 |
-
### Testing Data, Factors & Metrics
|
| 108 |
-
|
| 109 |
-
#### Testing Data
|
| 110 |
-
|
| 111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
-
|
| 199 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- translation
|
| 6 |
+
- multilingual
|
| 7 |
+
- ancient-languages
|
| 8 |
+
- akkadian
|
| 9 |
+
language:
|
| 10 |
+
- akk
|
| 11 |
+
- en
|
| 12 |
+
model-index:
|
| 13 |
+
- name: AKK-300m
|
| 14 |
+
results:
|
| 15 |
+
- task:
|
| 16 |
+
type: translation
|
| 17 |
+
name: "Akkadian (Cuneiform) → English (Latin)"
|
| 18 |
+
metrics:
|
| 19 |
+
- name: bleu
|
| 20 |
+
type: bleu
|
| 21 |
+
value: 70.35
|
| 22 |
+
- task:
|
| 23 |
+
type: translation
|
| 24 |
+
name: "Akkadian (Transliteration) → English (Latin)"
|
| 25 |
+
metrics:
|
| 26 |
+
- name: bleu
|
| 27 |
+
type: bleu
|
| 28 |
+
value: 73.18
|
| 29 |
+
- task:
|
| 30 |
+
type: transliteration
|
| 31 |
+
name: "Akkadian (Cuneiform) → Akkadian (Transliteration)"
|
| 32 |
+
metrics:
|
| 33 |
+
- name: bleu
|
| 34 |
+
type: bleu
|
| 35 |
+
value: 85.43
|
| 36 |
+
- task:
|
| 37 |
+
type: translation
|
| 38 |
+
name: "English (Latin) → Akkadian (Transliteration)"
|
| 39 |
+
metrics:
|
| 40 |
+
- name: bleu
|
| 41 |
+
type: bleu
|
| 42 |
+
value: 41.80
|
| 43 |
+
- task:
|
| 44 |
+
type: translation
|
| 45 |
+
name: "English (Latin) → Akkadian (Cuneiform)"
|
| 46 |
+
metrics:
|
| 47 |
+
- name: bleu
|
| 48 |
+
type: bleu
|
| 49 |
+
value: 45.23
|
| 50 |
---
|
| 51 |
|
| 52 |
+
# AKK-300m
|
| 53 |
+
Introducing AKK-300m, a model capable of handling a diverse number of cuneiform translation, transliteration, and correction tasks.
|
| 54 |
|
|
|
|
| 55 |
|
| 56 |
+
## 1. Model description
|
| 57 |
|
| 58 |
+
This is an instruct model, meaning it is capable of multiple tasks. It is intended primarily for translation + transliteration, but it can also be used for reverse translation as well.
|
| 59 |
|
| 60 |
+
### Translation Instructions:
|
| 61 |
|
| 62 |
+
* "Translate Akkadian cuneiform to English" + cuneiform signs → English
|
| 63 |
+
* "Translate complex Akkadian transliteration to English" + complex transliteration → English
|
| 64 |
+
* "Translate Akkadian simple transliteration to English" + simple transliteration → English
|
| 65 |
+
* "Translate Akkadian grouped transliteration to English" + transliteration with special symbols → English
|
| 66 |
+
* "Translate English to Akkadian cuneiform" + English → Akkadian cuneiform signs
|
| 67 |
+
* "Translate English to simple Akkadian transliteration" + English → Akkadian simple transliteration with no special symbols
|
| 68 |
+
* "Translate English to grouped Akkadian transliteration" + English → Akkadian transliteration grouped into words with special symbols
|
| 69 |
|
| 70 |
+
### Transliteration Instructions:
|
| 71 |
|
| 72 |
+
* "Transliterate Akkadian cuneiform to simple Latin Characters" + cuneiform signs → transliteration with no special symbols
|
| 73 |
+
* "Transliterate Akkadian cuneiform to grouped Latin characters" + cuneiform signs → transliteration with special symbols/subscripts
|
| 74 |
+
* "Group Akkadian transliteration into likely words" + simple transliteration → transliteration with special symbols/subscripts
|
| 75 |
|
| 76 |
+
### Mising Sign Insructions:
|
| 77 |
+
* 'Identify the missing signs: ' + string of Akkadian cuneiform, transliterations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
|
|
|
| 79 |
|
| 80 |
+
### Base model
|
| 81 |
|
| 82 |
+
This is a finetuned version of [google's umt5-small](https://huggingface.co/google/umt5-small).
|
|
|
|
|
|
|
| 83 |
|
| 84 |
+
## 2. Usage (code snippet)
|
| 85 |
|
| 86 |
+
```python
|
| 87 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 88 |
+
model_path = "Thalesian/AKK-300m"
|
| 89 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False, local_files_only=True)
|
| 90 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
| 91 |
|
| 92 |
+
# 1) Prepare your cuneiform input
|
| 93 |
+
prompt = "Translate Akkadian cuneiform to English: "
|
| 94 |
+
input_text = "𒄨 𒃼 𒁺 𒊭 𒀸 𒌅 𒆰 𒋾 𒀸 𒋩 𒂗 𒋙 𒆰 𒆳 𒆷 𒈠 𒄀 𒊑 𒋗 𒁶 𒋻 𒁁 𒋾 𒌑 𒁖 𒆥 𒄣 𒀀 𒁍 𒄫 𒄑 𒁍 𒉡 𒈠 𒍣 𒆥 𒆧 𒅎 𒉡 𒌋 "
|
| 95 |
|
| 96 |
+
# 2) Tokenize & get model outputs
|
| 97 |
+
inputs = tokenizer(prompt + input_text, return_tensors="pt")
|
| 98 |
+
outputs = model.generate(**inputs, max_length=64)
|
| 99 |
|
| 100 |
+
# 3) Decode prediction
|
| 101 |
+
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 102 |
|
| 103 |
+
print("Reference:", "young man valiant who through help assur lord all of not submissive one like a pottery bowl crush minutely like a flood flatten as nothing count")
|
| 104 |
+
print("Prediction:", prediction)
|
| 105 |
+
```
|
| 106 |
|
| 107 |
+
## 3. Training and evaluation data
|
| 108 |
|
| 109 |
+
Data was used from the [Akkademia project](https://github.com/gaigutherz/Akkademia), previously published in [PNAS Nexus](https://academic.oup.com/pnasnexus/article/2/5/pgad096/7147349). Additional data for pre-training and training came from [CDLI Akkadian](https://www.cdli.earth) data. More information on the training data, as well as the test and validation splits, can be found on both the GitHub and published methodology.
|
| 110 |
|
| 111 |
+
### Training procedure
|
| 112 |
|
| 113 |
+
It was trained in 5 tranches with different datasets and collators:
|
| 114 |
|
| 115 |
+
* a pretraining dataset (transliterations only) of CDLI transliterated data (389,834 lines) and Akkademia + CDLI translated data (126,649 lines)
|
| 116 |
+
* a training dataset which included Akkademia and CDLI (126,649 lines)
|
| 117 |
|
| 118 |
+
And 3 different collation methods:
|
| 119 |
|
| 120 |
+
* pretraining collation which introduces an asterisk to represent missing signs
|
| 121 |
+
* missing sign translations, which randomly introduces an asterisk to represent missing signs
|
| 122 |
+
* translation error, which randomly introduces the wrong sign into input data to simulate transliteration or glyph error
|
| 123 |
|
| 124 |
+
### Final stage training hyperparameters
|
| 125 |
|
| 126 |
+
The following hyperparameters were used during training:
|
| 127 |
|
| 128 |
+
* learning\_rate: 5e-05
|
| 129 |
+
* train\_batch\_size: 128
|
| 130 |
+
* eval\_batch\_size: 128
|
| 131 |
+
* seed: 42
|
| 132 |
+
* distributed\_type: multi-GPU
|
| 133 |
+
* num\_devices: 1
|
| 134 |
+
* total\_train\_batch\_size: 128
|
| 135 |
+
* total\_eval\_batch\_size: 128
|
| 136 |
+
* optimizer: Use OptimizerNames.ADAMW\_TORCH\_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer\_args=No additional optimizer arguments
|
| 137 |
+
* lr\_scheduler\_type: linear
|
| 138 |
+
* lr\_scheduler\_warmup\_steps: 5000
|
| 139 |
+
* num\_epochs: 200
|
| 140 |
|
| 141 |
+
### Framework versions
|
| 142 |
|
| 143 |
+
* Transformers 4.50.3
|
| 144 |
+
* PyTorch 2.6.0+cu126
|
| 145 |
+
* Datasets 3.3.0
|
| 146 |
+
* Tokenizers 0.21.1
|
| 147 |
|
| 148 |
+
## 4.1 Metrics by Line
|
| 149 |
|
| 150 |
+
| From Language | From Script | To Language | To Script | BLEU | CHRF | METEOR |
|
| 151 |
+
| --- | --- | --- | --- | --- | --- | --- |
|
| 152 |
+
| Akkadian | Transliteration | Akkadian | Cuneiform | 95.63 | 95.22 | - |
|
| 153 |
+
| Akkadian | Cuneiform | English | Latin | 70.35 | 79.37 | 0.74 |
|
| 154 |
+
| Akkadian | Transliteration | English | Latin | 73.18 | 81.79 | 0.76 |
|
| 155 |
+
| English | Latin | Akkadian | Cuneiform | 45.23 | 45.24 | - |
|
| 156 |
+
| English | Latin | Akkadian | Transliteration | 41.80 | 63.69 | - |
|
| 157 |
+
| Akkadian | Cuneiform | Akkadian | Transliteration | 85.42 | 93.23 | - |
|
| 158 |
|
| 159 |
+
## 4.2 Metrics by Document
|
| 160 |
|
| 161 |
+
| From Language | From Script | To Language | To Script | BLEU | CHRF | METEOR |
|
| 162 |
+
| --- | --- | --- | --- | --- | --- | --- |
|
| 163 |
+
| Akkadian | Transliteration | Akkadian | Cuneiform | 26.41 | 38.55 | - |
|
| 164 |
+
| Akkadian | Cuneiform | English | Latin | 27.42 | 47.01 | 0.43 |
|
| 165 |
+
| Akkadian | Transliteration | English | Latin | 29.19 | 48.68 | 0.44 |
|
| 166 |
+
| English | Latin | Akkadian | Cuneiform | 14.02 | 20.74 | - |
|
| 167 |
+
| English | Latin | Akkadian | Transliteration | 14.84 | 31.46 | - |
|
| 168 |
+
| Akkadian | Cuneiform | Akkadian | Transliteration | 25.36 | 40.35 | - |
|
| 169 |
|
| 170 |
+
## 5. Intended uses
|
| 171 |
|
| 172 |
+
– Short Akkadian lines, transliteration pipelines, reverse lookup experiments.
|
| 173 |
|
| 174 |
+
## 6. Limitations
|
| 175 |
|
| 176 |
+
– Context window is only 64 tokens.
|
| 177 |
|
| 178 |
+
## 7. How to Cite
|
| 179 |
|
| 180 |
+
```bibtex
|
| 181 |
+
@misc{drake2025akk300m,
|
| 182 |
+
title = {{AKK-300m}: A UMT5-Small for Akkadian⇄English},
|
| 183 |
+
author = {Drake, B. Lee},
|
| 184 |
+
year = {2025},
|
| 185 |
+
howpublished = {\url{https://huggingface.co/Thalesian/AKK-300m}}
|
| 186 |
+
}
|
| 187 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|