# Adapting BLIP2 for zero-shot classification

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadapting-blip2-for-zero-shot-classification%2F46812%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 14, 2023, 9:53am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadapting-blip2-for-zero-shot-classification%2F46812 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fatomwalk12)%5C
**Post date:** [August 8, 2024, 8:13am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadapting-blip2-for-zero-shot-classification%2F46812%2F5 "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]](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftext-classification-using-blip2%2F100978).  
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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadapting-blip2-for-zero-shot-classification%2F46812)._
