Views
No views yet
EXPERIMENTAL MODEL This model has not been fully validated with OpenVINO and currently requires development versions of Optimum Intel and OpenVINO. It may be fully supported and validated in future releases.
nncf.compress_weights with the following parameters:mode: INT8_ASYMratio: 1.01pip install -U "git+https://github.com/huggingface/optimum-intel.git" torchvision Pillow --extra-index-url https://download.pytorch.org/whl/cpu
2pip install --pre -U openvino --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
3pip install -U "transformers==5.2"1import requests
2from PIL import Image
3from transformers import AutoProcessor
4from optimum.intel.openvino import OVModelForVisualCausalLM
5
6model_id = "OpenVINO/Qwen3.8-27B-int8-ov"
7processor = AutoProcessor.from_pretrained(model_id)
8model = OVModelForVisualCausalLM.from_pretrained(model_id)
9
10url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
11image = Image.open(requests.get(url, stream=True).raw)
12
13messages = [
14 {
15 "role": "user",
16 "content": [
17 {"type": "image"},
18 {"type": "text", "text": "Describe this image."},
19 ],
20 }
21]
22
23text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
24inputs = processor(text=[text], images=[image], return_tensors="pt")
25
26outputs = model.generate(**inputs, max_new_tokens=200)
27print(processor.batch_decode(outputs[:, inputs.input_ids.shape[1] :], skip_special_tokens=True)[0])1pip install -U huggingface_hub Pillow
2pip install --pre -U openvino openvino-tokenizers openvino-genai --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly1import huggingface_hub as hf_hub
2
3model_id = "OpenVINO/Qwen3.8-27B-int8-ov"
4model_path = "Qwen3.8-27B-int8-ov"
5
6hf_hub.snapshot_download(model_id, local_dir=model_path)1import numpy as np
2import openvino as ov
3import openvino_genai as ov_genai
4import requests
5from PIL import Image
6
7device = "CPU"
8model_path = "Qwen3.8-27B-int8-ov"
9pipe = ov_genai.VLMPipeline(model_path, device)
10
11url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
12image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
13image_tensor = ov.Tensor(np.array(image)[None])
14
15print(pipe.generate("Describe this image.", image=image_tensor, max_new_tokens=200))curl -o ovms.zip https://storage.openvinotoolkit.org/repositories/openvino_model_server/packages/weekly/latest/ovms_windows_2026.4.0_python_on.zip
tar -xzf ovms.zip
ovms\setupvars.bat
set OVMS_MEDIA_URL_ALLOW_REDIRECTS=1
ovms.exe --rest_port 8000 --source_model OpenVINO/Qwen3.8-27B-int8-ov --model_repository_path C:\models --allowed_media_domains allexport GPU_ARGS=$(if ls /dev/dri/render* >/dev/null 2>&1; then echo "--device /dev/dri --group-add $(stat -c '%g' /dev/dri/render* | head -n1)"; fi)
docker run -d ${GPU_ARGS} -e "OVMS_MEDIA_URL_ALLOW_REDIRECTS=1" -u $(id -u):$(id -g) --rm -p 8000:8000 -v ${HOME}/models:/models:rw openvino/model_server:weekly \
--rest_port 8000 --model_repository_path /models --source_model OpenVINO/Qwen3.8-27B-int8-ov --allowed_media_domains allpip install openaifrom openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="unused"
)
image_url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"
stream = client.chat.completions.create(
model="OpenVINO/Qwen3.8-27B-int8-ov",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": image_url}},
{"type": "text", "text": "Describe this image."},
],
}
],
stream=True,
extra_body={"chat_template_kwargs": {"reasoning_effort": "medium"}},
tools=[],
)
printing_reasoning_started = False
printing_content_started = False
for chunk in stream:
if not chunk.choices:
continue
delta = chunk.choices[0].delta
content = getattr(delta, "content", None)
reasoning = getattr(delta, "reasoning_content", None)
if content:
if not printing_content_started:
printing_content_started = True
print("\ncontent:\n", end="", flush=True)
print(content, end="", flush=True)
if reasoning:
if not printing_reasoning_started:
printing_reasoning_started = True
print("reasoning_content:\n", end="", flush=True)
print(reasoning, end="", flush=True)