Transformers
PyTorch
TensorBoard
t5
text2text-generation
Generated from Trainer
text-generation-inference
Instructions to use AnushS/Hieroglyph-Translator-Using-Gardiner-Codes with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnushS/Hieroglyph-Translator-Using-Gardiner-Codes with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("AnushS/Hieroglyph-Translator-Using-Gardiner-Codes") model = AutoModelForSeq2SeqLM.from_pretrained("AnushS/Hieroglyph-Translator-Using-Gardiner-Codes", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,25 +14,51 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
|
| 15 |
# Hieroglyph-Translator-Using-Gardiner-Codes
|
| 16 |
|
| 17 |
-
This model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
- Loss: 3.4556
|
| 20 |
- Bleu: 0.4084
|
| 21 |
- Gen Len: 5.795
|
| 22 |
|
| 23 |
-
## Model description
|
| 24 |
|
| 25 |
-
More information needed
|
| 26 |
|
| 27 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
More information needed
|
| 34 |
|
| 35 |
-
## Training procedure
|
| 36 |
|
| 37 |
### Training hyperparameters
|
| 38 |
|
|
|
|
| 14 |
|
| 15 |
# Hieroglyph-Translator-Using-Gardiner-Codes
|
| 16 |
|
| 17 |
+
This model was created to translate hieroglyphs into english.
|
| 18 |
+
|
| 19 |
+
Egyptian Hieroglyphs have been grouped into different classes and given a referencing method called Gardiner Codes using Gardiner Classification.
|
| 20 |
+
|
| 21 |
+
Using the Gardiner Codes we can assign meanings to different combinations of hieroglyphs.
|
| 22 |
+
|
| 23 |
+
To Translate any sequence of hieroglyphs using this model, provide the following input :-
|
| 24 |
+
"Translate hieroglyph unicode sequence to English: {Gardiner Codes of the Hieroglyphs}"
|
| 25 |
+
|
| 26 |
+
Examples :
|
| 27 |
+
"Translate hieroglyph unicode sequence to English: A1 B6 F8"
|
| 28 |
+
"Translate hieroglyph unicode sequence to English: G4 H9 P3"
|
| 29 |
+
|
| 30 |
It achieves the following results on the evaluation set:
|
| 31 |
- Loss: 3.4556
|
| 32 |
- Bleu: 0.4084
|
| 33 |
- Gen Len: 5.795
|
| 34 |
|
|
|
|
| 35 |
|
|
|
|
| 36 |
|
| 37 |
+
# Model description
|
| 38 |
+
|
| 39 |
+
This model is a fine-tuned version of t5-small on a custom dataset derived from the Dictionary of Middle Egyptian.
|
| 40 |
+
|
| 41 |
+
The Inference Api on the hugging face model page doesn't work well, load the model in jupyter notebook using the following code snippet:
|
| 42 |
+
text = "" # add your hieroglyph gardiner code combination in the string
|
| 43 |
+
|
| 44 |
+
from transformers import AutoTokenizer
|
| 45 |
+
|
| 46 |
+
tokenizer = AutoTokenizer.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
|
| 47 |
+
inputs = tokenizer(text, return_tensors="pt").input_ids
|
| 48 |
+
|
| 49 |
+
from transformers import AutoModelForSeq2SeqLM
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
|
| 53 |
+
outputs = model.generate(inputs, max_new_tokens=40, do_sample=True, top_k=30, top_p=0.95)
|
| 54 |
+
translated_keywords = str(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 55 |
+
|
| 56 |
|
| 57 |
+
Intended uses & limitations
|
| 58 |
|
| 59 |
+
The Model is intended to be used to translate hieroglyphs. The model does not provide full sentences, it only outputs bits and keywords.
|
| 60 |
|
|
|
|
| 61 |
|
|
|
|
| 62 |
|
| 63 |
### Training hyperparameters
|
| 64 |
|