# EncoderDecoderModel for token classification

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoderdecodermodel-for-token-classification%2F25204%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 29, 2022, 8:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoderdecodermodel-for-token-classification%2F25204 "2022-10-29T20:50:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Logmms](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Logmms](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLogmms)%5C
**Post date:** [October 29, 2022, 8:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoderdecodermodel-for-token-classification%2F25204%2F1 "2022-10-29T20:50:25Z")

</div>

Is there some way I can use an `EncoderDecoderModel` for token classification? I know of course that you can use any `xxxForTokenClassification` model to do token classification. The reason I do not want to use such a `xxxForTokenClassification` model is that I want to use beam search to find an optimal sequence of token labels. As far as I can gather, that is not possible with a `xxxForTokenClassification` model.
