
# MarianMT exported to the ONNX format

## Install Optimum
```bash
pip install optimum
```

## Usage example

```python
from transformers import AutoTokenizer
from optimum.onnxruntime import ORTModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("icon-it-tdtu/mt-vi-en-optimum")
model = ORTModelForSeq2SeqLM.from_pretrained("icon-it-tdtu/mt-vi-en-optimum")

text = "Tôi là một sinh viên."
inputs = tokenizer(text, return_tensors='pt')
outputs = model.generate(**inputs)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
# I am a student.
```
{"language": ["vi", "en"], "license": "apache-2.0", "tags": ["translation"]}
transformers onnx marian text2text-generation translation vi en license:apache-2.0 autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #onnx #marian #text2text-generation #translation #vi #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 


# MarianMT exported to the ONNX format

## Install Optimum


## Usage example


# MarianMT exported to the ONNX format ## Install Optimum ## Usage example
TAGS
#transformers #onnx #marian #text2text-generation #translation #vi #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 
 # MarianMT exported to the ONNX format ## Install Optimum ## Usage example
passage: TAGS
#transformers #onnx #marian #text2text-generation #translation #vi #en #license-apache-2.0 #autotrain_compatible #endpoints_compatible #has_space #region-us 
# MarianMT exported to the ONNX format## Install Optimum## Usage example