Skip to main content

Model guide

Qwen3-VL Embedding 2B

Qwen3-VL-Embedding 2B creates search representations from text and visual inputs such as images or screenshots. Use it when the thing you need to retrieve is visual, rather than asking a text embedder to understand an image filename. Your index and preprocessing must support this multimodal embedding workflow.

2BEmbedding32,768 token contextView the model card →

At a glance

Parameters
2B
Accepts
Text · Image · Screenshot · Video · Mixed-modal input
Returns
Vectors
Published context limit
32,768 tokens
Model format
safetensors
Software and download hosts
sentence-transformers. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Model-weight download
4.26 GB of BF16 weights · native workflow
Languages
30+ languages
License
Apache-2.0

Include one real image in the batch and measure its preprocessing and vectors.

Best for

  • Image retrieval — returns vectors.
  • Search mixed text and screenshots. Start with a known screenshot, describe it in a query, and inspect the returned image.

Choose something else when

  • Use a text-only embedding model if your collection contains no images and that model retrieves the right passages.

Using this model for document search

Select this model for the document-search step in an app that supports it. Keep the model that generates answers separate. Check document chunk length and any required query or document prefixes in the model’s instructions.

Changing the embedding model changes the document vectors. Rebuild the document index rather than mixing vectors from different models.

Using image input

Embed the screenshot and the text query using the publisher’s multimodal processor, then compare their vectors.

First setup

This model returns vectors for text and images. Use a separate chat model if you need a written answer. The publisher model card supplies the Sentence Transformers workflow and default 2,048-dimensional output.

Install the packages in a Python environment:

python -m pip install -U sentence-transformers pillow

Begin with two text passages

Save this as text_retrieval.py and run python text_retrieval.py:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Qwen/Qwen3-VL-Embedding-2B", device="cpu")
queries = model.encode(["When does the meeting start?"], batch_size=1)
documents = model.encode(
    ["The meeting starts at 10:30.", "Lunch is at noon."],
    batch_size=1,
)
print(queries.shape, documents.shape)
print(model.similarity(queries, documents))

With the default dimensions, the shapes are (1, 2048) and (2, 2048). The next output contains two similarity values. Check whether the meeting passage ranks above the unrelated lunch passage. A high similarity is not an answer or a probability that a passage is correct.

Retrieve a local image

Take two clear photographs for this exercise: a note reading Meeting 10:30 saved as meeting.png, and a note reading Lunch 12:00 saved as lunch.png. Put them in the same folder as the following script. Use only these simple test images while checking the workflow. The structured inputs below contain the image itself; they do not supply the answer as a text label.

Save this as image_retrieval.py and run python image_retrieval.py from that folder:

from PIL import Image
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Qwen/Qwen3-VL-Embedding-2B", device="cpu")
with Image.open("meeting.png") as meeting, Image.open("lunch.png") as lunch:
    documents = [
        {"image": meeting.convert("RGB")},
        {"image": lunch.convert("RGB")},
    ]
    query_vectors = model.encode(
        ["A note saying that a meeting starts at 10:30."], batch_size=1
    )
    document_vectors = model.encode(documents, batch_size=1)

scores = model.similarity(query_vectors, document_vectors)[0]
for filename, score in zip(["meeting.png", "lunch.png"], scores):
    print(filename, float(score))

Check whether meeting.png ranks first. Then change the query to A note saying that lunch is at noon. and inspect whether lunch.png ranks first. Incorrect ranking is a failed retrieval check even when the vectors have the expected shape. Compare the ranking with the pictures; the numerical scores can vary with the software and loading settings.

The first model load downloads files; later execution still needs those files locally. CPU execution avoids assuming CUDA but can be slow. Image preparation adds memory beyond the text-only check, so begin with one image per batch and close other model processes if loading runs out of memory. An app that accepts ordinary text embeddings does not necessarily support these structured image inputs. Keep the same model, dimensions and input processing when creating and querying an index. Rebuild the index when you change them. See Sentence Transformers’ supported input types for structured and image inputs.