Opus-MT English β†’ German β€” GGUF (ggml)

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

A small (~75M parameters, 6+6 layers, d=512) MarianMT model for one language pair. In CrispASR it is the fastest translator for live transcription + translation (--live-translate): tens of milliseconds per sentence on a laptop CPU.

Licence and attribution

CC-BY-4.0. The weights are the opus-2020-02-26 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-de-f16.gguf 153 MB identical: 8/8 sentences greedy, 8/8 with beam 4
opus-mt-en-de-q8_0.gguf 84 MB 8/8 sentences greedy, 7/8 with beam 4 β€” the others differ in wording, not in meaning. Fastest; recommended.

"Reference" is MarianMTModel.generate from Hugging Face transformers on the original checkpoint; token ids are identical for every sentence and for 24 tokenizer stress strings. A q4_k file is deliberately not published: it changed about half the test sentences.

Quick start

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

# Text β†’ text. The backend is detected from the file; -bs 1 is greedy,
# without it the checkpoint's own beam size (4) is used.
./build/bin/crispasr --backend marian -m auto -sl en -tl de -bs 1 \
    --text "Please remember to pack your documents in time."
# Bitte denken Sie daran, Ihre Dokumente rechtzeitig zu packen.

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

-m auto / --translate-model opus-mt-en-de download opus-mt-en-de-q8_0.gguf on first use.

Notes

  • One model per direction; the opposite direction is cstr/opus-mt-de-en-GGUF.
  • Beam search in this runtime has no KV cache and is several times slower than greedy; 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-de --output opus-mt-en-de-f16.gguf
./build/bin/crispasr-quantize opus-mt-en-de-f16.gguf opus-mt-en-de-q8_0.gguf q8_0
python tools/marian_parity.py --hf-dir <dir>/opus-mt-en-de --gguf opus-mt-en-de-f16.gguf --lang en
Downloads last month
415
GGUF
Model size
74.5M 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-de-GGUF

Quantized
(9)
this model