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 model card README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
model-index:
|
| 4 |
- name: Hieroglyph-Translator-Using-Gardiner-Codes
|
| 5 |
results: []
|
|
@@ -8,71 +12,53 @@ model-index:
|
|
| 8 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 9 |
should probably proofread and complete it, then remove this comment. -->
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
Egyptian Hieroglyphs have been grouped into different classes and given a referencing method called Gardiner Codes using Gardiner Classification.
|
| 18 |
-
|
| 19 |
-
Using the [Gardiner Codes](https://www.egyptianhieroglyphs.net/gardiners-sign-list/) we can assign meanings to different combinations of hieroglyphs.
|
| 20 |
-
|
| 21 |
-
To Translate any sequence of hieroglyphs using this model, provide the following input :-
|
| 22 |
-
|
| 23 |
-
"Translate hieroglyph unicode sequence to English: {Gardiner Codes of the Hieroglyphs}"
|
| 24 |
-
|
| 25 |
-
Examples :
|
| 26 |
-
|
| 27 |
-
"Translate hieroglyph unicode sequence to English: A1 B6 F8"
|
| 28 |
-
|
| 29 |
-
"Translate hieroglyph unicode sequence to English: G4 H9 P3"
|
| 30 |
-
|
| 31 |
|
| 32 |
## Model description
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
text = "" # add your hieroglyph gardiner code combination in the string
|
| 39 |
-
|
| 40 |
-
from transformers import AutoTokenizer
|
| 41 |
-
|
| 42 |
-
tokenizer = AutoTokenizer.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
|
| 43 |
-
inputs = tokenizer(text, return_tensors="pt").input_ids
|
| 44 |
-
|
| 45 |
-
from transformers import AutoModelForSeq2SeqLM
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
|
| 49 |
-
outputs = model.generate(inputs, max_new_tokens=40, do_sample=True, top_k=30, top_p=0.95)
|
| 50 |
-
translated_keywords = str(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 51 |
|
|
|
|
| 52 |
|
| 53 |
-
##
|
| 54 |
|
| 55 |
-
|
| 56 |
-
The model does not provide full sentences, it only outputs bits and keywords.
|
| 57 |
|
|
|
|
| 58 |
|
| 59 |
### Training hyperparameters
|
| 60 |
|
| 61 |
The following hyperparameters were used during training:
|
| 62 |
- learning_rate: 2e-05
|
| 63 |
-
- train_batch_size:
|
| 64 |
-
- eval_batch_size:
|
| 65 |
- seed: 42
|
| 66 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 67 |
- lr_scheduler_type: linear
|
| 68 |
-
- num_epochs:
|
| 69 |
|
| 70 |
### Training results
|
| 71 |
|
| 72 |
-
| Training Loss | Epoch | Step
|
| 73 |
-
|:-------------:|:-----:|:----:|:---------------:|:-------:|
|
| 74 |
-
|
|
| 75 |
-
| 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
|
| 78 |
### Framework versions
|
|
@@ -80,4 +66,4 @@ The following hyperparameters were used during training:
|
|
| 80 |
- Transformers 4.27.4
|
| 81 |
- Pytorch 2.2.0.dev20231113
|
| 82 |
- Datasets 2.12.0
|
| 83 |
-
- Tokenizers 0.13.3
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- generated_from_trainer
|
| 5 |
+
metrics:
|
| 6 |
+
- bleu
|
| 7 |
model-index:
|
| 8 |
- name: Hieroglyph-Translator-Using-Gardiner-Codes
|
| 9 |
results: []
|
|
|
|
| 12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
|
| 15 |
+
# Hieroglyph-Translator-Using-Gardiner-Codes
|
| 16 |
|
| 17 |
+
This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on the None dataset.
|
| 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 |
+
## Intended uses & limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
More information needed
|
| 30 |
|
| 31 |
+
## Training and evaluation data
|
| 32 |
|
| 33 |
+
More information needed
|
|
|
|
| 34 |
|
| 35 |
+
## Training procedure
|
| 36 |
|
| 37 |
### Training hyperparameters
|
| 38 |
|
| 39 |
The following hyperparameters were used during training:
|
| 40 |
- learning_rate: 2e-05
|
| 41 |
+
- train_batch_size: 1
|
| 42 |
+
- eval_batch_size: 1
|
| 43 |
- seed: 42
|
| 44 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 45 |
- lr_scheduler_type: linear
|
| 46 |
+
- num_epochs: 10
|
| 47 |
|
| 48 |
### Training results
|
| 49 |
|
| 50 |
+
| Training Loss | Epoch | Step | Validation Loss | Bleu | Gen Len |
|
| 51 |
+
|:-------------:|:-----:|:------:|:---------------:|:------:|:-------:|
|
| 52 |
+
| 4.3013 | 1.0 | 11000 | 4.1166 | 0.2832 | 6.967 |
|
| 53 |
+
| 4.1299 | 2.0 | 22000 | 3.9282 | 0.5713 | 6.866 |
|
| 54 |
+
| 3.9448 | 3.0 | 33000 | 3.7724 | 0.1969 | 5.585 |
|
| 55 |
+
| 3.7424 | 4.0 | 44000 | 3.6706 | 0.4691 | 5.736 |
|
| 56 |
+
| 3.6359 | 5.0 | 55000 | 3.6008 | 0.2859 | 5.631 |
|
| 57 |
+
| 3.6102 | 6.0 | 66000 | 3.5475 | 0.338 | 5.722 |
|
| 58 |
+
| 3.4461 | 7.0 | 77000 | 3.5068 | 0.306 | 5.74 |
|
| 59 |
+
| 3.4753 | 8.0 | 88000 | 3.4755 | 0.4031 | 5.78 |
|
| 60 |
+
| 3.4109 | 9.0 | 99000 | 3.4567 | 0.4635 | 5.765 |
|
| 61 |
+
| 3.3798 | 10.0 | 110000 | 3.4556 | 0.4084 | 5.795 |
|
| 62 |
|
| 63 |
|
| 64 |
### Framework versions
|
|
|
|
| 66 |
- Transformers 4.27.4
|
| 67 |
- Pytorch 2.2.0.dev20231113
|
| 68 |
- Datasets 2.12.0
|
| 69 |
+
- Tokenizers 0.13.3
|