# How to set input to validate of T5 Model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-set-input-to-validate-of-t5-model%2F32087%3E%5C
**Category:** Intermediate\
**Created:** [February 20, 2023, 2:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-set-input-to-validate-of-t5-model%2F32087 "2023-02-20T14:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwonmha](https://avatars.discourse-cdn.com/v4/letter/k/ecccb3/32.png) [@kwonmha](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkwonmha)%5C
**Post date:** [February 20, 2023, 2:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-set-input-to-validate-of-t5-model%2F32087%2F1 "2023-02-20T14:14:15Z")

</div>

I’m fintuning T5 for superglue datasets.

Now, I use first half of ‘validation’ set as validation set and the second half of ‘validation’ set as test set.

I’m little bit confused of how to pass `decoder_input_ids` on validation step.

For example,  
`input_ids`, `attention_mask` could be obtained from `tokenize("My model outperformed baseline models")`.  
And in my opinion, I should give just start token as `decoder_input_ids` with the variables above to `forward()` . Is it correct?  
This results in the length of the output become 1(same as start token).  
Do I need to just pass tokenized ‘labels’ without `decoder_input_ids` like in training step?

And I’m not sure if I need to use `generate()` instead of `forward()`.

---

<div class="post-metadata">

**Author:** ![joaogante](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/joaogante/32/20106_2.png) [@joaogante](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjoaogante)%5C
**Post date:** [February 21, 2023, 3:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-set-input-to-validate-of-t5-model%2F32087%2F2 "2023-02-21T15:44:29Z")

</div>

Hey @kwonmha 👋 Have you seen our examples? [This one](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification), focused on GLUE, may give you the answers you need 🙂
