腾讯发布 WeMM-Video-35B-A3B 开源音视频理解模型
tencent/WeMM-Video-35BA3B
腾讯发布 WeMM-Video-35B-A3B,这是 WeMM-Video 系列中 35B 总参数、3B 激活参数的 MoE 模型,支持中英文的文本、图像、音频和视频输入并输出文本。
腾讯开源音视频联合理解模型,给出量化版本与 vLLM、SGLang 部署命令,可据此评估落地成本。
WeMM-Video-35B-A3B
概览
WeMM-Video-35B-A3B 是 WeMM-Video 系列中的混合专家(总计 35B,激活 3B)检查点。WeMM-Video 是一个支持中文和英文的双语系列,用于联合视听理解与推理。它接受文本、图像、音频和视频输入,并生成文本回复。
- 权重文件 · BF16 Safetensors · 67.39 GiB 的权重文件
- 量化变体 · FP8 Block128 · AWQ W4A16 · GGUF Q4_K_M · NVFP4 W4A16
能力
WeMM-Video 可以将视频帧与原始音轨结合,用于描述事件、转录语音,并对所见所闻进行推理。它还接受无声视频、独立音频、图像和文本,并以中文或英文生成回复。
架构与训练
视觉和音频编码器将媒体转换为令牌,语言模型将这些令牌与文本一起处理。视频帧带有时间戳。该系列在约 1.2 万亿个多模态令牌上进行了预训练,随后通过多教师 OPD、反重复 MrDPO 以及专家强化学习进行了后训练。
有关系列的详细信息,请参阅 项目概览。
快速开始
设置 Transformers 环境。从 WeMM-Video 仓库根目录运行针对带音轨 MP4 文件的示例脚本。该脚本会从 Hub 加载模型和处理器,并处理视频帧和原始音轨。
python examples/transformers_video.py --model tencent/WeMM-Video-35BA3B \
--video ./clip.mp4 --prompt "Describe what happens and summarize what you hear."
使用 --revision 将模型和处理器固定到 Hub 的某个提交版本。为完整的权重文件、媒体输入和生成缓存配置 GPU 内存。
Python 输入示例
在项目根目录下运行以使用捆绑的媒体文件。每次调用发送一个请求。对于视频,video 仅处理帧,而 video_audio 包含原始音轨。两者均在 video 字段中传入文件路径。
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "tencent/WeMM-Video-35BA3B"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto",
).eval()
def ask(prompt, *media):
content = [*media, {"type": "text", "text": prompt}]
inputs = processor.apply_chat_template(
[{"role": "user", "content": content}],
tokenize=True, return_dict=True, return_tensors="pt",
add_generation_prompt=True, enable_thinking=False,
).to(device=model.device, dtype=model.dtype)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
answer_ids = output[0, inputs.input_ids.shape[1]:]
return processor.tokenizer.decode(answer_ids, skip_special_tokens=True)
print(ask("A 20-minute meeting starts at 09:45. When does it end?"))
print(ask("Describe the planet in this image.", {
"type": "image", "image": "examples/media/apollo-11-earth.jpg",
}))
print(ask("Transcribe the English speech in this recording.", {
"type": "audio", "audio": "examples/media/apollo-11-small-step.wav",
}))
clip = dict(
video="examples/media/apollo-11-first-steps.mp4",
fps=1.0, min_frames=4, max_frames=16, total_pixels=262144,
)
print(ask("Describe what happens on screen.", {"type": "video", **clip}))
print(ask("Describe the scene and summarize the speech.", {"type": "video_audio", **clip}))
聊天模式
指令模式(Instruct mode)是默认模式。调用 processor.apply_chat_template 时,传入 enable_thinking=False 可获得直接回复,或传入 enable_thinking=True 获得推理回复。
服务部署
安装 匹配的 WeMM 运行时补丁。服务指南 列出了依赖配置文件和 Docker 镜像。请选择以下一种服务器方案。
vLLM
对以下命令使用打补丁的 vLLM 0.18.0。发布指南还涵盖了用于 BF16 的打补丁 vLLM 0.31.0。有关设置详情,请参阅 vLLM 配方。
MODEL=tencent/WeMM-Video-35BA3B
vllm serve "$MODEL" --served-model-name "$MODEL" --trust-remote-code --dtype bfloat16 \
--host 127.0.0.1 --port 8000 --max-model-len 8192 \
--no-enable-prefix-caching --mamba-ssm-cache-dtype float32 \
--limit-mm-per-prompt '{"image":4,"video":2,"audio":2}' \
--media-io-kwargs '{"video":{"fps":2,"min_frames":4,"max_frames":16,"total_pixels":262144}}' \
--tensor-parallel-size 2
SGLang
使用 适用于打补丁 SGLang 0.5.16 或 0.5.19 的 WeMM BF16 配方。
MODEL=tencent/WeMM-Video-35BA3B
python -m sglang.launch_server --model-path "$MODEL" --served-model-name "$MODEL" --trust-remote-code \
--host 127.0.0.1 --port 8000 --dtype bfloat16 --context-length 8192 \
--attention-backend triton --linear-attn-backend triton \
--limit-mm-data-per-request '{"image":4,"video":2,"audio":2}' \
--tp-size 2
这些命令在两个 GPU 上使用张量并行。为完整的专家权重、媒体输入和生成缓存配置总 GPU 内存。
服务 API 的输入示例
当服务器在端口 8000 运行时,在第二个终端中使用项目根目录下的捆绑请求客户端。它将媒体内联发送到兼容 OpenAI 的聊天端点。
MODEL=tencent/WeMM-Video-35BA3B
python examples/chat.py text --model "$MODEL"
python examples/chat.py image --model "$MODEL"
python examples/chat.py audio --model "$MODEL"
python examples/chat.py video --model "$MODEL"
python examples/chat.py video-audio --model "$MODEL"
| 输入 | 请求内容 |
|---|---|
| 文本 | messages[].content 中的文本字符串 |
| 图像 | image_url 配合 image_url.url |
| 音频 | audio_url 配合 audio_url.url |
| 视频帧 | video_url 配合 video_url.use_audio 设置为 false |
| 带音轨的视频 | video_url 配合 video_url.use_audio 设置为 true |
在 video_url 内部设置 fps 和 max_frames 以控制片段的采样。将 chat_template_kwargs.enable_thinking 设置为 true 以启用思考模式。请参阅 完整的视频请求。
验证
打补丁的 vLLM 在 H20 上加载了检查点,并完成了针对文本、图像、音频以及带音轨视频的生成检查。本地检查点也通过了直接的 Transformers 加载和 CPU 文本生成检查。
评估
WeMM-Video-35B-A3B 树立了新的开源最先进水平。它还超越了 Qwen3.5-Omni-Flash 和 Seed2.0-Mini-0428 等专有模型,并缩小了与 Gemini-3.0-Flash 的差距。
许可证
Apache License 2.0。请参阅 附带的许可证 以及 集合许可证和第三方归属声明。第三方组件仍受其原始条款约束。
引用
@misc{WeMM-Video,
title={WeMM-Video: Pushing the Frontiers of Open-Source Omni-Modal Video Understanding},
author={Changli Tang and Jie Yang and Tianyi Wang and Lei Li and Daoze Zhang and Zijie Xin and Zhan Liu and Li Li and Jinchang Xu and Fengyun Rao and Chao Zhang and Jing Lyu},
year={2026},
eprint={2611.26409},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2611.26409},
}
来源:腾讯混元模型发布 · hf-mirror.com