Qwen3-Omni-30B-A3B-Instruct 部署實戰保姆及教程(圖片、語音、視頻全模態識別)
9月23日,阿里巴巴旗下通義千問團隊發布了業界首個原生端到端全模態大模型Qwen3-Omni。這款模型能夠無縫處理文本、圖像、音頻和視頻等多種輸入形式,并通過實時流式響應同時生成文本與自然語音輸出。
Qwen3-Omni在36項音頻及音視頻基準測試中斬獲22項總體SOTA(業界最優)和32項開源SOTA,性能超越Gemini-2.5-Pro、GPT-4o-Transcribe等閉源強模型。
這標志著國產大模型在多模態領域的重大突破。
本文主要介紹以下,如何從零開始搭建Qwen3-Omni-30B-A3B-Instruct的python運行環境;
一、環境安裝
完整的命令
# 創建虛擬環境
conda create -n vllm_omni python=3.12
conda activate vllm_omni
# 安裝uv
pip install uv
# 安裝vllm
git clone -b qwen3_omni https://github.com/wangxiongts/vllm.git
VLLM_USE_PRECOMPILED=1 uv pip install -e . -v --no-build-isolation
# 安裝 Transformers
uv pip install git+https://github.com/huggingface/transformers
uv pip install accelerate
uv pip install qwen-omni-utils -U
uv pip install -U flash-attn --no-build-isolation二、下載omni模型
pip install -U modelscope
modelscope download --model Qwen/Qwen3-Omni-30B-A3B-Instruct --local_dir ./Qwen3-Omni-30B-A3B-Instruct需要預留:66G;

三、vllm 啟動服務
啟動命令
CUDA_VISIBLE_DEVICES=0 vllm serve Qwen3-Omni-30B-A3B-Instruct --port 8901 --host 0.0.0.0 --dtype bfloat16 --max-model-len 32768 --allowed-local-media-path / -tp 1CUDA_VISIBLE_DEVICES=0 :測試機有多張卡,選擇你需要部署的卡的id即可,id從0開始;
運行截圖:

顯存占用截圖:

顯存占用:
73g/80g

image-20250925100134017
四、postman調用接口測試
獲取模型列表:

普通問答測試

增加圖片和音頻的輸入
耗費了20秒;

換成中文問題,方便觀看;

輸入的問題:
你能看到和聽到什么?用一句話回答。
輸入的圖片:

cars
輸入的完整請求示例代碼:
curl http://localhost:8901/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-Omni/demo/cars.jpg"}},
{"type": "audio_url", "audio_url": {"url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-Omni/demo/cough.wav"}},
{"type": "text", "text": "你能看到和聽到什么?用一句話回答。"}
]}
]
}'視頻的輸入同理一樣,本文就不演示了!
至此Qwen3-Omni-30B-A3B-Instruct部署復現完成,如果你有張80G的顯卡,可以部署玩一玩!
本文轉載自??AI小新??,作者:AI小新
已于2025-9-30 11:16:37修改
贊
收藏
回復
分享
微博
QQ
微信
舉報
回復
相關推薦

















