# Zero-shot Classification With Generative Language Models

**URL:** <https://discuss.huggingface.co/t/zero-shot-classification-with-generative-language-models/58309>\
**Category:** 🤗Transformers\
**Created:** [October 12, 2023, 1:17pm UTC](https://discuss.huggingface.co/t/zero-shot-classification-with-generative-language-models/58309 "2023-10-12T13:17:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boehis](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/boehis/32/20124_2.png) [@boehis](https://discuss.huggingface.co/u/boehis)\
**Post date:** [October 12, 2023, 1:17pm UTC](https://discuss.huggingface.co/t/zero-shot-classification-with-generative-language-models/58309/1 "2023-10-12T13:17:59Z")

</div>

I’m trying to use Llama-2 for Zero-Shot (binary) classification. Can anyone point me towards a direction on how this is done correctly? One simple way is ofc. to compare the probability of the model predicting true vs. false. But I’m not sure if there is better approaches?

Best,  
Simon
