Qwen3-VL-2B-Instruct-int4-ov

Description

This is Qwen3-VL-2B-Instruct model converted to the OpenVINO™ IR (Intermediate Representation) format with weights compressed to INT4 by NNCF.

Quantization Parameters

Weight compression was performed using nncf.compress_weights with the following parameters:

  • mode: INT4_ASYM
  • group_size: 128
  • ratio: 1.0
  • awq: True

For more information on quantization, check the OpenVINO model optimization guide.

Compatibility

The provided OpenVINO™ IR model is compatible with:

  • OpenVINO version 2026.3.0 and higher
  • Optimum Intel built from the main branch

Running Model Inference with Optimum Intel

  1. Install packages required for using Optimum Intel integration with the OpenVINO backend:
pip install -U optimum[openvino] transformers==5.0.0
  1. Run model inference:
from optimum.intel.openvino import OVModelForVisualCausalLM
from transformers import AutoProcessor
from PIL import Image
import requests

model_id = "OpenVINO/Qwen3-VL-2B-Instruct-int4-ov"
processor = AutoProcessor.from_pretrained(model_id)
model = OVModelForVisualCausalLM.from_pretrained(model_id)

url = "https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11"
image = Image.open(requests.get(url, stream=True).raw)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": "What is unusual in this picture?"},
        ],
    }
]

text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=text, images=[image], return_tensors="pt")
input_len = inputs["input_ids"].shape[-1]

output = model.generate(**inputs, do_sample=False, max_new_tokens=100)
response = processor.decode(output[0][input_len:], skip_special_tokens=True)
print(response)

For more examples and possible optimizations, refer to the Inference with Optimum Intel.

Running Model Inference with OpenVINO GenAI

  1. Install packages required for using OpenVINO GenAI.
pip install openvino-genai huggingface_hub pillow
  1. Download model from HuggingFace Hub
import huggingface_hub as hf_hub

model_id = "OpenVINO/Qwen3-VL-2B-Instruct-int4-ov"
model_path = "Qwen3-VL-2B-Instruct-int4-ov"

hf_hub.snapshot_download(model_id, local_dir=model_path)
  1. Run model inference:
import numpy as np
import openvino as ov
import openvino_genai as ov_genai
import requests
from PIL import Image

device = "CPU"
pipe = ov_genai.VLMPipeline(model_path, device)

url = "https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11"
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
image_tensor = ov.Tensor(np.array(image)[None])

print(pipe.generate("What is unusual in this picture?", image=image_tensor, max_new_tokens=100))

More GenAI usage examples can be found in OpenVINO GenAI library docs and samples

You can find more detailed usage examples in OpenVINO Notebooks:

Limitations

Check the original model card for limitations.

Legal information

The original model is distributed under Apache License Version 2.0 license. More details can be found in Qwen3-VL-2B-Instruct.

Disclaimer

Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See Intel's Global Human Rights Principles. Intel's products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.

Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OpenVINO/Qwen3-VL-2B-Instruct-int4-ov

Quantized
(106)
this model