Translation
ExecuTorch
File size: 7,438 Bytes
95385ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a043589
 
 
 
 
 
9ae5659
 
a043589
9ae5659
 
a043589
9ae5659
 
a043589
9ae5659
 
a043589
9ae5659
 
a043589
9ae5659
 
a043589
95385ea
 
 
 
 
 
9ae5659
 
95385ea
a043589
 
95385ea
9ae5659
 
95385ea
a043589
 
95385ea
9ae5659
 
95385ea
a043589
 
95385ea
9ae5659
 
95385ea
a043589
 
95385ea
9ae5659
 
95385ea
a043589
 
95385ea
9ae5659
 
95385ea
a043589
 
95385ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ae5659
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
license: other
license_name: apache-2.0-and-cc-by-4.0
license_link: LICENSE
pipeline_tag: translation
library_name: executorch
language: [en, de, es, fr]
base_model:
- Helsinki-NLP/opus-mt-en-de
- Helsinki-NLP/opus-mt-de-en
- Helsinki-NLP/opus-mt-en-es
- Helsinki-NLP/opus-mt-es-en
- Helsinki-NLP/opus-mt-en-fr
- Helsinki-NLP/opus-mt-fr-en
---

# opus-mt

This repository hosts the **opus-mt** models exported for the
[React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch)
library as ExecuTorch `.pte` programs, ready to run on device.

## Variants

| Path | Backend | Precision |
| --- | --- | --- |
| `en_de/xnnpack/opus_mt_en_de_xnnpack_int8.pte` | xnnpack | int8 |
| `de_en/xnnpack/opus_mt_de_en_xnnpack_int8.pte` | xnnpack | int8 |
| `en_es/xnnpack/opus_mt_en_es_xnnpack_int8.pte` | xnnpack | int8 |
| `es_en/xnnpack/opus_mt_es_en_xnnpack_int8.pte` | xnnpack | int8 |
| `en_fr/xnnpack/opus_mt_en_fr_xnnpack_int8.pte` | xnnpack | int8 |
| `fr_en/xnnpack/opus_mt_fr_en_xnnpack_int8.pte` | xnnpack | int8 |

## Unshipped backends

A backend directory carrying a `NOTES.md` and no `.pte` was exported and
not published. Its note records why.

- `de_en/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/de_en/coreml/NOTES.md))
- `de_en/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/de_en/mlx/NOTES.md))
- `de_en/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/de_en/vulkan/NOTES.md))
- `en_de/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_de/coreml/NOTES.md))
- `en_de/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_de/mlx/NOTES.md))
- `en_de/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_de/vulkan/NOTES.md))
- `en_es/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_es/coreml/NOTES.md))
- `en_es/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_es/mlx/NOTES.md))
- `en_es/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_es/vulkan/NOTES.md))
- `en_fr/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_fr/coreml/NOTES.md))
- `en_fr/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_fr/mlx/NOTES.md))
- `en_fr/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/en_fr/vulkan/NOTES.md))
- `es_en/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/es_en/coreml/NOTES.md))
- `es_en/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/es_en/mlx/NOTES.md))
- `es_en/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/es_en/vulkan/NOTES.md))
- `fr_en/coreml` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/fr_en/coreml/NOTES.md))
- `fr_en/mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/fr_en/mlx/NOTES.md))
- `fr_en/vulkan` ([why](https://huggingface.co/software-mansion/react-native-executorch-opus-mt/blob/main/fr_en/vulkan/NOTES.md))

## Repository structure

```
LICENSE                                        360 B
config.json                                    29 B
de_en/coreml/NOTES.md                          230 B
de_en/mlx/NOTES.md                             169 B
de_en/tokenizer.json                           2.4 MB
de_en/vulkan/NOTES.md                          218 B
de_en/xnnpack/config.json                      5.5 kB
de_en/xnnpack/opus_mt_de_en_xnnpack_int8.pte   107.0 MB
en_de/coreml/NOTES.md                          230 B
en_de/mlx/NOTES.md                             169 B
en_de/tokenizer.json                           2.4 MB
en_de/vulkan/NOTES.md                          218 B
en_de/xnnpack/config.json                      5.5 kB
en_de/xnnpack/opus_mt_en_de_xnnpack_int8.pte   107.0 MB
en_es/coreml/NOTES.md                          230 B
en_es/mlx/NOTES.md                             169 B
en_es/tokenizer.json                           2.7 MB
en_es/vulkan/NOTES.md                          218 B
en_es/xnnpack/config.json                      5.5 kB
en_es/xnnpack/opus_mt_en_es_xnnpack_int8.pte   114.1 MB
en_fr/coreml/NOTES.md                          230 B
en_fr/mlx/NOTES.md                             169 B
en_fr/tokenizer.json                           2.4 MB
en_fr/vulkan/NOTES.md                          218 B
en_fr/xnnpack/config.json                      5.5 kB
en_fr/xnnpack/opus_mt_en_fr_xnnpack_int8.pte   108.4 MB
es_en/coreml/NOTES.md                          230 B
es_en/mlx/NOTES.md                             169 B
es_en/tokenizer.json                           2.7 MB
es_en/vulkan/NOTES.md                          218 B
es_en/xnnpack/config.json                      5.5 kB
es_en/xnnpack/opus_mt_es_en_xnnpack_int8.pte   114.1 MB
fr_en/coreml/NOTES.md                          230 B
fr_en/mlx/NOTES.md                             169 B
fr_en/tokenizer.json                           2.4 MB
fr_en/vulkan/NOTES.md                          218 B
fr_en/xnnpack/config.json                      5.5 kB
fr_en/xnnpack/opus_mt_fr_en_xnnpack_int8.pte   108.4 MB
```

## Compatibility

These files are published for the **ExecuTorch v1.4.1** runtime. ExecuTorch
gives no forward compatibility guarantee, so an older runtime may fail to load
them.

To use them in React Native ExecuTorch, pass the model constant shipped in the
library's model registry to the corresponding task pipeline. See the
[documentation](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models).

To load these files in your own ExecuTorch runtime, read the
[compatibility note](https://github.com/pytorch/executorch/blob/main/runtime/COMPATIBILITY.md)
first.

## Upstream models and licenses

Each directory is one language pair with its own upstream model and license.
`en_de` is CC-BY 4.0 and requires attribution to Helsinki-NLP Opus-MT.

| Directory | Upstream | License |
| --- | --- | --- |
| `en_de` | [Helsinki-NLP/opus-mt-en-de](https://huggingface.co/Helsinki-NLP/opus-mt-en-de) | cc-by-4.0 |
| `de_en` | [Helsinki-NLP/opus-mt-de-en](https://huggingface.co/Helsinki-NLP/opus-mt-de-en) | apache-2.0 |
| `en_es` | [Helsinki-NLP/opus-mt-en-es](https://huggingface.co/Helsinki-NLP/opus-mt-en-es) | apache-2.0 |
| `es_en` | [Helsinki-NLP/opus-mt-es-en](https://huggingface.co/Helsinki-NLP/opus-mt-es-en) | apache-2.0 |
| `en_fr` | [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) | apache-2.0 |
| `fr_en` | [Helsinki-NLP/opus-mt-fr-en](https://huggingface.co/Helsinki-NLP/opus-mt-fr-en) | apache-2.0 |

## Export notes

Each `.pte` has two methods: `encode` returns the cross-attention keys and
values of all decoder layers, and `decode` runs one greedy step against a
256-token self-attention cache held in the program. The tokenizer adds no
`</s>`; append it, start decoding from `<pad>` and stop at `</s>`. Only XNNPACK int8
ships: it was the fastest variant on both a Galaxy S26 Ultra and an iPhone 16.