Downloads · 30 days
12
28% of all-time downloads
DavidCBaines/ebible_m2m-ms8-ie-shareable
ebible_m2m-ms8-ie-shareable is a translation model from DavidCBaines. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
A multilingual, from scratch encoder decoder transformer that translates verses of the Bible from a fixed Koine Greek source into many languages. It reproduces and extends the closed text translation experiment first…
Downloads · 30 days
12
28% of all-time downloads
All-time downloads
43
Public
Parameters
209M
837 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors837 MB · 98%
From the Hugging Face model README
A multilingual, from scratch encoder decoder transformer that translates verses
of the Bible from a fixed Koine Greek source into many languages. It reproduces
and extends the closed text translation experiment first carried out by Sami
Liedes in 2018, replacing his convolutional sequence to sequence model with a
modern transformer and adding quantitative evaluation. This checkpoint comes
from the ms8_ie_shareable experiment.
The model is trained on verse aligned Bible translations from the eBible corpus. Whole books are withheld from certain languages during training, and the model then generates those withheld books. The practical aim is to draft scripture in a language for which parts of the Bible do not yet exist, using the many translations the model has already seen as context.
from transformers import MarianMTModel, MarianTokenizer
model = MarianMTModel.from_pretrained("DavidCBaines/ebible_m2m-ms8-ie-shareable")
tokenizer = MarianTokenizer.from_pretrained("DavidCBaines/ebible_m2m-ms8-ie-shareable")
# Prepend the target language tag (for example <2spa> for Spanish) to the
# Koine Greek source verse.
source = "<2spa> Ἐν ἀρχῇ ἐποίησεν ὁ Θεὸς τὸν οὐρανὸν καὶ τὴν γῆν"
batch = tokenizer([source], return_tensors="pt")
generated = model.generate(**batch, num_beams=5, max_length=192)
print(tokenizer.decode(generated[0], skip_special_tokens=True))
<2xxx> tag prepended to the
source verse.The following books were withheld from training and generated by the model.
| Translation | Held out |
|---|---|
engbsb | OT |
deutkw | OT |
hin2017 | OT |
nld1939 | OT |
Scores are corpus level per held out book, following the silnlp and sacreBLEU
conventions. chrF3 is the headline metric. Two baselines are reported for
context. The source copy baseline (copy_chrF3) returns the Greek source verse
unchanged, and sits near zero because the source is in a different script. The
other language baseline (other_chrF3, with the language in other_lang) is
the score of the single most similar training language's own text for the same
verses, which is a far more demanding floor because a close relative shares
script and vocabulary with the target.
| translation | language | books | verses | chrF3 | spBLEU | BLEU | copy_chrF3 | other_chrF3 | other_lang |
|---|---|---|---|---|---|---|---|---|---|
| deutkw | deu | 36 | 20823 | 39.3 | 13.99 | 12.18 | 0.32 | 21.22 | nld |
| engbsb | eng | 36 | 20833 | 49.9 | 28.64 | 26.77 | 0.34 | 19.57 | fra |
| hin2017 | hin | 36 | 20833 | 46.6 | 28.32 | 22.48 | 0.25 | 32.79 | urd |
| nld1939 | nld | 36 | 20832 | 42.05 | 18.6 | 16.38 | 0.35 | 22.74 | deu |
Scores are verse-weighted across each language's held-out books. Per-book metrics for every book are in generated/metrics.csv.
This model was trained only on translations whose licences permit derivative
works, so that the model may itself be shared. The published model is released
under cc-by-sa-4.0. Every source translation and its licence is listed
below.
| translation | language | licence |
|---|---|---|
| deutkw | deu | Public Domain |
| engbsb | eng | Public Domain |
| hin2017 | hin | by-sa |
| asmfb | asm | by-sa |
| benobcv | ben | by-sa |
| ces1613 | ces | Public Domain |
| ckb | ckb | by-sa |
| dan1931 | dan | Public Domain |
| frasbl | fra | Public Domain |
| guj2017 | guj | by-sa |
| hne | hne | by-sa |
| hrv | hrv | Public Domain |
| isl | isl | by-sa |
| ita1927 | ita | Public Domain |
| latVUC | lat | Public Domain |
| lit | lit | by-sa |
| mar | mar | by-sa |
| nld1939 | nld | Public Domain |
| noblb | nob | by-sa |
| npiulb | npi | by-sa |
| ory | ory | by-sa |
| pan | pan | by-sa |
| pesOPV | pes | Public Domain |
| polsz | pol | by-sa |
| poronbv | por | by-sa |
| ronbtf | ron | Public Domain |
| russyn | rus | Public Domain |
| slk | slk | by-sa |
| spabll | spa | Public Domain |
| srp1868 | srp | Public Domain |
| ukrfb | ukr | Public Domain |
| urd | urd | by-sa |
ms8_ie_shareablec02a2bde61048f3a6e9fdb575cb5d663b18de38613The full training and evaluation code, configuration and selection list are in the project repository.
This work reproduces the closed text Bible translation experiment described by Sami Liedes in his 2018 blog post "Machine translating the Bible into new languages". The reproduction and this model are independent work and are not endorsed by him.