Zero-Shot Classification
Transformers
Safetensors
qwen3_5
feature-extraction
decision-model
classification
system-one
multimodal
vision
video
custom_code
Eval Results
Instructions to use vllm-sr/d3-nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vllm-sr/d3-nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="vllm-sr/d3-nano", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("vllm-sr/d3-nano", trust_remote_code=True) model = AutoModel.from_pretrained("vllm-sr/d3-nano", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Card: Engine mode batches by default; engine arguments replace runtime profiles
Browse filesNames the two measured Engine mode setups for what they were: one request per forward, the former default (exact in the chart), and batching, the default in vLLM Semantic Router from main. The engine arguments --max-num-batched-tokens, --max-num-seqs, --batch-window-ms and --dtype replace the --runtime-profile flag. README.md only; every measured number is unchanged.
README.md
CHANGED
|
@@ -34,7 +34,7 @@ tags:
|
|
| 34 |
- **Reads images:** multiple images per request (PNG, JPEG or WebP), given as paths, URLs, PIL images or base64 data URLs; every question of the request sees all of them.
|
| 35 |
- **Reads videos:** multiple videos per request (MP4, WebM, MOV or MKV), given as paths, URLs, base64 data URLs or frame arrays, read at 2 frames per second; **Perception Test (multiple-choice video QA): 63.5** (internal evaluation).
|
| 36 |
- **Speed:** a median of 13.4 ms for a text request, 90.2 ms for a request with an image and 301 ms for a request with a 10-second video, on one AMD Instinct MI325X GPU, one request at a time with AutoModel.
|
| 37 |
-
- **Serving:** 318 requests/s with p99 under 1 s on one AMD Instinct MI325X with vLLM Semantic Router, 4.3× AutoModel (one-question text,
|
| 38 |
- **Many questions, one call:** Choice, Yes / No and Score questions about the same input are answered together, each from its own forward pass over the input, with a probability for every option.
|
| 39 |
|
| 40 |
## Quickstart
|
|
@@ -145,7 +145,7 @@ Images go before the text of the request, each read at up to 1.6 megapixels; vid
|
|
| 145 |
|
| 146 |
## Run with vLLM Semantic Router
|
| 147 |
|
| 148 |
-
[vLLM Semantic Router](https://github.com/vllm-project/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
|
| 149 |
|
| 150 |
```bash
|
| 151 |
curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel dev --no-launch
|
|
@@ -202,19 +202,19 @@ EOF
|
|
| 202 |
|
| 203 |
### Serving performance
|
| 204 |
|
| 205 |
-
**On one AMD Instinct MI325X, vLLM Semantic Router serves d3-nano at 318 requests/s with p99 under 1 s, 4.3× AutoModel** (one-question text,
|
| 206 |
|
| 207 |

|
| 208 |
|
| 209 |
-
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` with
|
| 210 |
|
| 211 |
Where Engine mode helps, and what it costs:
|
| 212 |
|
| 213 |
-
- **Throughput:** 4.3× AutoModel's requests per second on one-question text, 3.6× on 8-question images and 2.4× on 10-second videos, with the better Engine
|
| 214 |
- **Start-up:** the first answer comes 13.4 s after launch with empty kernel caches, against 25.9 s for AutoModel, whose first image then takes another 1.19 s, and 38.0 s for the package server.
|
| 215 |
-
- **Many questions and long inputs:** one request at a time, Engine mode
|
| 216 |
-
- **GPU memory:** 16.5 GiB per replica at peak with
|
| 217 |
-
- **Answers:** Engine mode
|
| 218 |
|
| 219 |
A single short request is fastest in your own process: AutoModel answers one text question 2.8 ms sooner than Engine mode and one new image 26 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.
|
| 220 |
|
|
@@ -223,7 +223,7 @@ A single short request is fastest in your own process: AutoModel answers one tex
|
|
| 223 |
|
| 224 |
One request at a time, warm (p50 / p90, ms):
|
| 225 |
|
| 226 |
-
| Request | AutoModel | Package server | Engine,
|
| 227 |
| --- | ---: | ---: | ---: | ---: |
|
| 228 |
| Text, 1 question | 13.4 / 13.6 | 14.7 / 15.0 | 16.2 / 16.6 | 20.1 / 21.8 |
|
| 229 |
| Text, 16 questions | 57.7 / 58.0 | 58.4 / 59.9 | 54.2 / 54.8 | 54.6 / 55.5 |
|
|
@@ -234,7 +234,7 @@ One request at a time, warm (p50 / p90, ms):
|
|
| 234 |
|
| 235 |
Requests per second on one GPU, closed loop with up to 64 clients (p99 under 1 s, except *):
|
| 236 |
|
| 237 |
-
| | AutoModel † | Package server | Engine,
|
| 238 |
| --- | ---: | ---: | ---: | ---: |
|
| 239 |
| Text, 1 question | 75 | 67 | 62 | 318 |
|
| 240 |
| Image (1.6 MP), 8 questions | 1.9 | 1.9 | 2.5 | 6.9 |
|
|
|
|
| 34 |
- **Reads images:** multiple images per request (PNG, JPEG or WebP), given as paths, URLs, PIL images or base64 data URLs; every question of the request sees all of them.
|
| 35 |
- **Reads videos:** multiple videos per request (MP4, WebM, MOV or MKV), given as paths, URLs, base64 data URLs or frame arrays, read at 2 frames per second; **Perception Test (multiple-choice video QA): 63.5** (internal evaluation).
|
| 36 |
- **Speed:** a median of 13.4 ms for a text request, 90.2 ms for a request with an image and 301 ms for a request with a 10-second video, on one AMD Instinct MI325X GPU, one request at a time with AutoModel.
|
| 37 |
+
- **Serving:** 318 requests/s with p99 under 1 s on one AMD Instinct MI325X with vLLM Semantic Router, 4.3× AutoModel (one-question text, with batching, now the default); with one request per forward, the former default, it gave AutoModel's answers byte for byte when both used the same kernel settings ([Serving performance](#serving-performance)).
|
| 38 |
- **Many questions, one call:** Choice, Yes / No and Score questions about the same input are answered together, each from its own forward pass over the input, with a probability for every option.
|
| 39 |
|
| 40 |
## Quickstart
|
|
|
|
| 145 |
|
| 146 |
## Run with vLLM Semantic Router
|
| 147 |
|
| 148 |
+
[vLLM Semantic Router](https://github.com/vllm-project/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](#serving-performance)).
|
| 149 |
|
| 150 |
```bash
|
| 151 |
curl -fsSL https://vllm-sr.ai/install.sh | bash -s -- --channel dev --no-launch
|
|
|
|
| 202 |
|
| 203 |
### Serving performance
|
| 204 |
|
| 205 |
+
**On one AMD Instinct MI325X, vLLM Semantic Router serves d3-nano at 318 requests/s with p99 under 1 s, 4.3× 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.
|
| 206 |
|
| 207 |

|
| 208 |
|
| 209 |
+
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](https://github.com/vllm-project/semantic-router/blob/main/website/docs/model-runtime/engine-args.md): `--max-num-batched-tokens`, `--max-num-seqs`, `--batch-window-ms` and `--dtype`.
|
| 210 |
|
| 211 |
Where Engine mode helps, and what it costs:
|
| 212 |
|
| 213 |
+
- **Throughput:** 4.3× AutoModel's requests per second on one-question text, 3.6× on 8-question images and 2.4× on 10-second videos, with the better of the two Engine setups in each row.
|
| 214 |
- **Start-up:** the first answer comes 13.4 s after launch with empty kernel caches, against 25.9 s for AutoModel, whose first image then takes another 1.19 s, and 38.0 s for the package server.
|
| 215 |
+
- **Many questions and long inputs:** one request at a time, Engine mode with one request per forward answered 16 text questions in 54.2 ms (AutoModel: 57.7 ms), 8 questions about one image in 452 ms (519 ms) and a 32k-token text in 445 ms (477 ms); batching runs the 8 image questions together in 204 ms, 61 % less than AutoModel.
|
| 216 |
+
- **GPU memory:** 16.5 GiB per replica at peak with one request per forward, about the same as the package server's 16.4 GiB, and 22.7 GiB with batching; AutoModel, serving one request at a time, peaked at 9.1 GiB. Engine mode keeps up to 2 GiB of image features cached.
|
| 217 |
+
- **Answers:** Engine mode with one request per forward returned answers byte-identical to AutoModel's on all 7 request types (text with 1, 4 or 16 questions, an image with 1 or 8, the video and a 32k-token text) when AutoModel used the same kernel settings: 140 Engine replies and 21 AutoModel calls compared. With the kernel autotuning AutoModel runs in each new process, 1 of the 7 was byte-identical and no decision changed (largest probability difference 0.011). Batching changed 0.153 % of decisions on a 4,000-request sample of the public suite (45 of 29,339 questions, near-ties), with gold accuracy 87.707 → 87.744 %.
|
| 218 |
|
| 219 |
A single short request is fastest in your own process: AutoModel answers one text question 2.8 ms sooner than Engine mode and one new image 26 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.
|
| 220 |
|
|
|
|
| 223 |
|
| 224 |
One request at a time, warm (p50 / p90, ms):
|
| 225 |
|
| 226 |
+
| Request | AutoModel | Package server | Engine, one request per forward | Engine, batching (now the default) |
|
| 227 |
| --- | ---: | ---: | ---: | ---: |
|
| 228 |
| Text, 1 question | 13.4 / 13.6 | 14.7 / 15.0 | 16.2 / 16.6 | 20.1 / 21.8 |
|
| 229 |
| Text, 16 questions | 57.7 / 58.0 | 58.4 / 59.9 | 54.2 / 54.8 | 54.6 / 55.5 |
|
|
|
|
| 234 |
|
| 235 |
Requests per second on one GPU, closed loop with up to 64 clients (p99 under 1 s, except *):
|
| 236 |
|
| 237 |
+
| | AutoModel † | Package server | Engine, one request per forward | Engine, batching (now the default) |
|
| 238 |
| --- | ---: | ---: | ---: | ---: |
|
| 239 |
| Text, 1 question | 75 | 67 | 62 | 318 |
|
| 240 |
| Image (1.6 MP), 8 questions | 1.9 | 1.9 | 2.5 | 6.9 |
|