Model reference · open weights

blip2-opt

LLMs Salesforce Vision + text 2 builds Open weights 447k dl/mo

blip2-opt is an open-weight language model from Salesforce. blip2-opt-6.7b (FP32) weighs 15.5 GB; the smallest configuration that runs it is RTX 4090 24 GB.

  • BLIP-2 is an image-text-to-text model developed by Salesforce that uses a frozen OPT-2.7b language model and a Querying Transformer to bridge image and text embeddings.
  • It supports tasks such as image captioning, visual question answering, and chat-like conversations in English.
  • The model has 3.7B parameters and is released under the MIT license.

Summary of the Salesforce/blip2-opt-2.7b model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released bySalesforce
Released2023-02-06
Parameters3.7B
VRAM15.5 GB for the weights

What it runs on

Memory and cards for blip2-opt-6.7b (FP32)

15.5 GBweights, file size
524 MBcache per 1K tokens
2.0 GBruntime overhead, at least
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
———
RTX 3090 24 GB1—11K23.4 GB
RTX 4090 24 GB1—10K23.4 GB
RTX 5090 32 GB3—25K31.0 GB
L40S 48 GB6149K44.0 GB
A100 80 GB143113K78.2 GB
H100 80 GB133106K78.1 GB
RTX PRO 6000 Blackwell 96 GB174128K93.8 GB
DGX Spark (GB10) 128 GB unified205128K107 GB
H200 141 GB276128K138 GB
B200 180 GB369128K176 GB
2× RTX 4060 Ti 16 GB
tensor parallel
2—21K15.4 GB a card
2× RTX 5090 32 GB
tensor parallel
9279K31.0 GB a card
2× L40S 48 GB
tensor parallel
153127K44.0 GB a card
4× RTX 4090 24 GB
tensor parallel
164128K23.4 GB a card
4× RTX 3090 24 GB
tensor parallel
164128K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
121.8 GB34.7 GB
539.0 GB103 GB
851.8 GB155 GB
1686.2 GB292 GB
32155 GB567 GB
64292 GB1117 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
blip2-opt-2.7b ↗ 3.7BFP32 7.5 GBRTX 4060 Ti 16 GB
blip2-opt-6.7b (above) ↗ 7.8BFP32 15.5 GBRTX 4090 24 GB

From the model card

What Salesforce says about blip2-opt

Read the model card

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.

alt="drawing" width="600"/>

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)
#

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms