Skip to content

model: support vllm decision 2 model - #30378

Merged
ngxson merged 8 commits into
masterfrom
xsn/vllm_d2
Oct 12, 2026
Merged

ngxson merged 8 commits into
masterfrom
xsn/vllm_d2

Conversation

@ngxson

@ngxson ngxson commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Overview

Add vllm decision2 model support: https://huggingface.co/collections/vllm-sr/decision-20

Requirements

@ngxson
ngxson requested review from a team, CISC and ggerganov as code owners October 12, 2026 09:57
@ngxson ngxson changed the title Xsn/vllm d2 model: support vllm decision 2 model Oct 12, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation model Model specific server conversion labels Oct 12, 2026
cur = build_head(cur, inp_decision);

// row i of the output is the score of option i
cur = ggml_pad(ctx0, cur, 0, n_outputs - cur->ne[1], 0, 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this pad needed? Wouldn't we always have n_outputs == cur->ne[1] here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that's a trick I had from clef:

cur = ggml_pad(ctx0, cur, 0, n_tokens - cur->ne[1], 0, 0);

Basically in embd mode, all tokens are outputs, so we expect to have one output row per input token. However, clef-based models produce one row per option (which is calculated over a span of tokens), so it's like many rows are "merged" into one final score output row, that's why other non-output need to be 0 (padding). This can be improved via a follow-up PR

Comment thread conversion/vllm_decision2.py Outdated
def filter_tensors(cls, item: tuple[str, Callable[[], Tensor]]) -> tuple[str, Callable[[], Tensor]] | None:
name, gen = item
# the backbone is a bare Qwen3Model, its tensors have no "model." prefix
return super().filter_tensors(("model." + name, gen))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to add the sans-model. names instead, I already had it done for Qwen3.5 in 75118a3

@github-actions github-actions Bot added the testing Everything test related label Oct 12, 2026
@ngxson
ngxson merged commit 097cf33 into master Oct 12, 2026
21 checks passed
@CISC CISC added the highlight Changes that will be highlighted in the next release notes label Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion documentation Improvements or additions to documentation highlight Changes that will be highlighted in the next release notes model Model specific server testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants