Skip to content

Commit

Permalink
basic nllb recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
francoishernandez committed Jan 30, 2025
1 parent e440f81 commit 2ac0cdf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipes/nllb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# NLLB

## Conversion

```bash
eole convert HF --model_dir facebook/nllb-200-1.3B --output ./nllb-1.3b --token $HF_TOKEN --tokenizer onmt
```

## Inference

```bash
eole predict -c inference.yaml
```
19 changes: 19 additions & 0 deletions recipes/nllb/inference.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
model_path: "nllb-1.3b"
transforms: ["sentencepiece", "prefix"]
transforms_configs:
prefix:
src_prefix: "</s> eng_Latn"
tgt_prefix: "deu_Latn"
sentencepiece:
src_subword_model: ./flores200_sacrebleu_tokenizer_spm.model
tgt_subword_model: ./flores200_sacrebleu_tokenizer_spm.model


tgt_file_prefix: true

gpu_ranks: [0]
world_size: 1
beam_size: 5

src: test.en
output: test.de

0 comments on commit 2ac0cdf

Please sign in to comment.