# Predict beam size on Seq2SeqTrainer

**URL:** <https://discuss.huggingface.co/t/predict-beam-size-on-seq2seqtrainer/8393>\
**Category:** 🤗Transformers\
**Created:** [July 15, 2021, 4:17pm UTC](https://discuss.huggingface.co/t/predict-beam-size-on-seq2seqtrainer/8393 "2021-07-15T16:17:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSamDav](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ssamdav/32/29888_2.png) [@SSamDav](https://discuss.huggingface.co/u/SSamDav)\
**Post date:** [July 15, 2021, 4:17pm UTC](https://discuss.huggingface.co/t/predict-beam-size-on-seq2seqtrainer/8393/1 "2021-07-15T16:17:22Z")

</div>

Hi,

There is any way to select the beam size of the evaluation step of Seq2SeqTrainer?

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](https://discuss.huggingface.co/u/sgugger)\
**Post date:** [July 15, 2021, 5:03pm UTC](https://discuss.huggingface.co/t/predict-beam-size-on-seq2seqtrainer/8393/2 "2021-07-15T17:03:21Z")

</div>

You can set it in `trainer.evaluate(num_beams=...)` or set the default you like when instantiating your model:

```auto
model = AutoModelForXXX(checkpoint, num_beams=...)

```
