Instructions to use vllm-sr/d3-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vllm-sr/d3-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="vllm-sr/d3-NVFP4", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("vllm-sr/d3-NVFP4", trust_remote_code=True) model = AutoModel.from_pretrained("vllm-sr/d3-NVFP4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
d3-NVFP4
d3-NVFP4 is d3, the 27B multimodal foundation decision model of Decision 3.0, with its decoder's projections in NVFP4. 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, as d3 does, in 17.2 GB of weights instead of 52.2 GB, multiplying on the FP4 tensor cores of Blackwell GPUs.
| Parameters | 26.09B, including the 0.46B vision encoder |
| Base model | vllm-sr/d3 at revision 093cffba (the same weights as v3.1.0 and the current main) |
| Quantization | NVFP4 W4A4 (compressed-tensors nvfp4-pack-quantized): FP4 (E2M1) weights and activations in groups of 16 with FP8 (E4M3) block scales under an FP32 global scale per tensor. Weights rounded to nearest; activation block scales computed per request under a global scale calibrated per layer. 400 projections; the Gated DeltaNet in_proj_a / in_proj_b, the vision tower, the embeddings and the readout stay as published |
| Calibration data | 512 text prompts (338,463 tokens) from the validation split of tasksource-jev-typed-decisions, rendered with d3's prompt template |
| Weights on disk | 17.2 GB (d3: 52.2 GB) |
| Needs | FP4 tensor cores: an NVIDIA Blackwell GPU (compute capability 10.x or 12.x, such as B200, the RTX 50 series or RTX PRO 6000) and a PyTorch with FP4 tensors and block-scaled scaled_mm (tested: 2.11). Tested on NVIDIA GeForce RTX 5090 and RTX PRO 6000 |
| Inputs | Text or JSON, plus images and videos (several per request) |
| Decision types | Choice · Yes / No · Score |
| License | Apache-2.0 |
Highlights
- Scores 64.83 on the Jev Decision Index 0.3 public suite against d3's 65.45, giving d3's top answer on 96.95% of its 312,320 questions; every area within 1.17 points of d3.
- 2.9× faster than d3 on a Blackwell GPU, in a third of its memory: 21.5 ms against 62.6 ms per request (median) on one RTX PRO 6000 in the vLLM Semantic Router model runtime with NVFP4 support at
--dtype autoand graphs replaying, in 17.2 GB of GPU memory instead of 52.2 GB. - Reads images and videos as d3 does: the vision tower is unchanged. On the vision board's public suite it scores 73.60 against d3's 74.15 on the same machine (93.88% of d3's answers), and on Perception Test 76.57% against 77.73% (93.43%).
- Keeps 96.64% of d3's answers on the 14,031 test requests of tasksource-jev-typed-decisions, with accuracy 82.71% against d3's 83.23%.
Quickstart
pip install "transformers==5.17.0" "compressed-tensors>=0.19" "torch>=2.11" torchvision triton pillow opencv-python-headless safetensors accelerate
pip install flash-linear-attention causal-conv1d # optional: fast GPU kernels for the linear-attention layers
import json
import sys
from huggingface_hub import hf_hub_download, snapshot_download
path = snapshot_download("vllm-sr/d3-NVFP4")
sys.path.insert(0, path)
from d3q.load import load_d3
model = load_d3(path, device="cuda:0")
# Text
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))
# 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={
"on_receipt": {
"type": "noul",
"instructions": "Does the receipt list the blender?"
}
},
)
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={
"color_change": {
"type": "noul",
"instructions": "Does the square change color?"
}
},
)
print(json.dumps(result["answers"], indent=2))
load_d3 is d3's own runtime (d3_runtime.py) with its backbone loader swapped for d3q/: transformers loads the checkpoint with its FP4 weights still packed (dequantize=False), and each quantized projection becomes a layer that quantizes its input to NVFP4 with one Triton kernel (16-value block scales under the calibrated global scale, as compressed-tensors computes them) and multiplies on the FP4 tensor cores in torch.nn.functional.scaled_mm. Prompting, noncausal full attention, the FP32 readout, images and videos are d3's own; images and videos are read as d3 reads them. AutoModel.from_pretrained(..., trust_remote_code=True) alone dequantizes the whole checkpoint to BF16 and needs about 52 GB of GPU memory again. On a GPU without FP4 tensor cores the layers cannot run.
Run with vLLM Semantic Router
The vLLM Semantic Router serves d3-NVFP4 in Engine mode, which runs one model behind the System One API on your own machine, as it serves d3. It verifies the package against its MODEL_MANIFEST.json, as it verifies d3, and keeps the weights in NVFP4 on the GPU, multiplying on the FP4 tensor cores with its own NVFP4 layers (#5225, #5233) rather than d3q/.
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-NVFP4
NVFP4 needs FP4 tensor cores, so it runs on NVIDIA Blackwell GPUs only (see Needs above), with about 18 GB of free GPU memory; any other device refuses the package before its weights load. The platform is detected automatically (--platform cuda chooses it), and --revision chooses a commit. Then ask questions about a request:
curl -s localhost:8899/v1/systemone -H 'content-type: application/json' -d '{
"model": "vllm-sr/d3-NVFP4",
"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?"}
}
}'
Images and videos go in images and videos as for d3. vllm-sr stop stops it. See Router and Engine modes for limits and options.
Serving performance
On one NVIDIA RTX PRO 6000, the model runtime with NVFP4 support answers a request in 21.5 ms against d3's 62.6 ms (median, one request at a time, graphs replaying, served at --dtype auto), in 17.2 GB of GPU memory against 52.2 GB.
| GPU | d3 (BF16) | d3-NVFP4, exact kernels | Optimized layers, exact kernels | Served (--dtype auto) |
Ratio (served) | |
|---|---|---|---|---|---|---|
| NVIDIA RTX PRO 6000 | Median latency, graphs (500 requests) | 62.6 ms | 30.2 ms | 28.5 ms | 21.5 ms | 0.34× |
| p95 latency, graphs | 192.3 ms | 76.8 ms | 76.2 ms | 65.5 ms | 0.34× | |
| Mean latency, graphs | 93.2 ms | 45.0 ms | 40.5 ms | 31.4 ms | 0.34× | |
| Median latency, no graphs (1,000 requests) | 63.1 ms | 60.0 ms | 48.0 ms | 36.5 ms | 0.58× | |
| Mean latency, no graphs | 90.2 ms | 63.0 ms | 52.6 ms | 41.1 ms | 0.46× | |
| GPU memory after loading | 52.2 GB | 17.2 GB | 17.2 GB | 17.2 GB | 0.33× | |
| GPU memory, peak of the 20 longest requests | 52.8 GB | 17.9 GB | 17.9 GB | 17.9 GB | 0.34× |
- Graphs: the CPU launches every kernel one by one, a few microseconds each, and the FP4 products finish faster than it can launch the next, so without graphs the GPU waits: busy 46% of the time, 60.0 ms against d3's 63.1 ms. A graph (#4999) replays the whole forward in one launch. d3 keeps the GPU busy on this card, so graphs change little for it.
- Layer optimizations: the quantization kernel writes the activation scales in cuBLAS's layout (three fewer kernels per layer), the input is converted or copied only when needed, and the compiled Triton kernel is launched directly after its first call. A forward launches 5,596 kernels instead of 7,196: 48.0 ms without graphs and 28.5 ms with them, with the same answers byte for byte. Without graphs the rest of d3's kernels still keep the CPU the bottleneck.
- Served (
--dtype auto): the model runtime (vllm-sr serve -eabove, orvllm-srun serve) runs a quantized package at--dtype autoby default, and there it also runs the fused element-wise Triton kernels the d3 family allows quantized packages (norms, residual adds and gates; not bit-identical on CUDA), as every score in Evaluation was answered. d3 (BF16) keeps exact kernels at every dtype, so its column is what it serves at. - Merged projections (#5233): q / k / v and gate / up read one input and hold one input and one weight global scale in every layer of this package, so the runtime concatenates their weights at load and runs one quantization and one FP4 product per group instead of two or three, with the same answers byte for byte and the same memory. With graphs that takes the median from 23.3 to 21.5 ms.
- Answers: graph replays match eager forwards byte for byte. The Quickstart's
d3q/kernel rounds 0.012% of the FP4 codes the other way at ties, which changes 2.2% of these answers; both agree with d3 alike (97.4% and 97.6% of 500).d3q/takes 63.1 ms at the median, as the runtime without graphs. - Throughput under load: not measured yet.
Measured on 2026-10-16 (optimized layers: 2026-10-17), one NVIDIA RTX PRO 6000 Blackwell Workstation Edition (driver 595.99.02): PyTorch 2.11.0+cu128, Triton 3.6.0, FLA 0.5.2, causal-conv1d 1.7.0. Model runtime: #5066 (89402c83) with the NVFP4 support of #5225 (75a73e4b, and bca6f4c3 for the optimized layers; since merged into main) and, for the graph rows, the graph capture of #4999 merged on top; exact profile for the exact columns, and #5233 (62625eec, on #5225) at --dtype auto for the served column (2026-10-18); this package with a MODEL_MANIFEST.json written for it. Requests: the 1,000 train rows of tasksource-jev-typed-decisions in the #5066 record, one question each, each package in its own process, the device synchronized around every request: the first 500 rows answered a third time so that their shape's graph replays, or all 1,000 a second time without graphs. Memory: allocated after loading and at the peak of the 20 longest of those rows.
Evaluation
Text: Jev Decision Index 0.3, public suite
| d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 | |
|---|---|---|---|
| Public index ↑ | 65.45 | 64.83 (−0.62) | 96.95% |
| Knowledge & Reasoning | 55.26 | 54.09 (−1.17) | 93.03% |
| Language Understanding | 68.04 | 67.55 (−0.49) | 98.75% |
| Retrieval & Classification | 66.86 | 66.46 (−0.40) | 97.90% |
| Tools & Automation | 82.57 | 82.21 (−0.36) | 98.35% |
| Arts & Human Taste | 51.02 | 50.50 (−0.52) | 94.15% |
| Raw index ↑ | 74.01 | 73.58 (−0.43) | – |
| Requests answered | 140,178 | 140,178 | – |
The five areas are the index's areas (chance-corrected skill; the public index averages them with fixed weights), with differences from d3 in parentheses. Agreement compares the top answer of every question with d3's official run (choice and score: the highest-probability option; yes / no: p ≥ 0.5): 312,320 questions in all, and per area the questions of that area's benchmarks.
The complete public suite (every request of d3's official run), run with the official kit (apolinario/decision-index f8552a1) through the vLLM Semantic Router model runtime with NVFP4 support (one request per call, graphs replaying) and scored by it, against d3's official run in vllm-sr/d3-decision-index; rescoring that run with the same kit reproduces 65.45 exactly. Through d3q/ (the Quickstart) the suite scores 64.72 with 96.96% agreement: its activation kernel rounds a few FP4 ties the other way (see Answers above). The board's full score (66.3 for d3) also needs private tests that only the maintainers run, so it is not measured here: compare with d3's public 65.45, not 66.3.
Also on the test split of tasksource/tasksource-jev-typed-decisions:
| d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 | |
|---|---|---|---|
| Accuracy | 83.23% | 82.71 (−0.52)% | 96.64% (472 of 14,031 answers changed) |
Every usable row of the split at revision 28c39125 (a state of at most 6,000 characters, no repeated options): 14,031 requests of one question each, answered by the vLLM Semantic Router model runtime with NVFP4 support on one RTX PRO 6000, d3 (BF16) by the same runtime on the same machine (83.25% on one AMD Instinct MI300X in the #5066 record). Agreement compares the top answer of every question with that BF16 run (choice and score: the highest-probability option; yes / no: p ≥ 0.5). Two calibration states, an LSAT logic-game passage and a news article, are also the states of 2 of these 14,031 requests.
Images: Jev Decision Index vision board 0.3.2
| d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 | |
|---|---|---|---|
| Public vision index ↑ | 74.15 | 73.60 (−0.55) | 93.88% |
By benchmark (chance-corrected skill, %)
| Benchmark | Questions | d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 |
|---|---|---|---|---|
| CV-Bench | 2,038 | 76.28 | 76.53 (+0.24) | 97.79% |
| BLINK | 961 | 60.05 | 57.79 (−2.26) | 95.53% |
| RealWorldQA | 589 | 73.36 | 70.03 (−3.33) | 95.08% |
| CharXiv | 532 | 79.45 | 79.70 (+0.25) | 94.74% |
| InfographicVQA | 244 | 97.81 | 97.27 (−0.55) | 98.77% |
| Mind2Web | 973 | 84.10 | 84.10 (+0.00) | 95.48% |
| Winoground | 800 | 85.75 | 86.50 (+0.75) | 98.88% |
| KIE (CORD+FUNSD) | 2,465 | 92.65 | 92.12 (−0.53) | 99.15% |
| Moderation (Hateful Memes) | 1,213 | 45.42 | 45.92 (+0.49) | 95.30% |
| R-Bench-M | 665 | 33.22 | 32.86 (−0.36) | 76.54% |
| MMMU-Pro vision | 1,730 | 45.84 | 44.77 (−1.06) | 81.97% |
All 12,210 rows of the kit's public vision suite (11 benchmarks), one image request per row, through the model runtime with NVFP4 support and scored by the official kit. d3 (BF16) answered the same rows through d3q/ on the same RTX PRO 6000 and scores 74.15, in line with the official vision board's 74.1. Agreement compares the top answer of every question with that BF16 run.
Videos: Perception Test
| d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 | |
|---|---|---|---|
| All 19,140 questions (validation) ↑ | 77.73 | 76.57 (−1.16) | 93.43% |
By area (accuracy, %)
| Area | Questions | d3 (BF16) | d3-NVFP4 | Top-1 agreement with d3 |
|---|---|---|---|---|
| Abstraction | 5,607 | 71.55 | 70.09 (−1.46) | 91.31% |
| Memory | 746 | 80.56 | 79.36 (−1.21) | 93.43% |
| Physics | 6,938 | 73.19 | 71.85 (−1.34) | 92.52% |
| Semantics | 5,849 | 88.66 | 88.02 (−0.65) | 96.53% |
Every multiple-choice question of Perception Test validation (19,140 questions over 5,260 videos, three options each, chance 33.3): one request per video with all its questions and the state "A video.", videos read as d3 reads them, through the model runtime with NVFP4 support on one RTX PRO 6000. d3 (BF16) answered the same requests through d3q/ on the same machine and scores 77.73; d3's card reports 77.4 from its internal evaluation, whose prompt may differ.
Quantized with llm-compressor 0.14.0 and compressed-tensors 0.19.0 (torch 2.11.0+cu128, transformers 5.17.0) on one GeForce RTX 5090, calibrating the text model layer by layer with the full-attention layers under the noncausal key mask of d3_runtime.PromptEncoder, as at inference. The calibration prompts are text only and none of their states appears in the Decision Index public suite. QUANT_INFO.json records the recipe, versions and calibration data. d3q_engine.py is the Decision Index engine for the kit (--engine d3q_engine:D3QEngine --option model=<this folder>).
License
Apache-2.0 (LICENSE), as d3. Built on vllm-sr/d3, which is built on Qwen/Qwen3.8-27B (Apache-2.0).
Citation
@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}}
}
- Downloads last month
- 64
