# Seq-2-Seq Predictions for Longer Sequences and Question for compute metrics function

**URL:** <https://discuss.huggingface.co/t/seq-2-seq-predictions-for-longer-sequences-and-question-for-compute-metrics-function/12887>\
**Category:** Beginners\
**Created:** [December 16, 2021, 8:31am UTC](https://discuss.huggingface.co/t/seq-2-seq-predictions-for-longer-sequences-and-question-for-compute-metrics-function/12887 "2021-12-16T08:31:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityay1221](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@adityay1221](https://discuss.huggingface.co/u/adityay1221)\
**Post date:** [December 16, 2021, 8:31am UTC](https://discuss.huggingface.co/t/seq-2-seq-predictions-for-longer-sequences-and-question-for-compute-metrics-function/12887/1 "2021-12-16T08:31:58Z")

</div>

Hello all I am new to the Hugging Face forums,and pretty new tot the Transformers library in general, I have two questions that I was specially looking for answers, pardon for my stupidity.

**TLDR**

```auto

Transformers Noob

Finetuning Seq-2-Seq models on an internal dataset

- Unable to understand how to change the model configs for longer sequence length predictions

- Unable to understand how to write my own compute metrics function for eval section of the the trainier

```

I am working on a problem which is Seq-2-Seq which takes user prompts as an inputs and generates text which is later used for downstream processing of certain rule based systems. The data which I am using is an internal data which can’t be shared to the public, right now I have tried to finetune google/t5-base and google/mt5-base on my dataset, the outputs that I have gotten are pretty good too, but the only issue I see is that the outputs sequence is not complete (there is more text to be generated) which I suspect is because the default output length is not long enough

Also I am using the trainer API for training my model, I don’t really understand the `compute metrics` function and how it’s supposed to work, the default ones that I find on the forums throw some compute errors, can anyone please help me figuring out these two things thank you 🙂
