Repository navigation
[Model] Support Decision 3.0 decision models (vllm-sr/d3) - #61565
Merged
Merged
Conversation
Contributor
|
Documentation preview: https://vllm--61565.org.readthedocs.build/en/61565/ |
noooop
reviewed
Oct 14, 2026
Xunzhuo
force-pushed
the
d3-decision-models
branch
from
October 14, 2026 07:20
9092f0b to
1e561fb
Compare
Xunzhuo
marked this pull request as ready for review
October 14, 2026 07:47
Xunzhuo
requested review from
AndreasKaratzas,
DarkLight1337,
NickLucche,
aarnphm,
robertgshaw2-redhat and
ywang96
as code owners
October 14, 2026 07:47
Contributor
|
following #61588 |
Member
Author
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Serve the Decision 3.0 checkpoints (vllm-sr/d3 and its smaller variants) from the Hub as they are. A bare Qwen3_5Model checkpoint that ships a decision_config.json is detected and served as D3ForSequenceClassification: the 255-row answer-code readout becomes the FP32 score head, the declared non-causal full attention is applied, and the runtime's image and video budgets are used. On /v1/systemone, D3Strategy writes the checkpoint's own prompt for each question and applies its option mask and temperature. Signed-off-by: Xunzhuo Liu <xunzhuo.liu@amd.com>
Remove the D3ForSequenceClassification row and its footnote from the pooling classification table, which lists traditional pooling models. Like Clef-Flash, Decision 3.0 is documented on the Structured Decisions page. Signed-off-by: Xunzhuo Liu <xunzhuo.liu@amd.com>
Follow the Structured Decisions Models layout from vllm-project#61588 and add D3ForSequenceClassification to the multimodal models table. Signed-off-by: Xunzhuo Liu <xunzhuo.liu@amd.com>
Xunzhuo
force-pushed
the
d3-decision-models
branch
from
October 14, 2026 14:02
ea48bbe to
95c7fc3
Compare
simon-mo
approved these changes
Oct 14, 2026
simon-mo
enabled auto-merge (squash)
October 14, 2026 14:15
Collaborator
|
/ci run |
|
✅ Triggered Buildkite CI #94819 for commit ℹ️ This PR is 1 commit behind upstream |
Member
Author
|
I think CI failure is not related to the changes, looks like a flaky test? |
Member
Author
|
@khluu PTAL |
AndreasKaratzas
pushed a commit
to AndreasKaratzas/vllm
that referenced
this pull request
Oct 16, 2026
…ct#61565) Signed-off-by: Xunzhuo Liu <xunzhuo.liu@amd.com> Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
…ct#61565) Signed-off-by: Xunzhuo Liu <xunzhuo.liu@amd.com>
6 tasks done
8 tasks done
3 of 11 tasks
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Serve the Decision 3.0 decision models (
vllm-sr/d3and its smaller variants such asvllm-sr/d3-miniandvllm-sr/d3-edge) from their Hub checkpoints as they are:vllm serve vllm-sr/d3, then ask typed questions on/v1/systemone. Today these checkpoints do not load in vLLM (Qwen3_5Modelis not a registered architecture and the readout is a separate file). This builds on vLLM's Qwen3.5 implementation, the structured decisions API (#60465 and its predecessors) and the Clef-Flash detection pattern (#61308).Claims
Qwen3_5Modelcheckpoint that ships adecision_config.jsonis detected and served asD3ForSequenceClassification. The 255-row answer-code readout (readout.safetensors) becomes the FP32scorehead. The declarednoncausal_full_attentionmakes the full attention layers bidirectional, while the Gated DeltaNet layers stay causal. Tied embeddings need nothing, and per-modellayer_typesare honoured (d3-edge:llFllFllFFFF)./v1/systemonegives the checkpoint runtime's answers. For each question,D3Strategywrites the prompt the checkpoint's ownd3_format.pywrites (byte-identical on 416 prompts), reads the question's codes from the classify head, and applies the option mask and the checkpoint temperature. It supports choice (up to 255 options), yes / no and score questions, text and JSON states, and images and videos read with the runtime's budgets (1.6 MP images; 2 fps, at most 32 frames of 0.2 MP).AutoModel.from_pretrained(..., trust_remote_code=True): 0 of 416 decisions changed on d3, 1 on d3-mini and 2 on d3-edge, all ties or near-ties. The median probability difference is 0.0024 to 0.0029.Validation
Hardware and software: one AMD Instinct MI325X per side. vLLM used the official ROCm nightly image
vllm/vllm-openai-rocm:nightly-5555a2d8f7116b2b4877f66516f4128176cf722a(PyTorch 2.13, ROCm 7.2), with this branch's Python tree (mainf4b8d43a6plus this PR) overlaid; no kernels were built. The reference used the same image with the versions the checkpoint pins (transformers 5.17.0, flash-linear-attention 0.5.2). vLLM ran with no flags:vllm serve vllm-sr/<model>. Models:vllm-sr/d3@ fc2d74bd,vllm-sr/d3-mini@ 6d8971f4,vllm-sr/d3-edge@ fe71f8e1.Answers vs the reference (
model.system_one(...)in process): 416 questions per model, namely 3 states (a support ticket, release notes, a JSON account) x 128 typed questions (48 choice, 40 yes / no, 40 score), plus 1-, 4- and 16-question text, a 4-question JSON state, a 40-option choice, an image with 1 and 4 questions, and a 10 s 1080p video. The decision is the top choice,noul >= 0.5, or a score's most likely level; |dp| is the largest absolute probability difference over a question's options.For scale, two vLLM configurations of d3 (defaults vs
--max-model-len 32768, so different batch shapes) differ from each other by up to 0.011 and change 2 decisions.Throughput and latency: closed loop, 30 s per level after an 8 s warm-up, over a mix of 40 % one-question text, 20 % four-question text, 10 % four-question JSON state, 10 % 40-option choice, 15 % new 1.6 MP image and 5 % new 10 s 1080p video. Every image and video carries new bytes. Each cell gives req/s and p50 / p90 latency in ms:
One request at a time (p50 ms, AutoModel in process / vLLM):
Start-up and memory (launch to the first answer; cold = empty compile caches, model files on local disk):
--max-model-len 32768: 139.0 / 67.8 s, same throughput)Tests
pytest tests/models/multimodal/pooling/test_d3.py: d3-edge vs the checkpoint runtime, with text prompts as token ids (including a 40-option choice) and one image prompt processed by vLLM. PASSED on MI325X (134 s).pytest tests/config/test_model_arch_config.py -k "decision_config or joint_head": 8 passed.pytest tests/entrypoints/generate/structured_decisions/: 115 passed, including the new d3 strategy tests.pytest tests/models/test_registry.py tests/models/test_initialization.py -k D3: 2 passed.pre-commit runon the diff: all hooks pass. actionlint was skipped locally because no workflow files changed.Details
Qwen3_5ModelArchConfigConvertormapsarchitectures: ["Qwen3_5Model"]plusdecision_config.jsontoD3ForSequenceClassificationand keeps the decision config onhf_config. BareQwen3_5Modelcheckpoints without that file are unaffected (they stay unsupported, as today).D3ForSequenceClassificationConfigvalidatesformat_version1,pooling: lastand the attention mode. It setsis_causal=Falsefornoncausal_full_attention, so chunked prefill and prefix caching turn off by themselves, setsid2labelto the 255 codes, and makes the classify head return raw code logits by default. Probabilities only exist over a question's own options, so/classifyand/poolingcallers mask and normalize themselves.d3.py):as_seq_cls_model(Qwen3_5ForConditionalGeneration), so no LM head is allocated and thescorehead is FP32. It adds a mapper for the bare-backbone keys,readout.safetensorsasscore.weightviasecondary_weights, and a processing info that applies the runtime's media budgets. The checkpoint's processor config allows 16.7 MP images, while the runtime reads at most 1.6 MP; video frames use transformers'cap_pixels_per_framewith the runtime's 200,704-pixel cap.qwen3_vlloader, whose sampling rule already matches the runtime's, withmax_frames=32. A small change to the question builder,DecisionLimits.labeled, lets label-free strategies accept more options than the A to Z label set; the defaults of other strategies are unchanged.max_model_len-token sequence. At the config's 262,144 tokens this dominates start-up (71 s of d3's 130 s warm start).--max-model-len 32768halves it, with no throughput change on this mix.--gpu-memory-utilization(0.92) of HBM. The Gated DeltaNet layers still keep per-request state, and the attention layers keep no KV.--renderer-num-workers 4did not change this.confidenceandusagefollow/v1/systemone's definitions; option descriptions, instructions and score levels are rendered as text (non-string values go throughstr, where the runtime writes JSON); the runtime's optionalpermutation_averageis not available.decision_config.jsonreadout checkpoints, or bareQwen3_5Modelloading (searched for d3, Decision 3.0,Qwen3_5Model,decision_config.json, decider, readout). The Laya PR ([Model] Add Laya typed-decision models (Jev /v1/systemone via structured_server) #58429) adds an unrelated ModernBERT-based model.Follow-ups
vllm-sr/d3-flash,vllm-sr/d3-mini,vllm-sr/d3-nano,vllm-sr/d3-lite,vllm-sr/d3-edge) share d3's architecture and take the same code path: each Hub checkpoint is a bareQwen3_5Modelwith ad3-code-readout-v1decision_config.json(noncausal_full_attention, 255 codes) and areadout.safetensors. The variations between them, tied embeddings and d3-edge's layer layout, are exercised by d3-mini and d3-edge.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.