# Correcting Transformers Translation Doc Example

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcorrecting-transformers-translation-doc-example%2F30589%3E%5C
**Category:** Site Feedback\
**Created:** [January 27, 2023, 8:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcorrecting-transformers-translation-doc-example%2F30589 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcoding-gen)%5C
**Post date:** [January 27, 2023, 8:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcorrecting-transformers-translation-doc-example%2F30589%2F1 "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")

```
