Training pipelines for Firefox Translations neural machine translation models
Перейти к файлу
Evgeny Pavlov 3774779cb7
Add Marian server for model testing (#492)
* Compile marian server

* Add Marian server for testing

* Reformat

* Update utils/marian_client.py

Co-authored-by: Greg Tatum <gregtatum@users.noreply.github.com>

* Make port configurable

* Relock poetry

---------

Co-authored-by: Greg Tatum <gregtatum@users.noreply.github.com>
2024-03-28 15:53:16 -07:00
.github Migrate the github actions to taskcluster (#184) 2023-09-07 13:10:36 -05:00
3rd_party Integrate OpusTrainer (#219) 2023-11-17 16:59:02 -08:00
docker Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00
docs Add support for custom corpora through remote URLs (#420) 2024-03-06 13:03:40 -06:00
pipeline Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00
snakemake Move snakemake to a separate folder (#431) 2024-02-09 09:46:52 -08:00
taskcluster Update Marian to v1.12.14 2d067afb 2024-02-16 (#491) 2024-03-28 15:23:04 -07:00
tests Consistent dataset names (#494) 2024-03-28 11:46:14 -07:00
tracking Add argument to override runs (#498) 2024-03-28 11:51:06 -07:00
utils Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00
.dockerignore Add a dockerignore file (#499) 2024-03-26 14:19:50 -05:00
.gitignore Add publication package (#309) 2024-01-11 13:25:53 -08:00
.gitmodules Integrate deduplication in the pipeline (#70) 2022-02-11 16:50:41 -08:00
.taskcluster.yml Bump taskgraph version to 7.4.0. (#497) 2024-03-28 10:02:13 -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
Makefile Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00
README.md Move snakemake to a separate folder (#431) 2024-02-09 09:46:52 -08:00
poetry.lock Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00
pyproject.toml Add Marian server for model testing (#492) 2024-03-28 15:53:16 -07:00

README.md

Firefox Translations training

Training pipelines 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

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)