# Contrastive search output type issue

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrastive-search-output-type-issue%2F169349%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 23, 2025, 12:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrastive-search-output-type-issue%2F169349 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjood-canva)%5C
**Post date:** [October 23, 2025, 12:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcontrastive-search-output-type-issue%2F169349%2F1 "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!
