bumblelbee/nllb-600m-ancient-egyptian-hieroglyphics
121
NLLB-600M for Ancient Egyptian Hieroglyphics Translation
Fine-tuned NLLB-200-distilled-600M model for translating Ancient Egyptian hieroglyphics to German and English.
π― Model Performance
π Training Details
- Base Model: facebook/nllb-200-distilled-600M
- Training Steps: 7,000 steps (20 epochs)
- Best Validation Loss: 1.4976 (at step 6,000)
- Training Data: 80,375 German + 10,525 English samples
- Data Source: Thesaurus Linguae Aegyptiae (TLA) database
- Hardware: 4Γ NVIDIA RTX A4000 GPUs
- Training Time: ~12-14 hours
π Quick Start
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
# Load model
model = AutoModelForSeq2SeqLM.from_pretrained("bumblelbee/nllb-600m-ancient-egyptian-hieroglyphics")
tokenizer = AutoTokenizer.from_pretrained("bumblelbee/nllb-600m-ancient-egyptian-hieroglyphics")
model = model.to('cuda')
model.eval()
# Example: Translate hieroglyphics to German
hieroglyphic_input = "M17 G43 V28 N41 G43 S29 X1 F29 F29 F29 X1 X1"
tokenizer.src_lang = "arb_Arab" # Ancient Egyptian uses Arabic encoding
tokenizer.tgt_lang = "deu_Latn" # German target
forced_bos_token_id = tokenizer.lang_code_to_id["deu_Latn"]
inputs = tokenizer([hieroglyphic_input], return_tensors="pt").to('cuda')
with torch.no_grad():
outputs = model.generate(
**inputs,
forced_bos_token_id=forced_bos_token_id,
num_beams=5,
max_length=128,
early_stopping=True
)
translation = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
print(f"German: {translation}")
# Output: "Unas' Zunge ist unter seinen FΓΌΓen."
# For English translation
tokenizer.tgt_lang = "eng_Latn"
forced_bos_token_id = tokenizer.lang_code_to_id["eng_Latn"]
# ... same processβ οΈ Important Notes
- Always use `forced_bos_token_id`: Without it, the model outputs Arabic instead of German/English
- Input format: Space-separated Gardiner codes (e.g., "M17 G43 V28")
- Language codes:
- Source:
arb_Arab(Ancient Egyptian) - Target:
deu_Latn(German) oreng_Latn(English)
π Comparison vs Baseline
π Dataset
Trained on data from the Thesaurus Linguae Aegyptiae (TLA):
- Old Egyptian and Middle Egyptian texts
- 80,375 hieroglyphic-German pairs
- 10,525 hieroglyphic-English pairs
- Data preprocessing: 280+ cleaning operations applied
π Achievements
- β Outperforms baseline M2M-100 model by 122% on German
- β High token-level accuracy (76.54% on German)
- β Low perplexity (3.93 on German - confident predictions)
- β Fully reproducible with complete training logs
π Citation
@misc{nllb-hieroglyphics-2026,
title={NLLB-600M for Ancient Egyptian Hieroglyphics Translation},
author={Your Name},
year={2026},
url={https://huggingface.co/bumblelbee/nllb-600m-ancient-egyptian-hieroglyphics}
}π License
This model is released under CC-BY-SA-4.0, consistent with the TLA database license.
π Links
- Dataset: TLA Database
- Baseline Paper: De Cao et al. (2024) "Deep Learning Meets Egyptology"
π Acknowledgments
- Base model: Meta AI's NLLB-200
- Dataset: Berlin-Brandenburgische Akademie der Wissenschaften (TLA)
