Downloads · 30 days
20
20% of all-time downloads
johnlockejrr/marianmt-he2arc-targum-voc
marianmt-he2arc-targum-voc is a translation model from johnlockejrr. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as mit.
This model fine-tunes the Helsinki-NLP/opus-mt-sem-sem model for translation from the vocalized (with nikkud, no cantillation) Masoretic Hebrew Tanakh to the vocalized Targumic Aramaic (Onqelos for Torah, Jonathan for…
Downloads · 30 days
20
20% of all-time downloads
All-time downloads
101
Public
Parameters
61.4M
247 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors246 MB · 99%
From the Hugging Face model README
This model fine-tunes the Helsinki-NLP/opus-mt-sem-sem model for translation from the vocalized (with nikkud, no cantillation) Masoretic Hebrew Tanakh to the vocalized Targumic Aramaic (Onqelos for Torah, Jonathan for Prophets). The model is trained on a verse-aligned parallel corpus, both source and target in Hebrew script with nikkud.
hebrew_aramaic_model_improved (local directory)>>heb<< for Hebrew and >>arc<< for AramaicSingle text translation:
python inference.py \
--model_path ./hebrew_aramaic_model_improved \
--text "בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ" \
--direction he2arc
Using Hugging Face Transformers (local model):
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_path = "./hebrew_aramaic_model_improved"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
# Translate Hebrew to Aramaic
text = "בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ"
inputs = tokenizer(f">>heb<< {text}", return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(**inputs, max_length=512, num_beams=4)
translation = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(f"Aramaic: {translation}")
Batch translation from file:
python inference.py \
--model_path ./hebrew_aramaic_model_improved \
--input_file input_texts.txt \
--output_file translations.txt \
--direction he2arc
Interactive mode:
python inference.py --model_path ./hebrew_aramaic_model_improved
The final trained model is saved in ./hebrew_aramaic_model_improved/ with:
model.safetensors: Model weightstokenizer_config.json: Tokenizer configurationmodel_info.json: Training information and metadatatraining_args.bin: Training argumentstest_results.json: Final evaluation resultsall_results.json: Complete training historyThe model uses the following language tokens:
>>heb<<: Hebrew (source language)>>arc<<: Aramaic (target language)These tokens are added to the tokenizer during training and used during inference to specify the translation direction.
he2arc_training.log>>heb<< and >>arc<<)>>arc<< token is properly added to tokenizerIf you use this model, please cite:
@misc{marianmt-he2arc-targum-voc,
author = {John Locke Jr.},
title = {Masoretic Hebrew to Targumic Aramaic (Onqelos & Jonathan) MarianMT Model},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face model repository},
howpublished = {\url{https://huggingface.co/johnlockejrr/marianmt-he2arc-targum-voc}},
}
Base Model: Helsinki-NLP/opus-mt-sem-sem
Dataset: Parallel corpus of vocalized Masoretic Hebrew Tanakh and vocalized Targumic Aramaic (Onqelos for Torah, Jonathan for Prophets)