# Contrastive search output type issue

**URL:** <https://discuss.huggingface.co/t/contrastive-search-output-type-issue/169349>\
**Category:** 🤗Transformers\
**Created:** [October 23, 2025, 12:24am UTC](https://discuss.huggingface.co/t/contrastive-search-output-type-issue/169349 "2025-10-23T00:24:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jood-canva](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jood-canva/32/55072_2.png) [@jood-canva](https://discuss.huggingface.co/u/jood-canva)\
**Post date:** [October 23, 2025, 12:24am UTC](https://discuss.huggingface.co/t/contrastive-search-output-type-issue/169349/1 "2025-10-23T00:24:20Z")

</div>

Hi,

I think the current contrastive search implementation overrides the model Output type to the default type, which can create issue for models that rely on subclasses. I have opened a PR here [transformers-community/contrastive-search · allow Output subclasses in contrastive search](https://huggingface.co/transformers-community/contrastive-search/discussions/4) , not sure how I can contact someone from the team to have a look. Happy to discuss, thanks in advance!
