🧩 Model Card: d3-edge
- Type: Decision model (typed choices with a probability for every option; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-edge (Qwen3.5-0.8B architecture cut to 12 layers, bidirectional full attention, 255-way code readout)
- Quantization: Q4_K, GPTQ-calibrated on synthetic questions (no Decision Index data)
- Max input: 32,768 tokens per question, as for d3-lite. One question takes about 0.26 s at 1,024 tokens, 1.0 s at 4,096 and 17 s at 32,768; the NPU serves one request at a time. About 0.58 GiB of weights (0.19 GiB of them the vision tower); the engine is at 2.0 GB after the load and peaks at about 4.8 GB of memory at 32,768 tokens
- Inputs: text and images (video: not supported)
- FastFlowLM: 1.0.12 or later
🧩 Model Card: d3-lite
- Type: Decision model (typed choices with a probability for every option; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-lite
v3.1.3(Qwen3.5-0.8B backbone, bidirectional full attention, 255-way code readout) - Quantization: Q4_K
- Max input: 32,768 tokens per question (longer prompts get
max_length_exceeded; nothing is truncated). One question takes about 0.4 s at 1,024 tokens, 1.6 s at 4,096 and 23 s at 32,768; the NPU serves one request at a time - Inputs: text and images (video: not supported)
- FastFlowLM: 1.0.11 or later
🧩 Model Card: d3-nano
- Type: Decision model (typed choices with a probability for every option; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-nano
v3.1.3(Qwen3.5-2B backbone, bidirectional full attention, 255-way code readout) - Quantization: Q4_K
- Max input: 32,768 tokens per question, as for d3-lite. One question takes about 0.6 s at 1,024 tokens, 2.5 s at 4,096 and 28 s at 32,768; the NPU serves one request at a time. About 1.9 GiB of weights (0.62 GiB of them the vision tower); the engine peaks at about 5.3 GB of memory at 32,768 tokens
- Inputs: text and images (video: not supported)
- FastFlowLM: 1.0.11 or later
🧩 Model Card: d3-mini
- Type: Decision model (typed choices with a probability for every option; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-mini
v3.1.3(Qwen3.5-4B backbone, bidirectional full attention, 255-way code readout) - Quantization: Q4_K
- Max input: 32,768 tokens per question, as for d3-lite. One question takes about 1.3 s at 1,024 tokens, 5.3 s at 4,096 and 66 s at 32,768; the NPU serves one request at a time. About 3.2 GiB of weights (0.62 GiB of them the vision tower); the engine peaks at about 8.6 GB of memory at 32,768 tokens
- Inputs: text and images (video: not supported)
- FastFlowLM: 1.0.11 or later
🧩 Model Card: d3-flash
- Type: Decision model (typed choices with a probability for every option; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-flash (Qwen3.5-9B backbone, bidirectional full attention, 255-way code readout)
- Quantization: Q4_K, GPTQ-calibrated on 192 synthetic questions (no Decision Index data)
- Max input: 32,768 tokens per question, as for d3-lite. One question takes about 2.3 s at 1,024 tokens, 9.0 s at 4,096 and 96 s at 32,768; the NPU serves one request at a time. About 5.7 GiB of weights (0.96 GiB of them the vision tower); the engine is at 6.8 GB after the load and peaks at about 14 GB of memory at 32,768 tokens
- Inputs: text and images (video: not supported)
- FastFlowLM: 1.0.12 or later
🧩 Model Card: d3-turbo
- Type: Decision model (typed choices with a probability for every option, boxes and tracks of objects in images and videos; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-turbo
v1.1(Qwen3.5-27B backbone, prefix-bidirectional attention: the state block is encoded once and every question reads it, 255-way code readout) - Quantization: Q4_K, GPTQ-calibrated on 300 synthetic questions (no Decision Index data)
- Max input: 32,768 tokens per question (state block plus question block; longer prompts get
max_length_exceeded, nothing is truncated). The state block is computed once per request, so several questions about one state cost one pass over the state plus a short pass per question. Every pass over the 27B weights costs about 3 s, so on an idle machine one question takes about 3 s at 330 tokens, 7 s at 1,024, 27 s at 4,096 and 5 minutes at 32,768 tokens, 16 questions about a 330-token state 9.5 s (HTTP, median of 5; see the benchmark page). About 15.4 GiB of weights (0.97 GiB of them the vision tower); the server process peaks at about 17.4 GB of memory for prompts up to 4,096 tokens, 22.4 GB at 24,000 and 26.3 GB at 32,768, so plan for 28 GB of free memory - Inputs: text, images and videos in the state;
assetsandbox/trackquestions (see below). Videos need FFmpeg shared libraries on the machine - Not supported:
long_context(refused with 422) - FastFlowLM: 1.0.11 or later
🧩 Model Card: d3-ultra
- Type: Decision model (same API, engine and kernels as d3-turbo: typed choices with a probability for every option, boxes and tracks; no text generation)
- Think: No
- Tool Calling Support: No
- Base Model: vllm-sr/d3-ultra (a new fine-tune of the d3-turbo architecture: Qwen3.5-27B backbone, prefix-bidirectional attention)
- Quantization: Q4_K, GPTQ-calibrated on synthetic questions (no Decision Index data)
- Max input: 32,768 tokens per question (state block plus question block, the header included), exactly as
d3:turbo. The upstream package declaresvalidated_length131,072; this build does not raise its limit (longer prompts getmax_length_exceeded, nothing is truncated). One question takes about 3.1 s at 241 tokens, 9.5 s at 1,131, 31 s at 4,201 and 5 minutes at 32,750 tokens, 16 questions about a 330-token state 12.8 s (HTTP, idle machine, median of 5; see the benchmark page). About 15.4 GiB of weights (0.97 GiB of them the vision tower); the server process is at 15.9 GiB after the load and peaks at 27.0 GiB at 32,768 tokens, so plan for 28 GB of free memory - Inputs: text, images and videos in the state;
assetsandbox/trackquestions - Not supported:
long_context(refused with 422) - FastFlowLM: 1.0.11 or later
d3 answers System One requests: a state (any JSON value) and one or more questions, each a choice (up to 255
options), a noul (no / yes) or a score (2–10 ordered levels). Every option gets a probability. It is the decision
model vLLM Semantic Router calls for routing, guardrails and tool selection, and FastFlowLM serves the same API.
▶️ Run with FastFlowLM:
A decision model is served next to (or without) a chat model, in Server Mode only.
Server Mode
flm serve --decision d3:lite # decision model only
flm serve --decision d3:edge # the smallest and fastest (12 layers, about 0.58 GiB are downloaded on first use)
flm serve qwen3.5:4b --decision d3:lite # next to a chat model
flm serve --decision d3:nano # the larger model (2B backbone)
flm serve --decision d3:mini # 4B backbone
flm serve --decision d3:flash # 9B backbone (about 5.7 GiB are downloaded on first use)
flm serve --decision d3:turbo # the most accurate model (27B backbone, needs about 28 GB of free memory;
# about 15.4 GiB are downloaded on first use)
flm serve --decision d3:ultra # a newer 27B fine-tune, same size, speed and limits as d3:turbo
d3:edge, d3:nano, d3:mini and d3:flash have the same API and limits as d3:lite; d3:edge is about 1.8× faster per short question, d3:nano about 1.7× slower,
d3:mini about 3.4× and d3:flash about 6.5× slower (see the benchmark page). d3:turbo answers the same
questions, is far slower (a 27B model: seconds per request, not milliseconds) and adds boxes, tracks, assets and videos
(see d3-turbo below). d3:ultra is a newer fine-tune of the same 27B architecture and runs on exactly the
same engine and kernels as d3:turbo (see d3-ultra below).
Send requests to POST /v1/systemone (alias /v1/decisions).
Latency next to a chat model. The NPU runs one request at a time, so a System One request that arrives while the server is generating a chat completion waits for that completion to finish. Measured with
qwen3.5:0.8bandd3:litein one server: a decision takes 146 ms alone and 12.7 s when it arrives during a 600-token completion. A secondflm servefor the decision model does not avoid this: the two processes contend for the NPU and both slow down. Where decisions gate chat (routing in front of a chat model), keep chat completions short or run the decision model on a machine of its own.
Example: curl
curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json" -d '{
"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?",
"criteria": {"returns": "Refunds, replacements and damaged deliveries",
"billing": "Payments, invoices and charges",
"general": "Anything else"}},
"urgent": {"type": "noul", "instructions": "Does this need a reply today?"},
"anger": {"type": "score", "instructions": "How upset is the customer?", "criteria": ["calm", "annoyed", "angry"]}
}
}'
The reply on a Ryzen AI MAX+ 395 (numbers rounded to 3 places here; the server sends full precision):
{"model":"d3-lite","answers":{
"route":{"type":"choice","choice":"returns","probabilities":{"returns":0.996,"billing":0.001,"general":0.003},"confidence":0.977},
"urgent":{"type":"noul","noul":0.766},
"anger":{"type":"score","score":1.057,"probabilities":{"0":0.209,"1":0.525,"2":0.266},"confidence":0.073,"legend":{"0":"calm","1":"annoyed","2":"angry"}}},
"usage":{"input_tokens":342,"output_tokens":0}}
Smoke test
Five commands check a new install end to end, text and images:
flm pull d3:lite # downloads D3-Lite-NPU2 (about 0.72 GiB, vision weights included)
flm serve --decision d3:lite # wait for "Decision model ready: d3-lite (d3:lite), max input 32768 tokens"
In a second terminal:
curl -s http://127.0.0.1:52625/v1/systemone/models
# {"object":"list","data":[{"id":"d3:lite","object":"model","api":"systemone","max_input_tokens":32768,
# "modalities":["text","image"],"image_max_pixels":1638400}]}
curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json" \
-d '{"state": "The order arrived damaged.", "questions": {"route": {"type": "choice",
"criteria": {"returns": "Refunds and replacements", "billing": "Payments", "general": null}}}}'
# {"model":"d3-lite","answers":{"route":{"type":"choice","choice":"returns","probabilities":{"returns":0.98,...
A healthy install answers "choice":"returns" with returns near 0.98 in about 0.1 s.
Then an image (Linux shell; the image is a 639 × 480 PNG from this repository):
curl -sLo panda.png https://raw.githubusercontent.com/ROCm/FastFlowLM/main/src/tb_files/panda.png
printf '{"questions": {"animal": {"type": "choice", "instructions": "Which animal is in the photo?",
"criteria": {"dog": "A dog", "panda": "A panda", "cat": "A cat"}}},
"images": ["data:image/png;base64,%s"]}' "$(base64 -w0 panda.png)" > image_request.json
curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json" -d @image_request.json
# {"model":"d3-lite","answers":{"animal":{"type":"choice","choice":"panda","probabilities":{"dog":0.0004,"panda":0.999,...
# "usage":{"input_tokens":404,"output_tokens":0}}
On Windows (PowerShell):
Invoke-WebRequest https://raw.githubusercontent.com/ROCm/FastFlowLM/main/src/tb_files/panda.png -OutFile panda.png
$img = [Convert]::ToBase64String([IO.File]::ReadAllBytes("panda.png"))
$body = '{"questions": {"animal": {"type": "choice", "instructions": "Which animal is in the photo?", "criteria": {"dog": "A dog", "panda": "A panda", "cat": "A cat"}}}, "images": ["data:image/png;base64,' + $img + '"]}'
Invoke-RestMethod http://127.0.0.1:52625/v1/systemone -Method Post -ContentType "application/json" -Body $body | ConvertTo-Json -Depth 5
A healthy install answers "choice":"panda" with panda near 0.999 and 404 input tokens, in about 0.4 s (the first
image request also loads the vision tower). flm run d3:lite does not start a chat; it prints how to serve the model.
Request and response
| Field | Meaning |
|---|---|
state |
Any JSON value: shown verbatim if a string, else as JSON. Optional. |
questions |
Object of question ID → question. Required, non-empty. |
model |
Accepted and ignored (replies name the served model). |
images |
List of base64 data URLs (data:image/png;base64,..., also jpeg, jpg, webp), any number, shared by every question. Each file at most 8 MB and 16 MP; resized to 65,536 – 1,638,400 pixels (about 1,600 input tokens at 1.6 MP). Optional. |
videos |
Not supported by d3:lite, d3:nano and d3:mini: a non-empty list is refused with 422. d3:turbo: see d3-turbo. |
assets |
d3:turbo only: named images that the state, instructions and options refer to (see d3-turbo). |
Images. Every question sees the request’s images, in order, before its text:
import base64, requests
image = "data:image/jpeg;base64," + base64.b64encode(open("receipt.jpg", "rb").read()).decode()
reply = requests.post("http://127.0.0.1:52625/v1/systemone", json={
"state": "A customer sent this photo with a refund request.",
"questions": {"damaged": {"type": "noul", "instructions": "Does the item in the photo look damaged?"}},
"images": [image],
}).json()
The first request with images loads the vision tower (two more NPU hardware contexts); text-only use never does.
Errors follow the upstream server exactly: a body that is not JSON, unknown fields or malformed questions get
422 {"detail": ...} ({"detail": {"invalid_questions": {...}}} for questions) and nothing runs; a question whose
prompt is over the limit (image tokens included) is answered with {"type", "error": "max_length_exceeded", "message"}
inside a 200 reply. Images are checked as upstream does: a bad one is refused with 422 {"detail": "images[i]: ..."}.
d3-turbo
d3:turbo runs the same requests as the smaller models and reads the request as one state block (the state and the
images) followed by one question block per question; every question sees the state and its own block only.
The server encodes the state block once and runs the questions against it, so a request with many questions about one
state is far cheaper than many requests. usage.input_tokens counts the state block once, plus every question block.
What d3:turbo adds (everything else is as above):
boxquestions ({"type": "box", "instructions": "The frisbee"}): the answer is the bounding box of the described object in the state’s images,{"type": "box", "box": {"top", "bottom", "left", "right"}, "confidence"}, as fractions of the image. Needs the state-once engine; a server whose engine library predates it lists noboxinGET /v1/systemone/modelsand answers a box question withinvalid_question(reasonbox_unsupported).assets: named images that the state, instructions and criteria refer to by name instead of repeating the data (references in the state are replaced by[image k]and read in the state block; references in a question’sinstructionsor option descriptions stay in that question’s block;imagesstay as above). Needs the engine’s question-image support (it reportsquestion_typesandassetsaccordingly).videos:data:video/mp4|webm|quicktime|x-matroska;base64,...(also GIF) or{"frames": ["data:image/png;base64,...", ...]}(PNG, JPEG or WebP frames of one size), at most 60 seconds, 32 MB and 16,384 input tokens for all videos of a request. Plain questions (choice,noul,score) read the clip (2 frames per second, at most 32 frames) in the state block. Paths and web addresses are refused. Encoded videos need the FFmpeg shared libraries (libavformat,libavcodec,libavutil,libswscale, FFmpeg 6, 7 or 8; FastFlowLM does not ship them, it loads them the first time a video arrives). Without them a request with an encoded video is refused with422 video inputs are not available: video decoding backend not available (...)and nothing runs; text, images and frame lists keep working. Ubuntu / Debian:sudo apt install libavformat60 libavcodec60 libavutil58 libswscale7; Fedora:sudo dnf install ffmpeg-free-libs; Windows: put an LGPL shared build of FFmpeg (avformat-*.dll,avcodec-*.dll,avutil-*.dll,swscale-*.dll) next toflm.exe, or pointFLM_FFMPEG_DIRat its folder.D3_VIDEO=0turns videos off.boxat a video moment ({"type": "box", "instructions": "...", "at": 3.5}) answers for the frame group nearestatseconds (the answer carries itstime);track({"type": "track", "instructions": "...", "rate": 1 | 2}) answers for every moment of the clip,{"type": "track", "track": [{"time", "box", "confidence", "visible"}, ...]}(visible: the probability that the target is in the frame). The clip is read in windows of at most 32 frames; every window is its own state, run once for all moments of all box / track questions of the request. A moment costs about as much as a box question, a window about as much as a request with a 3,000-token state: a 60 second track at 2 updates per second is 8 windows and 120 moments (about 5 minutes on the NPU, see the benchmark page). A request may ask for at most 256 moments (422otherwise,D3_MOMENT_ROWSchanges it);long_context: truestays refused.scoreis refused in requests that useassets,boxortrack(score questions take no images here, as upstream; setD3_COMPOSED_SCORE=1to have them answered).reasonin every error answer (question_malformed,question_tokens,model_output, …).GET /v1/systemone/modelslistsquestion_types,assets,long_context(false:long_context: trueis refused with 422) and, with video, thevideolimits.- A build with
-DFLM_VIDEO_FFMPEG=OFFor an engine library without state-once readout rows refuses videos,trackand box at a moment (422, orvideo_needed/track_unsupportedinline) andGET /v1/systemone/modelsdoes not list them. The release builds have the decoder built in; whether the FFmpeg libraries are on the machine is only found out when the first encoded video arrives (seevideos).
curl -s http://127.0.0.1:52625/v1/systemone -H "Content-Type: application/json" -d @box_request.json
# box_request.json: {"state": "A photo from a dog festival.", "images": ["data:image/jpeg;base64,..."],
# "questions": {"frisbee": {"type": "box", "instructions": "The frisbee"}}}
Smoke test (the published package was pulled from both Hugging Face and ModelScope and verified): flm pull d3:turbo (about 15.4 GiB), flm serve --decision d3:turbo
(about 85 s to “ready” on the test machine with the files in the page cache: 8 s to load the engine, the rest is the server’s check of the 15.4 GiB of files; the first request with an image also loads the vision tower; wait for “Decision model ready: d3-turbo (d3:turbo)”), then the
damaged-parcel example above. A healthy install answers it with "choice":"returns"; it takes about 3 s (every pass over
the 27B weights costs about 3 s on an idle machine). GET /v1/systemone/models then lists question_types choice, noul, score, box, track.
d3-ultra
d3:ultra accepts everything d3:turbo does and uses the same engine, kernels and memory (same size; requests are a little longer
because of the header). Two things differ, both inside the model package’s decision_config.json and applied by the server as upstream’s runtime does:
prompt_layoutheader-v1: for a text request the prompt of every question starts with the blockQuestions in this request:(the request’s questions, numbered, with their instructions; achoiceorscorequestion also lists its option texts without answer codes), then theState:and the question. The header is the same for every question of a request, so it is part of the state block and is computed once; a question that is not valid is left out of the header. Requests that carry images or videos, and composed requests (assets,box,track), use the plain layout, as upstream. A package with an unknownprompt_layoutis refused when the model loads.temperature_by_questions: the softmax temperature depends on the number ofchoice,noulandscorequestions of the request (the table indecision_config.json; for d3-ultra 1.046 for one question, 1.0 for more).boxandtrackanswers keep the basetemperature.
The package declares validated_length 131,072 (upstream’s validation on a datacenter GPU). The NPU build keeps the 32,768-token
limit of d3:turbo (the engine’s memory and time grow quickly beyond it) and still refuses long_context.
Accuracy and latency
Prompts, token ids and answer objects are byte-identical to the upstream runtime (checked on every build against the upstream package). Accuracy against the upstream BF16 model and latency on this NPU are in the d3 benchmark page.
Smoke test of d3:flash (the published package was pulled from both Hugging Face and ModelScope into empty stores and verified): flm pull d3:flash (about 5.7 GiB), flm serve --decision d3:flash (wait for “Decision model ready: d3-flash (d3:flash)”; the first request with an image also loads the vision tower), then the damaged-parcel example above.
Smoke test (the published package was pulled from both Hugging Face and ModelScope into empty stores and verified):
flm pull d3:ultra (about 15.4 GiB), flm serve --decision d3:ultra (about 13 s to “ready” on the test machine with the files
in the page cache; the first request with an image also loads the vision tower; wait for “Decision model ready: d3-ultra
(d3:ultra)”), then the damaged-parcel example above. A healthy install answers it with "choice":"returns"; it takes about
3 s (every pass over the 27B weights costs about 3 s on an idle machine). GET /v1/systemone/models then lists
question_types choice, noul, score, box, track. A prompt of 32,768 tokens is answered, one of 32,769 tokens is refused with
max_length_exceeded.