Opus-MT English โ†’ Hebrew โ€” GGUF (ggml)

GGUF / ggml conversion of Helsinki-NLP/opus-mt-en-he for use with CrispStrobe/CrispASR (--backend marian).

A small (~80M parameters, 6+6 layers, d=512) MarianMT model for one language pair. In CrispASR these are the fastest translators for live transcription + translation (--live-translate).

Licence and attribution

CC-BY-4.0. The weights are the opus-2019-12-18 release of the OPUS-MT project (Jรถrg Tiedemann and Santhosh Thottingal, University of Helsinki; OPUS-MT โ€” Building open translation services for the World, EAMT 2020), trained on OPUS data. The project distributes its pre-trained models under CC-BY 4.0 (Opus-MT README, OPUS-MT-train README); that statement, not the tag on an individual model card, is what this repository follows. This is a format conversion: the weights are unchanged at f16 and quantized at q8_0. Redistribution requires attribution to the OPUS-MT project.

Files

File Size Output vs. the reference implementation
opus-mt-en-he-f16.gguf 162 MB 8/8 sentences identical greedy, 8/8 with beam 4
opus-mt-en-he-q8_0.gguf 89 MB 8/8 sentences identical greedy โ€” any others differ in wording. Fastest; recommended.

"Reference" is MarianMTModel.generate from Hugging Face transformers on the original checkpoint, on 8 test sentences; input token ids were identical for 8/8.

Quick start

git clone https://github.com/CrispStrobe/CrispASR && cd CrispASR
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j

# Text โ†’ text. -bs 1 is greedy; without it the checkpoint's own beam size is used.
./build/bin/crispasr --backend marian -m opus-mt-en-he -sl en -tl he -bs 1 \
    --text "Good morning and welcome to today's meeting."
# ื‘ื•ืงืจ ื˜ื•ื‘ ื•ื‘ืจื•ื›ื™ื ื”ื‘ืื™ื ืœืคื’ื™ืฉื” ืฉืœ ื”ื™ื•ื.

# Live: microphone in, transcript + translation out, sentence by sentence
./build/bin/crispasr --live-translate -l en --tr-tl he \
    -m auto --backend parakeet --translate-backend marian

-m opus-mt-en-he downloads opus-mt-en-he-q8_0.gguf on first use. The recogniser in the live example must support English.

Notes

  • One model per direction; the opposite direction, where one exists, is cstr/opus-mt-he-en-GGUF.
  • Live mode always decodes greedy.
  • Literal </s>, <unk>, <pad> in the input are treated as ordinary text here (the reference treats them as special tokens).

Conversion

python models/convert-marian-to-gguf.py --input <dir>/opus-mt-en-he --output opus-mt-en-he-f16.gguf
./build/bin/crispasr-quantize opus-mt-en-he-f16.gguf opus-mt-en-he-q8_0.gguf q8_0
python tools/marian_parity.py --hf-dir <dir>/opus-mt-en-he --gguf opus-mt-en-he-f16.gguf --lang en --tgt he --sentences <file>
Downloads last month
102
GGUF
Model size
78.4M params
Architecture
marian
Hardware compatibility
Log In to add your hardware

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for cstr/opus-mt-en-he-GGUF

Quantized
(3)
this model