Firefox Translations models (mirror)
A byte-for-byte mirror of the translation models Mozilla ships in Firefox
(mozilla/translations), made for
runonweb (runonweb/translate). Mozilla's buckets send no CORS
headers, so browsers can't load the models from there directly.
- 106 direct pairs between English and 58 languages, the architecture Firefox ships in release for each pair (base-memory > base > tiny). int8 Marian NMT students, 17–44 MB per pair.
- Files are gunzipped; nothing else is changed. Each
<pair>/holds the model, the shortlist (lex) and the SentencePiece vocab(s).runtime/holds the Bergamot WASM runtime (@mkljczk/bergamot-translator0.4.16). index.jsonlists the hosted pairs. Revisions and checksums come from Mozilla's model registry; the SDK requests<pair>/<file>?rev=<revision>.
Regenerate with node scripts/translate-models.mjs fetch --all in the runonweb repo.
Use
import { Translator } from 'runonweb/translate'
const t = new Translator({ from: 'en', to: 'es' })
const { text } = await t.translate('Hello world')
License
MPL-2.0, like the original models (see LICENSE). All credit to Mozilla and the Bergamot project.