Skip to content

Commit

Permalink
added ctranslate2 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
onadegibert committed Dec 20, 2024
1 parent 376c9f8 commit afca562
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/configs/configuration_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,31 @@ In this case, the lang_tags mapping will be used in the prompt.

Note: When using a Hugging Face model as a teacher, there is no scoring or cross-entropy filtering.

#### CTranslate2

The pipeline also supports CTranslate2 inference for HuggingFace models, which provides a considerable speedup.
For that, simply add new boolean key:

```yaml
huggingface:
modelname: "facebook/nllb-200-distilled-1.3B"
lang_info: True
batch_size: 4096
lang_tags:
en: eng_Latn
ja: jpn_Jpan
ct2: True
```

We have done some benchmarking on 4 Nvidia Ampere A100 GPUs that shows CTranslate2 provides a 26x faster inference:

```markdown
| Model | Type | Batch size | Return sequences | Sent/s |
|-------------------------------------|--------------|------------|------------------|---------|
| facebook/nllb-200-distilled-1.3B | ctranslate2 | 8192 | 8 | 406,316 |
| facebook/nllb-200-distilled-1.3B | huggingface | 8 | 8 | 15,37 |
```

## Backward models

Currently, only OPUS-MT models are available as backward models for scoring translations.
Expand Down

0 comments on commit afca562

Please sign in to comment.