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:1pip install -U "git+https://github.com/huggingface/optimum-intel.git" --extra-index-url https://download.pytorch.org/whl/cpu
2pip install -U "transformers==5.15" "opencv-python" "Pillow"
3pip install --pre -U "openvino>=2026.3.1" --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly1from optimum.intel.openvino import OVModelForVisualCausalLM
2from transformers import AutoProcessor
3from transformers.image_utils import load_image
4
5model_id = "OpenVINO/Muse-Glimmer-30B-int4-ov"
6
7processor = AutoProcessor.from_pretrained(model_id, padding_side="left")
8model = OVModelForVisualCausalLM.from_pretrained(model_id)
9
10image_url = (
11 "https://huggingface.co/datasets/huggingface/documentation-images/"
12 "resolve/main/p-blog/candy.JPG"
13)
14image = load_image(image_url)
15
16messages = [
17 {
18 "role": "user",
19 "content": [
20 {"type": "image", "url": image_url},
21 {"type": "text", "text": "What animal is on the candy?"},
22 ],
23 }
24]
25
26# OnyxProcessor expects rendered text and a flat list of PIL images.
27text = processor.apply_chat_template(
28 messages,
29 tokenize=False,
30 add_generation_prompt=True,
31)
32inputs = processor(
33 text=[text],
34 images=[image],
35 padding=True,
36 return_tensors="pt",
37)
38
39outputs = model.generate(**inputs, do_sample=False, max_new_tokens=100)
40generated_ids = outputs[:, inputs["input_ids"].shape[1]:]
41response = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
42print(response)1pip install -U "huggingface_hub" "Pillow" "requests"
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/Muse-Glimmer-30B-int4-ov"
4model_path = "Muse-Glimmer-30B-int4-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"
8pipe = ov_genai.VLMPipeline(model_path, device)
9
10image_url = (
11 "https://huggingface.co/datasets/huggingface/documentation-images/"
12 "resolve/main/p-blog/candy.JPG"
13)
14image = Image.open(requests.get(image_url, stream=True).raw).convert("RGB")
15image_tensor = ov.Tensor(np.array(image))
16
17response = pipe.generate(
18 "What animal is on the candy?",
19 image=image_tensor,
20 max_new_tokens=100,
21)
22print(response)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/Muse-Glimmer-30B-int4-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/Muse-Glimmer-30B-int4-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/p-blog/candy.JPG"
)
stream = client.chat.completions.create(
model="OpenVINO/Muse-Glimmer-30B-int4-ov",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": image_url}},
{"type": "text", "text": "What animal is on the candy?"},
],
}
],
stream=True,
extra_body={"chat_template_kwargs": {"reasoning_strength": "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)