偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)

發(fā)布于 2025-9-30 06:43
瀏覽
0收藏

9月23日,阿里巴巴旗下通義千問團(tuán)隊發(fā)布了業(yè)界首個原生端到端全模態(tài)大模型Qwen3-Omni。這款模型能夠無縫處理文本、圖像、音頻和視頻等多種輸入形式,并通過實時流式響應(yīng)同時生成文本與自然語音輸出。

Qwen3-Omni在36項音頻及音視頻基準(zhǔn)測試中斬獲22項總體SOTA(業(yè)界最優(yōu))和32項開源SOTA,性能超越Gemini-2.5-Pro、GPT-4o-Transcribe等閉源強模型。

這標(biāo)志著國產(chǎn)大模型在多模態(tài)領(lǐng)域的重大突破。

本文主要介紹以下,如何從零開始搭建Qwen3-Omni-30B-A3B-Instruct的python運行環(huán)境;

一、環(huán)境安裝

完整的命令

# 創(chuàng)建虛擬環(huán)境
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

需要預(yù)留:66G;

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

三、vllm 啟動服務(wù)

啟動命令

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 1

CUDA_VISIBLE_DEVICES=0  :測試機有多張卡,選擇你需要部署的卡的id即可,id從0開始;

運行截圖:

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

顯存占用截圖:

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

顯存占用:

73g/80g

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

image-20250925100134017

四、postman調(diào)用接口測試

獲取模型列表:

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

普通問答測試

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

增加圖片和音頻的輸入

耗費了20秒;

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

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

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

輸入的問題:

你能看到和聽到什么?用一句話回答。

輸入的圖片:

Qwen3-Omni-30B-A3B-Instruct 部署實戰(zhàn)保姆及教程(圖片、語音、視頻全模態(tài)識別)-AI.x社區(qū)

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部署復(fù)現(xiàn)完成,如果你有張80G的顯卡,可以部署玩一玩!

本文轉(zhuǎn)載自??AI小新??,作者:AI小新

已于2025-9-30 11:16:37修改
收藏
回復(fù)
舉報
回復(fù)
相關(guān)推薦