
回复
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
pip install -U modelscope
modelscope download --model Qwen/Qwen3-Omni-30B-A3B-Instruct --local_dir ./Qwen3-Omni-30B-A3B-Instruct
需要预留:66G;
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开始;
运行截图:
显存占用截图:
显存占用:
73g/80g
image-20250925100134017
耗费了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小新