How to get translation of one batch of sentences after batch_encode_plus? 
```
model = AutoModelWithLMHead.from_pretrained("Helsinki-NLP/opus-mt-es-en")
tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-es-en")
batch_input_str = (("Mary spends $20 on pizza"), ("She likes eating it"), ("The pizza was great"))
encoded = (tokenizer.batch_encode_plus(batch_input_str, pad_to_max_length=True))
```

The ```encoded```is like:
```
{'input_ids': [[4963, 10154, 5021, 9, 25, 1326, 2255, 35, 17462, 0], [552, 3996, 2274, 9, 129, 75, 2223, 25, 1370, 0], [42, 17462, 12378, 9, 25, 5807, 1949, 0, 65000, 65000]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 0]]}
```

Then, should I just pass the ```encoded``` to 
```
output = model.generate(a)
```
And then use
```
res = tokenizer.decode(output)
```


Thanks!
Hello, have you read the docs concerning the translation task? It is [available here](https://huggingface.co/transformers/task_summary.html#translation).

Since you're specifically asking about a Helsinki model, you can find the documentation, with examples, [here](https://huggingface.co/transformers/model_doc/marian.html#multilingual-models).