# Adapting BLIP2 for zero-shot classification

**URL:** <https://discuss.huggingface.co/t/adapting-blip2-for-zero-shot-classification/46812>\
**Category:** 🤗Transformers\
**Created:** [July 14, 2023, 9:53am UTC](https://discuss.huggingface.co/t/adapting-blip2-for-zero-shot-classification/46812 "2023-07-14T09:53:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![atomwalk12](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@atomwalk12](https://discuss.huggingface.co/u/atomwalk12)\
**Post date:** [August 8, 2024, 8:13am UTC](https://discuss.huggingface.co/t/adapting-blip2-for-zero-shot-classification/46812/5 "2024-08-08T08:13:03Z")

</div>

Were you able to solve the task? I noticed that you are using a slightly different approach with respect to [[1]](https://discuss.huggingface.co/t/text-classification-using-blip2/100978).  
In the previous post, the output field `qformer_outputs.last_hidden_state` is used to synthesis the information from the `qformer` using the `Blip2ForConditionalGeneration` class. Your approach seems to be using `Blip2Model`.

As far as my understanding goes, the q-former already makes use of the vision model to generate its output. Could anyone with more experience explain which of these two methods is more effective?

---

_[View the full topic](https://discuss.huggingface.co/t/adapting-blip2-for-zero-shot-classification/46812)._
