/ Модель

Характеристики

Размер весов
30,5 ГБ
Лицензия
MIT
Архитектура
blip-2 · dense
Опубликована
10 июл 2026

blip2-opt-2.7b

Изображение и текст → текст

Производная модели Salesforce/blip2-opt-2.7b. Предобученная мультимодальная модель BLIP-2 с OPT-2.7b для генерации подписей, ответов на вопросы и диалогов по изображениям.

14скачиваний за 30 дней0лайковвеса обновлены10 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображение → текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Карточка модели Bercraft/blip2-opt-2.7b на Hugging Face совпадает с карточкой Salesforce/blip2-opt-2.7b, поэтому описание составлено по ней.

BLIP-2 OPT-2.7b — предобученная мультимодальная модель Salesforce, опубликованная на Hugging Face. Она объединяет визуальный энкодер типа CLIP, трансформер Q-Former и языковую модель OPT на 2,7 млрд параметров. Энкодер изображений и OPT используют замороженные предварительно обученные веса, а Q-Former связывает представления изображения с языковой моделью.

Модель генерирует текст по изображению и при необходимости текстовой подсказке. Она предназначена для создания подписей к изображениям, визуальных ответов на вопросы и диалогов с учётом изображения. Модель принимает изображения и текст, а выдаёт текст; в карточке указана поддержка английского языка.

Возможны предвзятые ответы, галлюцинации и ошибки, а разнообразие генерации может быть ограничено. Модель не оценивалась в реальных приложениях, поэтому перед использованием следует проверять её точность, безопасность и справедливость. Лицензия — MIT; в карточке также отмечено исследовательское назначение релиза.

Сценарии применения

  • создание подписей к изображениям
  • ответы на вопросы о содержимом изображения
  • диалог с моделью с учётом изображения

Ограничения

Модель может выдавать предвзятые или ошибочные ответы и галлюцинировать; её качество и безопасность не оценивались в реальных приложениях. Перед применением рекомендуется оценить точность, безопасность и справедливость для конкретного сценария.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

BLIP-2, OPT-2.7b, pre-trained only

BLIP-2 model, leveraging OPT-2.7b (a large language model with 2.7 billion parameters). It was introduced in the paper BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models by Li et al. and first released in this repository.

Disclaimer: The team releasing BLIP-2 did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

BLIP-2 consists of 3 models: a CLIP-like image encoder, a Querying Transformer (Q-Former) and a large language model.

The authors initialize the weights of the image encoder and large language model from pre-trained checkpoints and keep them frozen while training the Querying Transformer, which is a BERT-like Transformer encoder that maps a set of "query tokens" to query embeddings, which bridge the gap between the embedding space of the image encoder and the large language model.

The goal for the model is simply to predict the next text token, giving the query embeddings and the previous text.

This allows the model to be used for tasks like:

  • image captioning
  • visual question answering (VQA)
  • chat-like conversations by feeding the image and the previous conversation as prompt to the model

Direct Use and Downstream Use

You can use the raw model for conditional text generation given an image and optional text. See the model hub to look for fine-tuned versions on a task that interests you.

Bias, Risks, Limitations, and Ethical Considerations

BLIP2-OPT uses off-the-shelf OPT as the language model. It inherits the same risks and limitations as mentioned in Meta's model card.

Like other large language models for which the diversity (or lack thereof) of training data induces downstream impact on the quality of our model, OPT-175B has limitations in terms of bias and safety. OPT-175B can also have quality issues in terms of generation diversity and hallucination. In general, OPT-175B is not immune from the plethora of issues that plague modern large language models.

BLIP2 is fine-tuned on image-text datasets (e.g. LAION ) collected from the internet. As a result the model itself is potentially vulnerable to generating equivalently inappropriate content or replicating inherent biases in the underlying data.

BLIP2 has not been tested in real world applications. It should not be directly deployed in any applications. Researchers should first carefully assess the safety and fairness of the model in relation to the specific context they’re being deployed within.

Ethical Considerations

This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people’s lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.

How to use

For code examples, we refer to the documentation.

Memory requirements

The memory requirements differ based on the precision one uses. One can use 4-bit inference using Bitsandbytes, which greatly reduce the memory requirements.

dtypeLargest Layer or Residual GroupTotal SizeTraining using Adam
float32490.94 MB14.43 GB57.72 GB
float16/bfloat16245.47 MB7.21 GB28.86 GB
int8122.73 MB3.61 GB14.43 GB
int461.37 MB1.8 GB7.21 GB

Running the model on CPU

import requests
from PIL import Image
from transformers import Blip2Processor, Blip2ForConditionalGeneration

processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b")

img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' 
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')

question = "how many dogs are in the picture?"
inputs = processor(raw_image, question, return_tensors="pt")

out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True).strip())

Running the model on GPU

In full precision
# pip install accelerate
import requests
from PIL import Image
from transformers import Blip2Processor, Blip2ForConditionalGeneration

processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", device_map="auto")

img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' 
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')

question = "how many dogs are in the picture?"
inputs = processor(raw_image, question, return_tensors="pt").to("cuda")

out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True).strip())
In half precision (float16)
# pip install accelerate
import torch
import requests
from PIL import Image
from transformers import Blip2Processor, Blip2ForConditionalGeneration

processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16, device_map="auto")

img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' 
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')

question = "how many dogs are in the picture?"
inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16)

out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True).strip())
In 8-bit precision (int8)
# pip install accelerate bitsandbytes
import torch
import requests
from PIL import Image
from transformers import Blip2Processor, Blip2ForConditionalGeneration

processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True, device_map="auto")

img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' 
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')

question = "how many dogs are in the picture?"
inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16)

out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True).strip())

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
Blip2ForConditionalGeneration
Ревизия весов
57232f0

0 моделей