vllm-sr/d3
摘要
vllm-sr/d3 是 Decision 3.0 的 27B 多模态基础决策模型,支持文本、JSON、图像与视频输入,可在一次调用中完成选择、是非与评分决策并输出概率,无需生成文本。它在 Jev Decision Index 上以 66.3 排名官方文本榜第一,较 Decision 2.0 提升 10.4,并在 AMD MI325X 上实现 27 req/s 的服务性能。
查看缓存全文
缓存时间: 2026/10/14 18:43
vllm-sr/d3 · Hugging Face
来源:https://huggingface.co/vllm-sr/d3 d3:Decision 3.0(https://huggingface.co/vllm-sr/d3/blob/main/assets/banner.png)的多模态基础决策模型
d3 是 Decision 3.0 的 27B 多模态基础决策模型,属于 vLLM Semantic Router 的决策模型系列。给它输入(文本或 JSON,可选配图像和视频)以及需要回答的问题——从多个选项中选择、回答是或否、或进行量表评分——它一次调用即可全部回答,为每个答案返回概率,无需生成文本。
参数量 26.09B,含 0.46B 视觉编码器 输入 文本或 JSON,加上图像和视频(每个请求可含多个) 决策类型 选择 · 是/否 · 评分 许可协议 Apache-2.0
亮点
- Jev Decision Index 0.3.2:66.3,在官方文本榜上排名第一,并处于其帕累托前沿;公开评测套件得分 65.45,使用官方 0.3 评测工具包在发布权重上测量:全部 140,178 个公开请求均已回答,无一不支持。
- 较 Decision 2.0 提升 +10.4(其 27B 模型官方榜得分 55.9):公开套件提升 +8.5,五个领域全部领先,私有同技能测试和新领域任务分别提升 +7.1 和 +12.6。
- 读取图像: 每个请求可包含多张图像(PNG、JPEG 或 WebP),支持以路径、URL、PIL 图像或 base64 data URL 形式传入;请求中的每个问题都能看到全部图像。
- 读取视频: 每个请求可包含多段视频(MP4、WebM、MOV 或 MKV),支持以路径、URL、base64 data URL 或帧数组形式传入,以每秒 2 帧的速率读取;Perception Test(多选题视频问答):77.4(内部评估)。
- 速度: 在单张 AMD Instinct MI325X 上,使用 AutoModel 逐个处理请求时,文本请求中位耗时 54.4 ms,含图像请求中位耗时 290 ms,含 10 秒视频请求中位耗时 500 ms。
- 服务吞吐: 在单张 AMD Instinct MI325X 上使用 vLLM Semantic Router,达到 27 请求/秒,p99 低于 1 秒,为 AutoModel 的 1.5 倍(单问题文本请求,启用批处理,现为默认配置);使用每次前向一个请求(原默认配置)时,在相同内核设置下返回的答案与 AutoModel 逐字节一致(服务性能)。
- 多问题一次调用: 针对相同输入的选择题、是/否题和评分题可以一起作答,每个问题独立对输入执行一次前向传播,每个选项都附带概率。
快速开始
pip install "transformers==5.17.0" torch torchvision pillow opencv-python-headless safetensors accelerate
pip install flash-linear-attention # 可选:为线性注意力层安装快速 GPU 内核
import json
from huggingface_hub import hf_hub_download
from transformers import AutoModel
model = AutoModel.from_pretrained("vllm-sr/d3", trust_remote_code=True)
# 文本
result = model.system_one(
state="The order arrived damaged yesterday. The customer has a receipt and asks for a replacement today.",
questions={
"route": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"returns": "Refunds, replacements and damaged deliveries",
"billing": "Payments, invoices and charges",
"technical": "Product setup and faults"
}
},
"receipt": {
"type": "noul",
"instructions": "Does the customer have a receipt?"
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Routine",
"Soon",
"Today"
]
}
},
)
print(json.dumps(result["answers"], indent=2))
# 文本 + 图像(或多张)
receipt = hf_hub_download("vllm-sr/d3", "assets/example-receipt.png")
result = model.system_one(
state="The customer says the blender arrived cracked and attached the receipt.",
images=[receipt], # 本地路径、http(s) URL、PIL 图像或 base64 data URL
questions={
"route": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"returns": "Refunds, replacements and damaged deliveries",
"billing": "Payments, invoices and charges",
"technical": "Product setup and faults"
}
},
"on_receipt": {
"type": "noul",
"instructions": "Does the receipt list the blender?"
},
"payment": {
"type": "choice",
"instructions": "How was the order paid?",
"criteria": {
"card": None,
"cash": None,
"gift card": None
}
}
},
)
print(json.dumps(result["answers"], indent=2))
# 文本 + 视频(或多段)
clip = hf_hub_download("vllm-sr/d3", "assets/example-video.mp4")
result = model.system_one(
state="A short clip from a test camera.",
videos=[clip], # 本地路径、http(s) URL、base64 data URL 或帧数组
questions={
"direction": {
"type": "choice",
"instructions": "Which way does the square move?",
"criteria": {
"right": "From left to right",
"left": "From right to left",
"still": "It does not move"
}
},
"color_change": {
"type": "noul",
"instructions": "Does the square change color?"
}
},
)
print(json.dumps(result["answers"], indent=2))
# 也可以使用 pipeline 方式:
# transformers.pipeline("decision", model="vllm-sr/d3", trust_remote_code=True)(state=..., questions=..., images=..., videos=...)
图像位于请求文本之前,每张图像以最高 1.6 百万像素的分辨率读取;视频跟在图像之后,以每秒 2 帧的速率读取(最多 32 帧,均匀分布在整段视频中,每帧最高 0.2 百万像素)。请求中的每个问题都能看到所有图像和视频。
使用 vLLM Semantic Router 运行
vLLM Semantic Router 以 Engine 模式原生支持 Decision 3.0——在你自己的机器上通过 System One API 运行单个模型。其回答与本包自带的 d3_server.py 完全一致,覆盖文本、图像和视频场景,使用每次前向一个请求(原默认配置)时在 AMD Instinct MI325X 上测得;启用批处理(现为默认)后,少数势均力敌的决策会发生变化(服务性能)。
curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel dev --no-launch
export PATH="$HOME/.local/bin:$PATH"
vllm-sr serve -e vllm-sr/d3
平台自动检测;也可以用 --platform auto|cpu|cuda|rocm 指定(默认为 auto)。
在包含 Engine 模式和 Decision 3.0 的稳定版 vLLM Semantic Router 发布之前,它们位于开发频道(--channel dev)。首次启动会拉取适合你机器的镜像并下载模型。然后即可针对输入提出问题:
curl -s localhost:8899/v1/systemone -H 'content-type: application/json' -d '{
"model": "vllm-sr/d3",
"state": "Write a Python function that merges two sorted lists.",
"questions": {
"kind": {"type": "choice", "instructions": "What kind of work is this?",
"criteria": {"code": "Writing or fixing code", "math": "Mathematics", "chat": "Anything else"}},
"reasoning": {"type": "noul", "instructions": "Does answering this need multi-step reasoning?"}
}
}'
以 base64 data URL 的形式将图像(PNG、JPEG 或 WebP)放入 images 字段,视频(MP4、WebM、QuickTime 或 Matroska)放入 videos 字段;每个问题都能看到它们:
curl -s localhost:8899/v1/systemone -H 'content-type: application/json' --data-binary @- <<EOF
{
"model": "vllm-sr/d3",
"state": "What does the attached image show?",
"images": ["data:image/png;base64,$(base64 -w0 chart.png)"],
"questions": {
"kind": {"type": "choice", "instructions": "What kind of image is this?",
"criteria": {"chart": "A chart or plot", "photo": "A photograph", "document": "A document"}}
}
}
EOF
curl -s localhost:8899/v1/systemone -H 'content-type: application/json' --data-binary @- <<EOF
{
"model": "vllm-sr/d3",
"state": "What happens in the clip?",
"videos": ["data:video/mp4;base64,$(base64 -w0 clip.mp4)"],
"questions": {
"moving": {"type": "noul", "instructions": "Does something move across the scene?"}
}
}
EOF
vllm-sr stop 停止服务。请参阅 Router 与 Engine 模式了解限制和选项。
服务性能
在单张 AMD Instinct MI325X 上,vLLM Semantic Router 以 27 请求/秒服务 d3,p99 低于 1 秒,为 AutoModel 的 1.5 倍(单问题文本请求,启用批处理,现为默认配置),使用每次前向一个请求(原默认配置)时,在相同内核设置下返回的答案与 AutoModel 逐字节一致。
d3 在单张 AMD Instinct MI325X 上的服务吞吐量:AutoModel、包服务器和 vLLM Semantic Router Engine 模式(https://huggingface.co/vllm-sr/d3/blob/main/assets/serving-throughput.png)
AutoModel 在你自己的进程中运行,每次一个调用(即快速开始中的代码);包服务器即 python d3_server.py;Engine 模式为 vllm-sr serve -e,使用每次前向一个请求(图表中的 exact,即原默认配置)和批处理两种方式测量。在 main 分支的 vLLM Semantic Router 中(其下一个开发包和发布版本),Engine 模式默认对并发请求进行批处理,并支持 vLLM 风格的引擎参数:--max-num-batched-tokens、--max-num-seqs、--batch-window-ms 和 --dtype。
Engine 模式的适用场景及代价:
- 吞吐量: 单问题文本请求为 AutoModel 的 1.5 倍请求/秒,8 问题图像请求为 1.3 倍,10 秒视频请求为 1.8 倍(每行取两种 Engine 配置中较优者;8 问题图像取最高请求速率,因为两种配置的 p99 均无法保持在 1 秒以内)。
- 启动: 首个回答在启动后 19.4 秒返回(每次前向一个请求;批处理为 20.4 秒),内核缓存为空的情况下,AutoModel 为 38.4 秒(其首张图像还需额外 6.20 秒),包服务器为 80.8 秒。
- 多问题和长输入: 逐个处理请求时,Engine 模式(每次前向一个请求)在 548 ms 内回答了 16 个文本问题(AutoModel:572 ms),1.87 秒内回答了关于一张图像的 8 个问题(1.95 秒),4.21 秒内处理了 32k 词元的文本(4.23 秒);批处理模式将 8 个图像问题一并处理,耗时 1.56 秒,比 AutoModel 减少 20%。
- GPU 显存: 每个副本峰值为 65.4 GiB(每次前向一个请求),与包服务器的 65.2 GiB 相当,批处理模式为 62.1 GiB;AutoModel 逐个处理请求时峰值为 61.8 GiB。Engine 模式最多缓存 2 GiB 的图像特征。
- 答案一致性: 当 AutoModel 使用相同内核设置时,Engine 模式(每次前向一个请求)在全部 7 种请求类型(文本含 1、4 或 16 个问题,图像含 1 或 8 个问题,视频,32k 词元文本)上返回了与 AutoModel 逐字节一致的答案:共比较了 135 条 Engine 响应和 21 次 AutoModel 调用。使用 AutoModel 在每个新进程中运行的内核自动调优后,7 种中有 5 种逐字节一致,且没有决策发生变化(最大概率差异为 0.005)。批处理在公开套件的 4,000 个请求样本上改变了 0.048% 的决策(29,339 个问题中的 14 个,均为势均力敌的情况),金标准准确率为 92.109% → 92.126%。
对于单个简短请求,在你自己的进程中处理最快:AutoModel 回答一个文本问题比 Engine 模式快 0.9 ms,处理一张新图像快 22 ms——这是经过路由到模型工作器及其媒体路径的开销。Engine 模式的优势在于同时服务大量请求。
单请求延迟及图表背后的数字。逐个处理请求,预热后(p50 / p90,毫秒):
| 请求类型 | AutoModel | 包服务器 | Engine,每次前向一个请求 | Engine,批处理(现为默认) |
|---|---|---|---|---|
| 文本,1 个问题 | 54.4 / 54.6 | 55.0 / 55.3 | 55.3 / 55.6 | 57.2 / 57.9 |
| 文本,16 个问题 | 572 / 574 | 571 / 572 | 548 / 549 | 548 / 549 |
| 图像(1.6 MP),1 个问题 | 290 / 292 | 295 / 297 | 312 / 314 | 315 / 316 |
| 图像(1.6 MP),8 个问题 | 1.95 s / 1.95 s | 1.95 s / 1.97 s | 1.87 s / 1.88 s | 1.56 s / 1.57 s |
| 视频(10 秒,1080p),1 个问题 | 500 / 518 | 509 / 523 | 551 / 579 | 533 / 548 |
| 32k 词元文本,1 个问题 | 4.23 s / 4.24 s | 4.30 s / 4.30 s | 4.21 s / 4.23 s | 4.22 s / 4.23 s |
单张 GPU 上的请求/秒,闭环最多 64 个客户端(p99 低于 1 秒,除 * 标注外):
| AutoModel † | 包服务器 | Engine,每次前向一个请求 | Engine,批处理(现为默认) | |
|---|---|---|---|---|
| 文本,1 个问题 | 18.4 | 17.7 | 18.1 | 27 |
| 图像(1.6 MP),8 个问题 | 0.51 * | 0.53 * | 0.53 * | 0.67 * |
| 视频(10 秒,1080p),1 个问题 | 2.0 | 2.8 | 3.7 | 3.7 |
| 文本,1 个问题,饱和吞吐 | 18.4 | 17.7 | 18.1 | 29 |
† 同一进程内连续调用(1,000 次 / 平均延迟)。* 所有负载下 p99 均超过 1 秒,此处显示最高速率。
测量于 2026-10-13,每个副本一张 AMD Instinct MI325X,各方案独占 GPU:ROCm 7.2 搭配 PyTorch 2.12;AutoModel 和包服务器使用 Transformers 5.17.0;vLLM Semantic Router Engine 模式从源码构建,其服务优化新于已发布的镜像。请求:约 330 词元的客服工单,含 1、4 或 16 个问题;1,456 × 1,092 的 PNG(1.6 MP),含 1 或 8 个问题;10 秒 1080p MP4,以每秒 2 帧读取;32k 词元的文本;每个图像和视频请求均携带新的数据。逐个处理请求:3 次预热调用,随后最多 20 次计时调用。负载测试:1、2、4、…、64 个闭环客户端,每个级别先预热再计时 15 到 60 秒;Engine 模式每个工作器最多接纳 32 个在途请求,其余立即返回 503。启动:模型文件在本地磁盘上;Engine 模式从其路由器进程启动时计时,不含 CLI 的镜像拉取时间。
评估
文本:Jev Decision Index 0.3.2
| 模型 | Jev Decision Index ↑ | 公开套件 ↑ | 同技能测试 ↑ | 新领域任务 ↑ |
|---|---|---|---|---|
| d3 | 66.3 | 65.5 | 62.8 | 60.5 |
| Decider 31B | 64.6 | 64.3 | 61.8 | 58.3 |
| Perplexity Decider v1.1(27B) | 62.8 | 62.3 | 61.1 | 55.6 |
| Darwin-27B-ZTC | 62.5 | 62.6 | 58.7 | 57.7 |
| AnyJev L0 · Gemma-4-31B | 60.2 | 59.8 | 59.1 | 53.0 |
| Decision 2.0(27B) | 55.9 | 57.0 | 55.7 | 47.9 |
d3 在官方文本榜的 149 个条目中排名第一,并处于帕累托前沿:没有参数量相同或更少的条目得分更高。Decision 3.0 的六个模型中有五个处于该前沿;在其规模级别中排名第二的 d3-edge 不在其中。
Jev Decision Index 与模型规模的关系(https://huggingface.co/vllm-sr/d3/blob/main/assets/index-pareto.png)
各领域 Jev Decision Index:d3 与 Decision 2.0(27B)(https://huggingface.co/vllm-sr/d3/blob/main/assets/index-areas.png)
图像:Jev Decision Index 视觉榜 0.3.2
| 模型 | 视觉指数 ↑ | 公开套件 ↑ | 私有套件 ↑ |
|---|---|---|---|
| d3 | 71.3 | 74.1 | 68.5 |
| Perplexity Decider v1.1(27B) | 70.6 | 73.2 | 67.9 |
| JEV-27B-VL | 69.6 | 72.8 | 66.4 |
| Solomon v1.1(27B) | 66.8 | 69.9 | 63.8 |
在官方视觉榜上,Decision 3.0 的六个模型构成了完整的帕累托前沿:没有其他条目处于该前沿。d3 在 33 个条目中排名第一。
d3 在公开视觉基准测试上的表现(† 为近似复现):
| 基准测试 | d3 |
|---|---|
| CV-Bench | 76.2 |
| BLINK | 59.9 |
| RealWorldQA | 73.4 |
| CharXiv † | 91.7 |
| InfographicVQA † | 96.7 |
| Mind2Web † | 90.0 |
| Winogro |
相似文章
Decision 3.0:开放的多模态决策模型,参数规模从 6 亿到 270 亿。在 Jev Decision Index 的两个榜单上均排名第一
vLLM Semantic Router 团队发布了 Decision 3.0(d3),这是一个开源(Apache-2.0 协议)多模态决策模型系列,参数规模从 6 亿到 270 亿,支持文本、图像和视频处理,凭借零样本视频表现,在 Jev Decision Index 的两个榜单上均排名第一。
@XunzhuoLiu:介绍 Decision 2.0:我们最新的最先进决策模型,涵盖 0.6B 到 27B 的各种规模,全部开源,HF 合集…
vllm-sr 推出 Decision 2.0,这是一系列最先进的开源基础决策模型,已在 Hugging Face 上以 0.6B 到 27B 参数的不同规模发布。
Microsoft-Decision-1
Microsoft 推出 Decision-1 决策打分模型,用于代理与工作流的路由、分类、验证和控制,单次推理即可输出各选项的校准概率。该模型基于 Qwen3.5-9B 后训练,据称中位延迟比 GPT-6 Sol 快约 35 倍,现已在 Microsoft Foundry 上线。
Open d1:面向文本、视觉和音频的边缘决策模型(6 分钟阅读)
Liquid AI 发布了 d1 决策模型家族的两款开放权重模型 d1-3B 和 d1-OMNI-600M,支持文本、视觉和音频模态,通过单次前向传递直接输出答案,在 Decision Index 上超越同规模模型,并可在 NVIDIA Jetson 边缘设备上实现实时推理。
d1-ultra:全球最强决策模型发布(3分钟阅读)
Liquid AI 发布 d1-ultra,一款多模态决策模型,在 112 项评测中超越 Jev 1.14 及所有其他决策模型,输出经校准的概率答案,现已在 Liquid API 上线,价格为每百万输入 token 0.042 美元。