Edit model card

# Fast-Inference with Ctranslate2

Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on CPU or GPU.

quantized version of facebook/nllb-200-3.3B

pip install ctranslate2

Checkpoint compatible to ctranslate2>=3.22.0

  • compute_type=int8_float16 for device="cuda"
  • compute_type=int8 for device="cpu"

Converted on 2023-12-01 using CTranslate2==3.22.0 and

from ctranslate2.converters import TransformersConverter
TransformersConverter(
    "facebook/nllb-200-3.3B",
    activation_scales=None,
    copy_files=['tokenizer.json', 'generation_config.json', 'README.md', 'special_tokens_map.json', 'tokenizer_config.json', '.gitattributes'],
    load_as_float16=True,
    revision=None,
    low_cpu_mem_usage=True,
    trust_remote_code=True,
).convert(
    output_dir=str(tmp_dir),
    vmap = None, 
    quantization="int8",
    force = True,
)

License and other remarks:

This is just a quantized version. License conditions are intended to be idential to original huggingface repo.

Original description, copied from https://huggingface.co/facebook/nllb-200-3.3B

NLLB-200

This is the model card of NLLB-200's 3.3B variant.

Here are the metrics for that particular checkpoint.

  • Information about training algorithms, parameters, fairness constraints or other applied approaches, and features. The exact training algorithm, data and the strategies to handle data imbalances for high and low resource languages that were used to train NLLB-200 is described in the paper.
  • Paper or other resource for more information NLLB Team et al, No Language Left Behind: Scaling Human-Centered Machine Translation, Arxiv, 2022
  • License: CC-BY-NC
  • Where to send questions or comments about the model: https://github.com/facebookresearch/fairseq/issues

Intended Use

  • Primary intended uses: NLLB-200 is a machine translation model primarily intended for research in machine translation, - especially for low-resource languages. It allows for single sentence translation among 200 languages. Information on how to - use the model can be found in Fairseq code repository along with the training code and references to evaluation and training data.
  • Primary intended users: Primary users are researchers and machine translation research community.
  • Out-of-scope use cases: NLLB-200 is a research model and is not released for production deployment. NLLB-200 is trained on general domain text data and is not intended to be used with domain specific texts, such as medical domain or legal domain. The model is not intended to be used for document translation. The model was trained with input lengths not exceeding 512 tokens, therefore translating longer sequences might result in quality degradation. NLLB-200 translations can not be used as certified translations.

Metrics

• Model performance measures: NLLB-200 model was evaluated using BLEU, spBLEU, and chrF++ metrics widely adopted by machine translation community. Additionally, we performed human evaluation with the XSTS protocol and measured the toxicity of the generated translations.

Evaluation Data

  • Datasets: Flores-200 dataset is described in Section 4
  • Motivation: We used Flores-200 as it provides full evaluation coverage of the languages in NLLB-200
  • Preprocessing: Sentence-split raw text data was preprocessed using SentencePiece. The SentencePiece model is released along with NLLB-200.

Training Data

• We used parallel multilingual data from a variety of sources to train the model. We provide detailed report on data selection and construction process in Section 5 in the paper. We also used monolingual data constructed from Common Crawl. We provide more details in Section 5.2.

Ethical Considerations

• In this work, we took a reflexive approach in technological development to ensure that we prioritize human users and minimize risks that could be transferred to them. While we reflect on our ethical considerations throughout the article, here are some additional points to highlight. For one, many languages chosen for this study are low-resource languages, with a heavy emphasis on African languages. While quality translation could improve education and information access in many in these communities, such an access could also make groups with lower levels of digital literacy more vulnerable to misinformation or online scams. The latter scenarios could arise if bad actors misappropriate our work for nefarious activities, which we conceive as an example of unintended use. Regarding data acquisition, the training data used for model development were mined from various publicly available sources on the web. Although we invested heavily in data cleaning, personally identifiable information may not be entirely eliminated. Finally, although we did our best to optimize for translation quality, mistranslations produced by the model could remain. Although the odds are low, this could have adverse impact on those who rely on these translations to make important decisions (particularly when related to health and safety).

Caveats and Recommendations

• Our model has been tested on the Wikimedia domain with limited investigation on other domains supported in NLLB-MD. In addition, the supported languages may have variations that our model is not capturing. Users should make appropriate assessments.

Carbon Footprint Details

• The carbon dioxide (CO2e) estimate is reported in Section 8.8.

Downloads last month
16
Inference Examples
Inference API (serverless) has been turned off for this model.