# Correcting Transformers Translation Doc Example

**URL:** <https://discuss.huggingface.co/t/correcting-transformers-translation-doc-example/30589>\
**Category:** Site Feedback\
**Created:** [January 27, 2023, 8:17pm UTC](https://discuss.huggingface.co/t/correcting-transformers-translation-doc-example/30589 "2023-01-27T20:17:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coding-gen](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@coding-gen](https://discuss.huggingface.co/u/coding-gen)\
**Post date:** [January 27, 2023, 8:17pm UTC](https://discuss.huggingface.co/t/correcting-transformers-translation-doc-example/30589/1 "2023-01-27T20:17:28Z")

</div>

I found an oversight when I was running through the transformers translation examples, wanted to let you know how to fix.

**Page** : [https://huggingface.co/docs/transformers/tasks/translation](https://huggingface.co/docs/transformers/tasks/translation)

**Correction:**

# Specify model

In the pytorch example of collating the data, either specify the model beforehand:

```auto
model = "t5-small"
data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=model)

```

or more precise:

```auto
data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model="t5-small")

```
