vllm-sr/d3
- License
- apache-2.0
- Size
- 49 GB
- Revision
- main
Mirrored from vllm-sr/d3
All models by vllm-sr →Mirrored from vllm-sr/d3
All models by vllm-sr →[Image blocked: d3: Decision 3.0]
d3 is the 27B multimodal foundation decision model of Decision 3.0, the decision models of vLLM Semantic Router. Give it an input (text or JSON, optionally with images and videos) and the questions you need answered: pick one of several options, say yes or no, or rate on a scale. It answers them all in one call and returns a probability for every answer, without generating text.
Try it free at decision.vllm-sr.ai · Official Space: vllm-sr/Decision-3.0
Images go before the text of the request, each read at up to 1.6 megapixels; videos follow the images, read at 2 frames per second (at most 32 frames spread over the whole video, each at up to 0.2 megapixels). Every question of the request sees all of them.
vLLM serves d3 natively: vllm serve loads this repository as it is, with no conversion and no extra flags, and answers on vLLM's System One endpoint, /v1/systemone. The support is on vLLM's main branch since 2026-10-14 (vllm-project/vllm#61565, commit 89cab55), and no vLLM release includes it yet (the latest is v0.31.0). Until one does, install a current nightly build with uv; vLLM's nightly indexes do not work with plain pip:
The ROCm wheels load OpenMPI and libdw at import, hence the apt line (Ubuntu 24.04 package names). Start the server; the first start downloads the model. Then ask questions about a request:
The reply gives each question its pick and each option a probability (d3 on one AMD Instinct MI300X; id, created and diagnostics left out, probabilities rounded):
The probabilities are this package's, as model.system_one() gives them, and confidence is the chosen option's probability; a yes / no answer's noul is the probability of yes. The image and video requests of the next section work unchanged on port 8000: vLLM places the media before the text and reads them with this package's budgets. A top-level instructions field returns 400, since the prompt is fixed. vLLM reserves 92 % of the GPU's memory by default; lower --gpu-memory-utilization to share the GPU.
Verified on AMD Instinct MI300X (ROCm). These commands were run as written in a new Ubuntu 24.04 environment with ROCm 7.2 and the ROCm nightly of 2026-10-15 (0.32.0rc1.dev190+g3f1bcfd82). Against this package's runtime (AutoModel with the versions in requirements.txt), vLLM made the same decisions on the request above and on the image and video requests of the next section, and on 415 of 416 further questions (text, JSON, a 40-option choice, an image and a video); the other one is a near-tie whose two most likely answers are 0.002 apart. The median probability difference was 0.0025. The CUDA command installs a nightly that includes d3, but it has not been run on an NVIDIA GPU yet.
In the measurements of the vLLM pull request, on one AMD Instinct MI325X, vLLM changed none of the 416 decisions and served 1.4× and 1.8× the requests per second of this package's own server (d3_server.py) at 8 and 64 concurrent clients; one request at a time it was 3 % slower. It starts more slowly than AutoModel: 215 s to the first answer with empty caches, against 40 s; --max-model-len 32768 brings that to 139 s.
Request fields and limits: Decision 3.0 in the vLLM docs.
vLLM Semantic Router serves Decision 3.0 natively in Engine mode, which runs one model behind the System One API on your own machine. Its answers matched this package's own d3_server.py exactly, for text, images and videos, with one request per forward, the former default (measured on AMD Instinct MI325X); with batching, now the default, a few near-tie decisions change (Serving performance).
The platform is detected automatically; choose one with --platform auto|cpu|cuda|rocm (default auto).
Engine mode and Decision 3.0 are in the development channel (--channel dev) until a stable vLLM Semantic Router release includes them. The first start pulls the image for your machine and downloads the model. Then ask questions about a request:
Send images as base64 data URLs (PNG, JPEG or WebP) in images and videos (MP4, WebM, QuickTime or Matroska) in videos; every question sees them:
vllm-sr stop stops it. See Router and Engine modes for limits and options.
On one AMD Instinct MI325X, vLLM Semantic Router serves d3 at 27 requests/s with p99 under 1 s, 1.5× AutoModel (one-question text, with batching, now the default), and with one request per forward, the former default, it gave AutoModel's answers byte for byte when both used the same kernel settings.
[Image blocked: Serving throughput of d3 on one AMD Instinct MI325X: AutoModel, the package server and vLLM Semantic Router Engine mode]
AutoModel runs in your own process, one call at a time (the Quickstart code); the package server is its python d3_server.py; Engine mode is vllm-sr serve -e, measured with one request per forward (exact in the chart, the former default) and with batching. In vLLM Semantic Router from main (its next development package and release), Engine mode batches concurrent requests by default and takes vLLM-style engine arguments: --max-num-batched-tokens, --max-num-seqs, --batch-window-ms and --dtype.
Where Engine mode helps, and what it costs:
A single short request is fastest in your own process: AutoModel answers one text question 0.9 ms sooner than Engine mode and one new image 22 ms sooner, the cost of going through the router to the model worker and its media path. Engine mode's gains come from serving many requests at once.
One request at a time, warm (p50 / p90, ms):
Requests per second on one GPU, closed loop with up to 64 clients (p99 under 1 s, except *):
† Back-to-back calls in one process (1,000 / mean latency). * p99 over 1 s at every load; the highest rate is shown.
Measured on 2026-10-13, one AMD Instinct MI325X per replica and each side alone on the GPU: ROCm 7.2 with PyTorch 2.12; AutoModel and the package server with Transformers 5.17.0; vLLM Semantic Router Engine mode built from source, with serving optimizations that are newer than its published images. Requests: a support ticket of about 330 tokens with 1, 4 or 16 questions; a 1,456 × 1,092 PNG (1.6 MP) with 1 or 8 questions; a 10-second 1080p MP4, read at 2 frames per second; a 32k-token text; every image and video request carries new bytes. One request at a time: 3 warm-up calls, then up to 20 timed calls. Under load: 1, 2, 4, … 64 closed-loop clients, each level warmed up and then counted for 15 to 60 s; Engine mode admits 32 requests in flight per worker and answers the rest at once with 503. Start-up: model files on local disk; Engine mode from the start of its router process, without the CLI's image pull.
d3 ranks first of the 149 entries on the official text board and is on its Pareto frontier: no entry with as many parameters or fewer scores higher. Five of the six Decision 3.0 models are on that frontier; d3-edge, second among the entries of its size, is not.
[Image blocked: Jev Decision Index against model size]
[Image blocked: Jev Decision Index by area: d3 and Decision 2.0 (27B)]
On the official vision board, the six Decision 3.0 models form the whole Pareto frontier: no other entry is on it. d3 ranks first of the 33 entries.
d3 on the public vision benchmarks († approximate rebuild):
Multiple-choice video question answering (three options per question, chance 33.3): top-1 accuracy (%), videos read with the defaults above.
Jev Decision Index: official leaderboard, text and vision boards 0.3.2, 2026-10-12; the boards evaluated v3.1.0, which has the same weights as this version. Size bands and the Pareto frontier use the parameter counts listed by the boards. d3 on the public vision benchmarks and the Perception Test: internal evaluation.
Apache-2.0 (LICENSE [blocked]). Built on Qwen/Qwen3.8-27B (Apache-2.0).
Trained on AMD Instinct MI325X GPUs.
pip install "transformers==5.17.0" torch torchvision pillow opencv-python-headless safetensors acceleratepip install flash-linear-attention # optional: fast GPU kernels for the linear-attention layersimport json
from huggingface_hub import hf_hub_downloadfrom transformers import AutoModel
model = AutoModel.from_pretrained("vllm-sr/d3", trust_remote_code=True)
# Textresult = 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))
# Text and an image (or several)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], # local paths, http(s) URLs, PIL images or base64 data URLs 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))
# Text and a video (or several)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], # local paths, http(s) URLs, base64 data URLs or frame arrays 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))
# Or as a pipeline:# transformers.pipeline("decision", model="vllm-sr/d3", trust_remote_code=True)(state=..., questions=..., images=..., videos=...)uv venv --python 3.12 --seedsource .venv/bin/activate
# NVIDIA GPUs (CUDA)uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly
# AMD GPUs (ROCm 7.2; glibc 2.39 or newer, as on Ubuntu 24.04)sudo apt install -y libopenmpi3t64 libdw1t64export VLLM_ROCM_VARIANT=$(curl -s https://wheels.vllm.ai/rocm/nightly | grep -oP 'rocm\d+' | head -1 | sed 's/%2B/+/g')uv pip install --pre vllm --extra-index-url https://wheels.vllm.ai/rocm/nightly/${VLLM_ROCM_VARIANT} --index-strategy unsafe-best-matchvllm serve vllm-sr/d3curl -s localhost:8000/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?"} }}'{ "object": "structured_decision", "model": "vllm-sr/d3", "answers": { "kind": {"type": "choice", "choice": "code", "probabilities": {"code": 0.9996, "math": 0.0002, "chat": 0.0002}, "confidence": 0.9996}, "reasoning": {"type": "noul", "noul": 0.5808, "probabilities": {"yes": 0.5808, "no": 0.4192}, "confidence": 0.5808} }, "usage": {"input_tokens": 213, "output_tokens": 0}}curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel dev --no-launchexport PATH="$HOME/.local/bin:$PATH"vllm-sr serve -e vllm-sr/d3curl -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?"} }}'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"}} }}EOFcurl -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@misc{d3_2026, title = {{d3}: A Multimodal Foundation Decision Model}, author = {{vLLM Semantic Router Team}}, year = {2026}, howpublished = {\url{https://huggingface.co/vllm-sr/d3}}}