在阿里通義今晨發(fā)布Qwen3-VL系列新成員Qwen3-VL-4B和Qwen3-VL-8B之際,英特爾于今日同步宣布,已經(jīng)在酷睿 Ultra 平臺(tái)上完成對(duì)這些最新模型的適配。此次Day 0支持延續(xù)了十天前對(duì)Qwen3新模型快速適配的卓越速度,再次印證了英特爾在加速AI技術(shù)創(chuàng)新、積極構(gòu)建模型合作生態(tài)方面的深度投入與行動(dòng)力。

此次發(fā)布的Qwen3-VL系列新模型,在延續(xù)其卓越的文本理解和生成、深度視覺感知與推理、更長的上下文長度、增強(qiáng)的空間與視頻動(dòng)態(tài)理解及強(qiáng)大代理交互能力的同時(shí),憑借其輕量化的模型參數(shù)設(shè)計(jì),在英特爾酷睿Ultra平臺(tái)上可以實(shí)現(xiàn)高效部署,為復(fù)雜的圖片和視頻理解及智能體應(yīng)用帶來更出色的性能與體驗(yàn)。

為確保用戶能夠獲得更流暢的AI體驗(yàn),英特爾在酷睿Ultra平臺(tái)上,對(duì)Qwen3-VL-4B 模型進(jìn)行了創(chuàng)新的CPU、GPU和NPU混合部署,充分釋放了XPU架構(gòu)的強(qiáng)大潛力。通過精巧地分解并優(yōu)化復(fù)雜的視覺語言模型負(fù)載鏈路,并將更多負(fù)載精準(zhǔn)調(diào)度至專用的NPU上,此次英特爾的Day 0支持實(shí)現(xiàn)了:

以下的演示視頻充分地展示了該成果:Qwen3-VL-4B模型在圖片理解與分析任務(wù)中,在高效利用NPU算力的同時(shí),顯著降低了CPU的資源占用。

(演示視頻: 在英特爾在酷睿Ultra平臺(tái)上,Qwen3-VL-4B釋放系統(tǒng)資源帶來流暢體驗(yàn))

快速上手指南

第一步 環(huán)境準(zhǔn)備

基于以下命令可以完成模型部署任務(wù)在Python上的環(huán)境安裝。

python -m venv py_venv 

./py_venv/Scripts/activate.bat 
pip uninstall -y optimum transformers optimum-intel

pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 –index-url https://download.pytorch.org/whl/cpu

pip install git+https://github.com/openvino-dev-samples/optimum.git@qwen3vl

pip install git+https://github.com/openvino-dev-samples/transformers.git@qwen3vl

pip install git+https://github.com/openvino-dev-samples/optimum-intel.git@qwen3vl

pip install –pre -U openvino –extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly

該示例在以下環(huán)境中已得到驗(yàn)證:

第二步 模型下載和轉(zhuǎn)換

在部署模型之前,首先需要將原始的PyTorch模型轉(zhuǎn)換為OpenVINOTM的IR靜態(tài)圖格式,并對(duì)其進(jìn)行壓縮,以實(shí)現(xiàn)更輕量化的部署和最佳的性能表現(xiàn)。通過Optimum提供的命令行工具optimum-cli,可以一鍵完成模型的格式轉(zhuǎn)換和權(quán)重量化任務(wù):

optimum-cli export openvino –model Qwen/Qwen3-VL-4B-Instruct –trust-remote-code –weight-format int4 –task image-text-to-text Qwen3-VL-4B-Instruct-ov

開發(fā)者可以根據(jù)模型的輸出結(jié)果,調(diào)整其中的量化參數(shù),包括:

第三步 模型部署

除了利用Optimum-cli工具導(dǎo)出OpenVINOTM模型外,我們還在Optimum-intel中重構(gòu)了Qwen3-VL和Qwen3-VL-MOE模型的Pipeline,將官方示例示例中的的Qwen3VLForConditionalGeneration替換為OVModelForVisualCausalLM便可快速利用OpenVINOTM進(jìn)行模型部署,完整示例可參考以下代碼流程。

from transformers import AutoProcessor

from optimum.intel import OVModelForVisualCausalLM

# default: Load the model on the available device(s)

model = OVModelForVisualCausalLM.from_pretrained(

    “Qwen3-VL-4B-Instruct-ov”, device=”GPU”

)

processor = AutoProcessor.from_pretrained(“Qwen3-VL-4B-Instruct-ov”)

messages = [

    {

        “role”: “user”,

        “content”: [

            {

                “type”: “image”,

                “image”: “https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg”,

            },

            {“type”: “text”, “text”: “Describe this image.”},

        ],

    }

]

# Preparation for inference

inputs = processor.apply_chat_template(

    messages,

    tokenize=True,

    add_generation_prompt=True,

    return_dict=True,

    return_tensors=”pt”

)

# Inference: Generation of the output

generated_ids = model.generate(**inputs, max_new_tokens=128)

generated_ids_trimmed = [

    out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)

]

output_text = processor.batch_decode(

    generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False

)

print(output_text)

以下為該模型在圖像理解任務(wù)中的輸出示例:

(圖片由AI生成,僅做效果演示)

‘This is a heartwarming, sun-drenched photograph capturing a tender moment between a woman and her dog on a beach at sunset.\n\n**Key Elements:**\n\n*   **The Subjects:** A young woman with long dark hair, wearing a plaid shirt, sits on the sand. Beside her, a large, light-colored dog, likely a Labrador Retriever, sits attentively, wearing a harness. The two are engaged in a playful, paw-to-paw high-five or “pawshake” gesture, a clear sign of their bond.\n*   **The Setting:** They are on a wide, sandy beach.

CPU 代號(hào)名設(shè)備?模型精度輸入規(guī)模輸出規(guī)模第二個(gè)+ token/
Lunar Lake英特爾? 酷睿? Ultra 7 258V(XPU)Qwen3-VL-4B-InstructNF4656(1024 for LLM)12822.7

*性能數(shù)據(jù)基于以下測試獲得:在搭載酷睿Ultra 7 258V處理器的平臺(tái)上,采用OpenVINO框架2025.4.0.dev20250922版本,所有計(jì)算均在XPU上完成。測試評(píng)估了首個(gè)token延遲和在nf4-mixed-cw-sym精度設(shè)置下處理1K輸入時(shí)的平均吞吐量。為保證數(shù)據(jù)可靠性,每個(gè)測試均在預(yù)熱后執(zhí)行三次,并取平均值作為最終結(jié)果。性能因使用方式、配置和其他因素而異。請?jiān)L問www.Intel.com/PerformanceIndex了解更多信息。

性能結(jié)果基于測試時(shí)的配置狀態(tài),可能未反映所有公開可用的更新內(nèi)容。請參閱相關(guān)文檔以獲取配置詳情。沒有任何產(chǎn)品或組件能夠保證絕對(duì)安全。您的實(shí)際成本和結(jié)果可能會(huì)有所不同。


相關(guān)英特爾技術(shù)可能需要啟用相關(guān)硬件、軟件或激活服務(wù)。

分享到

lixiangjing

算力豹主編

相關(guān)推薦