Translation
Transformers
Safetensors
umt5
text2text-generation
cuneiform
transliteration
akkadian
sumerian
hittite
linear-b
elamite
ancient-languages
seq2seq
Instructions to use Thalesian/cuneiformBase-400m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thalesian/cuneiformBase-400m 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/cuneiformBase-400m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Thalesian/cuneiformBase-400m") model = AutoModelForSeq2SeqLM.from_pretrained("Thalesian/cuneiformBase-400m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -174,13 +174,15 @@ model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
|
| 174 |
|
| 175 |
# Example: Translate Akkadian cuneiform to English
|
| 176 |
prompt = "Translate Akkadian cuneiform to English: "
|
| 177 |
-
input_text = "
|
| 178 |
|
| 179 |
inputs = tokenizer(prompt + input_text, return_tensors="pt")
|
| 180 |
outputs = model.generate(**inputs, max_length=64)
|
| 181 |
|
| 182 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 183 |
print("Prediction:", prediction)
|
|
|
|
|
|
|
| 184 |
```
|
| 185 |
|
| 186 |
|
|
|
|
| 174 |
|
| 175 |
# Example: Translate Akkadian cuneiform to English
|
| 176 |
prompt = "Translate Akkadian cuneiform to English: "
|
| 177 |
+
input_text = "π
πΉ π πΊ π½ π πΉ πΏ π π π΄ π» π π π π π π"
|
| 178 |
|
| 179 |
inputs = tokenizer(prompt + input_text, return_tensors="pt")
|
| 180 |
outputs = model.generate(**inputs, max_length=64)
|
| 181 |
|
| 182 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 183 |
print("Prediction:", prediction)
|
| 184 |
+
> "witness Nabu-naαΉ£ir son Na di-Issar servant of son king"
|
| 185 |
+
|
| 186 |
```
|
| 187 |
|
| 188 |
|