CoolFace
Modelpublic

DavidCBaines/ebible_m2m-ms8-ie-shareable

sourceHugging Facecc-by-sa-4.0updated 2mo agoView on Hugging Face
0likes11downloads
Model Card

ebible_m2m-ms8-ie-shareable

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.

How to use

python
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))

Model details

  • —Architecture: MarianMT style encoder decoder, randomly initialised (no pretrained weights).
  • —Parameters: approximately 210 million.
  • —Source language: composite Koine Greek (Brenton Septuagint for the Old Testament, Tischendorf for the New Testament), in Greek script.
  • —Target languages: indicated by an atomic <2xxx> tag prepended to the source verse.
  • —Tokeniser: SentencePiece, trained on the training split only.

Held out books

The following books were withheld from training and generated by the model.

TranslationHeld out
engbsbOT
deutkwOT
hin2017OT
nld1939OT

Evaluation

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.

translationlanguagebooksverseschrF3spBLEUBLEUcopy_chrF3other_chrF3other_lang
deutkwdeu362082339.313.9912.180.3221.22nld
engbsbeng362083349.928.6426.770.3419.57fra
hin2017hin362083346.628.3222.480.2532.79urd
nld1939nld362083242.0518.616.380.3522.74deu

Scores are verse-weighted across each language's held-out books. Per-book metrics for every book are in generated/metrics.csv.

Training data and licensing

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.

translationlanguagelicence
deutkwdeuPublic Domain
engbsbengPublic Domain
hin2017hinby-sa
asmfbasmby-sa
benobcvbenby-sa
ces1613cesPublic Domain
ckbckbby-sa
dan1931danPublic Domain
frasblfraPublic Domain
guj2017gujby-sa
hnehneby-sa
hrvhrvPublic Domain
islislby-sa
ita1927itaPublic Domain
latVUClatPublic Domain
litlitby-sa
marmarby-sa
nld1939nldPublic Domain
noblbnobby-sa
npiulbnpiby-sa
oryoryby-sa
panpanby-sa
pesOPVpesPublic Domain
polszpolby-sa
poronbvporby-sa
ronbtfronPublic Domain
russynrusPublic Domain
slkslkby-sa
spabllspaPublic Domain
srp1868srpPublic Domain
ukrfbukrPublic Domain
urdurdby-sa

Reproducibility

  • —Experiment: ms8_ie_shareable
  • —Git commit: c02a2bde61048f3a6e9fdb575cb5d663b18de386
  • —Random seed: 13

The full training and evaluation code, configuration and selection list are in the project repository.

Acknowledgement

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.