Training pipelines for Firefox Translations neural machine translation models
Перейти к файлу
Greg Tatum 47efa45cc9
Adjust default values for batching (#934)
2024-11-20 14:26:18 -06:00
.github For bergamot-translator into this repostiory as inference-engine (#867) 2024-10-01 12:44:40 -05:00
3rd_party Integrate OpusTrainer (#219) 2023-11-17 16:59:02 -08:00
configs Rename repo (#914) 2024-11-01 10:21:28 -05:00
docker Ensure npm is available in `local` and `inference` Docker images (#921) 2024-11-05 08:50:48 -06:00
docs Update training to support CJK (#904) 2024-11-06 15:45:26 -08:00
inference Test WASM Translations in CI (#927) 2024-11-14 15:43:58 -06:00
pipeline Adjust default values for batching (#934) 2024-11-20 14:26:18 -06:00
snakemake Switch bestbleu to chrF (#908) 2024-11-04 13:49:49 -08:00
taskcluster Adjust default values for batching (#934) 2024-11-20 14:26:18 -06:00
tests Update training to support CJK (#904) 2024-11-06 15:45:26 -08:00
tracking Rename repo (#914) 2024-11-01 10:21:28 -05:00
utils Test WASM Translations in CI (#927) 2024-11-14 15:43:58 -06:00
.clang-format For bergamot-translator into this repostiory as inference-engine (#867) 2024-10-01 12:44:40 -05:00
.clang-format-ignore For bergamot-translator into this repostiory as inference-engine (#867) 2024-10-01 12:44:40 -05:00
.clang-tidy For bergamot-translator into this repostiory as inference-engine (#867) 2024-10-01 12:44:40 -05:00
.dockerignore Remove the Makefile and replace it with a Taskfile (#510) 2024-04-09 16:11:13 -05:00
.gitattributes Test WASM Translations in CI (#927) 2024-11-14 15:43:58 -06:00
.gitignore Group logs online evals (#708) 2024-08-08 11:19:55 -07:00
.gitmodules Add emsdk as a git submodule (#918) 2024-11-06 15:07:57 -06:00
.taskcluster.yml restrict github-push taskcluster events to `main` (#777) 2024-09-06 13:53:31 -04:00
CODE_OF_CONDUCT.md Initial pipeline (#1) 2021-06-17 15:39:15 -07:00
LICENSE Initial commit 2021-04-30 15:36:49 -07:00
README.md Rename repo (#914) 2024-11-01 10:21:28 -05:00
Taskfile.yml Test WASM Translations in CI (#927) 2024-11-14 15:43:58 -06:00
poetry.lock Configure vocab for CJK (#906) 2024-11-06 20:45:55 -08:00
pyproject.toml Update data importer to support CJK (#897) 2024-11-06 12:42:11 -08:00

README.md

Firefox Translations

Training pipelines and the inference engine for Firefox Translations machine translation models.

The trained models are hosted in firefox-translations-models repository, compatible with bergamot-translator and power the Firefox web page translation starting with version 118.

The pipeline was originally developed as a part of Bergamot project that focuses on improving client-side machine translation in a web browser.

Documentation

Pipeline

The pipeline is capable of training a translation model for a language pair end to end. Translation quality depends on the chosen datasets, data cleaning procedures and hyperparameters. Some settings, especially low resource languages might require extra tuning.

We use fast translation engine Marian.

You can find more details about the pipeline steps in the documentation.

Orchestrators

An orchestrator is responsible for workflow management and parallelization.

  • Taskcluster - Mozilla task execution framework. It is also used for Firefox CI. It provides access to the hybrid cloud workers (GCP + on-prem) with increased scalability and observability. Usage instructions.
  • Snakemake - a file based orchestrator that allows to run the pipeline locally or on a Slurm cluster. Usage instructions. (The integration is not maintained since Mozilla has switched to Taskcluster. Contributions are welcome.)

Experiment tracking

Public training dashboard in Weights & Biases

Marian training metrics are parsed from logs and published using a custom module within the tracking directory. More information is available here.

Learning resources

Acknowledgements

This project uses materials developed by:

  • Bergamot project (github, website) that has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No 825303
  • HPLT project (github, website) that has received funding from the European Unions Horizon Europe research and innovation programme under grant agreement No 101070350 and from UK Research and Innovation (UKRI) under the UK governments Horizon Europe funding guarantee [grant number 10052546]
  • OPUS-MT project (github, website)
  • Many other open source projects and research papers (see References)