# How to run the model
```python
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer

model = M2M100ForConditionalGeneration.from_pretrained("transZ/M2M_Vi_Ba")
tokenizer = M2M100Tokenizer.from_pretrained("transZ/M2M_Vi_Ba")
tokenizer.src_lang = "vi"
vi_text = "Hôm nay ba đi chợ."
encoded_vi = tokenizer(vi_text, return_tensors="pt")
generated_tokens = model.generate(**encoded_vi, forced_bos_token_id=tokenizer.get_lang_id("ba"))
translate = tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]
print(translate)
```
{"language": ["vi", "ba"], "tags": ["translation"], "datasets": ["custom dataset"], "metrics": ["bleu", "sacrebleu"]}
transformers pytorch m2m_100 text2text-generation translation vi ba autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #m2m_100 #text2text-generation #translation #vi #ba #autotrain_compatible #endpoints_compatible #region-us 

# How to run the model

# How to run the model
TAGS
#transformers #pytorch #m2m_100 #text2text-generation #translation #vi #ba #autotrain_compatible #endpoints_compatible #region-us 
 # How to run the model
passage: TAGS
#transformers #pytorch #m2m_100 #text2text-generation #translation #vi #ba #autotrain_compatible #endpoints_compatible #region-us 
# How to run the model