# Zero-shot classification using models not explicitly meant for that?

**URL:** <https://discuss.huggingface.co/t/zero-shot-classification-using-models-not-explicitly-meant-for-that/143034>\
**Category:** 🤗Transformers\
**Created:** [February 26, 2025, 12:08pm UTC](https://discuss.huggingface.co/t/zero-shot-classification-using-models-not-explicitly-meant-for-that/143034 "2025-02-26T12:08:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MALEAU](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@MALEAU](https://discuss.huggingface.co/u/MALEAU)\
**Post date:** [February 26, 2025, 12:08pm UTC](https://discuss.huggingface.co/t/zero-shot-classification-using-models-not-explicitly-meant-for-that/143034/1 "2025-02-26T12:08:40Z")

</div>

Hello

I have recently discovered XLM Roberta and Bart-large-mnli which are models that can really easily be used for zero-shot classification (with custom labels and hypothetis…), using HF pipeline (transformers).

I am looking for more powerful models doing the same thing but I have not found anything really interesting. It is quite important that model in question is able to understand french (roberta does) and very big model should do as well.

I saw that Mistral-Small-Instruct-2409 is a great model, which can be used for commercial use (I am doing this for work).

My question is then:  
`it is technically possible to adapt this kind of bigger models for zero-shot classification, using HF transformers pipiline, or not ? then do you have any hint on how to proceed?`

Thx a lot

### References

- [joeddav/xlm-roberta-large-xnli](https://huggingface.co/joeddav/xlm-roberta-large-xnli)
- [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [February 26, 2025, 3:58pm UTC](https://discuss.huggingface.co/t/zero-shot-classification-using-models-not-explicitly-meant-for-that/143034/2 "2025-02-26T15:58:43Z")

</div>

It seems to be possible. ~Instruct is usually probably adjusted to be suitable for chatbots, etc., but I think ~Base is intended for use in various tasks.

> [@Text Classification With LLM](https://discuss.huggingface.co/t/text-classification-with-llm/101480):
>
> Looking for a multi language model to categorize news articles by their titles that can be fine-tuned with labeled data. It shouldn’t rely on word-based methods. I have used SetFit, but the results aren’t great. It would be helpful if anyone can point me in the right direction. I’m looking to finetune the model on news title slight_smile

> **[Multilabel Classification using Mistral-7B on a single GPU with quantization...](https://huggingface.co/blog/sirluk/multilabel-llm)**
>
> A Blog post by Lukas on Hugging Face
