Lost in Darija: English β†’ Moroccan Darija (ONNX, 8-bit)

The Lost in Darija translation model (MarianMT Helsinki-NLP/opus-mt-en-ar fine-tuned on DODa, fine_tuned_marian_v2) converted for Transformers.js: encoder + merged decoder, 8-bit weights (143 MB). Used by essprod : Learn Darija Today (Dictionary β€Ί Translate), where it runs on the learner's device.

  • Prefix every sentence with >>ary<< (the model was trained that way).
  • Greedy decoding (Transformers.js has no beam search yet). Without compression the ONNX export gives exactly the original model's greedy output; 8-bit changes a word here and there.
  • The fine-tuned model keeps separate encoder, decoder and output embeddings; the export keeps that wiring (_tmp/mt229/untie.py). tokenizer.json uses <unk> = 1, as the original.
import { pipeline } from "@huggingface/transformers";
const tr = await pipeline("translation", "essprod/darija-mt-onnx", { dtype: "q8" });
const [out] = await tr(">>ary<< Where is the train station?");
// ΩΩŠΩ† Ψ¬Ψ§Ψͺ Ψ§Ω„Ω…Ψ­Ψ·Ψ©ΨŸ

Data: DODa, Darija Open Dataset (Outchakoucht & Es-Samaali, 2024).

Downloads last month
32
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for essprod/darija-mt-onnx

Quantized
(5)
this model