Repository navigation
feat(vllm): add Solar Open2 250B runtime support - #14556
Conversation
Solar Open2 250B is not supported by the vLLM 0.26.0 runtime that Dynamo 1.4.1 ships. Adds the forward-port as two Python-only patches applied to the installed package during the vLLM runtime image build, following the pattern used for other model bring-ups. 0001 adds the SolarOpen2ForCausalLM architecture and its config, registers both, and declares the KDA linear-attention custom op so the compilation pass splits the hybrid attention graph correctly. 0002 adds the reasoning parser, the tool-call parser and the chat-template logits processor, registers the two parsers, and hardens a shared tool-parser helper against a tool schema whose properties field is not a dictionary. No kernels are built and the base image is unchanged, so no custom vLLM build is required. validate_solar_open2_port.py runs inside the build and fails the image if the architecture, parsers or the attention op did not register, rather than letting a missing registration surface later as an unsupported-architecture error. Also carries a Dynamo frontend change: the vLLM processor must leave special tokens in the stream when a reasoning parser is configured, otherwise the parser cannot see its own delimiters, and the tool-call marker lookup needs to consider the model's start-of-tool marker alongside the existing ones. Signed-off-by: snarravula-dl <[email protected]>
A forced tool choice constrains generation with the JSON schema built by
get_json_schema_from_tools(), so the model emits bare JSON carrying none of the
markers the tool parser searches for. is_forced_tool_choice is computed in the
request path but never reaches response assembly, so the marker-based parser finds
nothing and the call falls through to message.content with finish_reason=stop
instead of message.tool_calls with finish_reason=tool_calls.
Recover the calls from the schema-constrained text when the marker parser returns
nothing and the request used a forced choice. Both shapes are handled: a required
choice emits {"name": ..., "parameters": ...} objects, while a named choice emits
the parameters object alone and takes the function name from the request, since the
schema does not echo it.
Streaming needs the same treatment. There are no markers to advance on
incrementally, so a forced choice now buffers and parses the completed text through
the same corrected path rather than duplicating the logic. The flag is resolved once
at construction because process_output() consults it for every output chunk.
Verified on an aggregated deployment for required and named choices in both
streaming and non-streaming modes, with tool_choice=auto and plain chat unchanged.
Accuracy and throughput are unaffected: the new branches are gated on a forced tool
choice, which neither the benchmark trace nor the accuracy suites set.
Signed-off-by: snarravula-dl <[email protected]>
The forced-tool-choice change was written by hand and not run through the formatter, so it tripped the pinned black 23.1.0: three blank lines before _tool_calls_from_forced_choice_text instead of two, one blank line before StreamingPostProcessor instead of two, and a DeltaFunctionCall call split across three lines when it fits within the line limit. Whitespace only. The parsed syntax tree is unchanged from the commit this fixes up, so the verified tool-calling behaviour is untouched. Signed-off-by: Sandhya Rani Narravula <[email protected]>
ec845a4 to
408f5c3
Compare
Signed-off-by: Yogendra Pandey <[email protected]>
|
/ok to test e61937c |
Remove override_arch=amd64 from vllm-copy-to-acr and sglang-copy-to-acr so skopeo copies the full multi-arch manifest (amd64+arm64) to ACR. Ports ai-dynamo#12513 commit 181a088 onto this branch for Solar Open2 PR ai-dynamo#14556. Signed-off-by: Yogendra Pandey <[email protected]>
|
/ok to test 432c6fe |
dmitry-tokarev-nv
left a comment
There was a problem hiding this comment.
LGTM from DevOps side. Will have claude still review in a bit
dmitry-tokarev-nv
left a comment
There was a problem hiding this comment.
Reviewed at 432c6fe. Read the description and commits before the diff: this adds Solar Open2 250B to the vLLM 0.26.0 runtime on the 1.4.1 release branch through two build-time Python patches, plus the frontend changes the model's reasoning and tool parsers need.
Two of my findings landed on threads @jthomson04 had already opened, so they are replies there with independent verification rather than duplicates — the named-choice name collision and the forced-choice streaming buffering, both of which I measured base-vs-head and rate P1. I also confirmed their third finding (the Solar reasoning parser starting in reasoning mode) by execution and rate it P1 for this model. One new P3 is inline below.
What I verified as sound
- The patches' blast radius on other models is essentially nil, and I checked rather than assumed. Across both patches only four shared files are touched:
models/registry.py,transformers_utils/config.pyandconfigs/__init__.py(one dict entry each),reasoning/__init__.pyandtool_parsers/__init__.py(one lazy-registration entry each, opt-in via--reasoning-parser solar_open2/--tool-call-parser solar_open2),config/compilation.py(one string appended to_attention_ops, which is exactly what upstream does for every hybrid model), andtool_parsers/utils.py::find_tool_properties(a strictisinstancehardening — strictly safer than before).SolarOpen2TemplateLogitsProcessoris defined but registered nowhere, so it is reachable only through an explicit--logits-processorsand cannot affect any other model. - The Dockerfile block holds up.
ARG SITE_PACKAGESat line 63 is in the samepre_runtimestage and the samedevice == "cuda"branch, so${SITE_PACKAGES}resolves at line 136;/usr/bin/patchis present in the base image; andCompilationConfig._attention_opsis a realClassVar[list[str]], so the validator'sgetattr(..., [])check fails closed rather than passing vacuously. Confirmed invllm-runtime:1.4.2and corroborated by the greenvllm-runtime / Build multi-arch cuda13.0on both arches. - Dropping
override_arch: amd64is safe: the input isrequired: false, default: ''inshared-copy.yml, andvllm-runtime / Copy to ACR cuda13.0plus all fourvllm Deploy Testjobs are green at this SHA. - The
filters.yamladdition is correct and was necessary — nothing else in that file coveredcontainer/patches/, so a patch-only change would not have rebuilt the vLLM image.
[P2] No test pins any of the three frontend behaviours
components/src/dynamo/frontend/tests/test_vllm_processor_unit.py gives 97 passed on the base tree and 97 passed on the head tree — identical. The forced-choice recovery, the buffering switch and the skip_special_tokens override are all invisible to the suite, so nothing would catch a revert, and nothing caught either P1. That file already reaches into _is_forced_tool_choice, so there is an obvious home for the cases.
Worth knowing alongside that: this branch's amd64 pytest jobs never executed the suite at all. Every one of them failed with Can't find 'action.yml' ... under '.github/actions/pytest-local' before any test ran — the action does exist in the tree, so this is a runner path problem, not this PR's doing and not something to fix here. arm64 did run and was green. That leaves the unit suite as the only real signal on this diff, and it is silent on all of it.
Outstanding
Two P1s in components/src/dynamo/frontend/prepost.py and one P1 in the Solar reasoning parser, plus this P3. The existing approval on this PR was explicitly scoped to the DevOps side; the two prepost.py P1s affect every model served through the vLLM Python frontend, not only Solar Open2, so they are worth clearing before merge.
Where verification stopped. Everything above was run on AMD64 in nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.4.2 (vLLM 0.26.0, matching this branch) with the base and head trees on PYTHONPATH, plus the parser sources extracted from the patch files. I did not run the model: no GPU verification of the Solar Open2 architecture, the KDA attention op, the logits processor, or the accuracy and throughput claims in the description, and I did not review the 1,744-line model/config patch as modelling code.
Recover the requested function name for a named tool choice when an argument is itself called name. The guard treated any payload carrying a name key as the required-choice shape, so a tool such as create_user(name, email) returned the argument value as the function name with empty arguments and finish_reason of tool_calls. Require both name and parameters before taking that branch. Restrict the forced-choice buffering to parsers that actually receive a JSON constraint. Parsers declaring supports_required_and_named as false get no constraint from build_tool_call_guided_decoding and emit their native markers, which the streaming parser already handles incrementally; buffering them withheld every delta until finish_reason for nothing in return. Initialise the Solar Open2 reasoning parser's streaming state from the effective reasoning effort. A closed effort renders the think block into the prompt, so the generated output is all content and carries no closing delimiter to switch on. The parser started in reasoning mode regardless, which returned an empty content with the whole answer in reasoning_content while the same request non-streaming was correct. Correct the skip_special_tokens comment. The value is carried by the chat schema and is forwarded, including on the model_construct path, so the stated reason was wrong. The override itself is kept and now explains what it does and that it matches the convention most upstream tool parsers already follow. Signed-off-by: Sandhya Rani Narravula <[email protected]>
dmitry-tokarev-nv
left a comment
There was a problem hiding this comment.
Approving at d8e46c8.
All three P1s are verified fixed, each re-measured base-vs-head in an image built by actually applying both of this PR's patches to vLLM 0.26.0, with the controls re-run alongside — details on the individual threads.
| named choice returning the argument value as the function name | fixed — create_user + full arguments, required-shape edge case preserved |
| forced choice withholding every streaming delta | fixed — hermes back to 3/3/3 chunks, auto control unchanged |
| Solar reasoning parser starting in reasoning mode | fixed — low and minimal now match non-streaming; 3 open-effort controls unchanged |
skip_special_tokens comment |
corrected; behaviour deliberately unchanged, thread resolved |
Two things I specifically went looking for in the fix commit, because fixes get a looser standard than the review that produced them:
- The gate could have disabled the feature this PR exists for. It does not:
SolarOpen2ToolParserinheritssupports_required_and_named = True, so Solar Open2 still takes the JSON-constrained path. No registered parser disagrees between its class and instance value, which matters because the new gate reads the instance. _forced_tool_choicechanged meaning, so I re-audited its callers rather than trusting the earlier pass. Two consumers, both wanting the narrowed meaning; the module-level_is_forced_tool_choiceon the request path is correctly left alone.- The hand-edited
.patchhunk header is right (351->357), and both patches still apply to vLLM 0.26.0 with zero fuzz, no.rej/.orig, validator green.
Deferred, by name
- [P2] Still no test pins any of this.
test_vllm_processor_unit.pygives 97 passed on base and 97 passed on head — byte-identically — at432c6feand atd8e46c8. Three P1s lived and died in this file without the suite noticing either way, so nothing protects the fixes from a future revert. I am not blocking on it for a release branch, but it is the one thing I would want as a follow-up, and_is_forced_tool_choiceis already reachable from that file. - [P3]
structural_tag_mode=onstill over-buffers a forced choice, since the tag path also emits markers. The precise signal is the resolvedguided_decoding; not worth plumbing through on a release branch. - [P3] The
indexblob hash on the edited patch hunk is stale. Inert underpatch, would matter undergit apply --index/--3way.
Two notes that are not findings
- The fixes here match diffs I supplied on the threads, so this approval is partly a review of my own proposed changes. I did not author any commit on this PR.
- The full build matrix has not run at
d8e46c8— no/ok to test d8e46c8c12e239bc74331118fca495c735c344aayet. Since this commit edits a.patchfile, that rebuild is what re-runsvalidate_solar_open2_port.pyinside the image. I reproduced that step by hand and it passes, but CI has not.
Where verification stopped. Everything above ran on AMD64 in a container built from nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.4.2 (vLLM 0.26.0, matching this branch) with both patches applied and the base and head trees on PYTHONPATH. I did not run the model: no GPU verification of the Solar Open2 architecture, the KDA attention op, the logits processor, or the accuracy and throughput numbers in the description, and I did not review the 1,744-line model/config patch as modelling code.
The index line still named the pre-edit blob after the streaming-state change. GNU patch ignores index lines so the container build is unaffected, but the stale hash would matter to git apply --index or --3way. Signed-off-by: Sandhya Rani Narravula <[email protected]>
The two vLLM patches added by this branch fall through to the catch-all, which fails the strict codeowners check. Every other path under container/ is already owned by ops; add container/patches/ alongside them. Signed-off-by: Sandhya Rani Narravula <[email protected]>
The generated file is checked in and verified against areas.yaml, so adding the glob requires regenerating it. Signed-off-by: Sandhya Rani Narravula <[email protected]>
|
/ok to test 478842f |
|
/ok to test b3dd935 |
b3dd935 to
478842f
Compare
|
/ok to test 478842f |
147afa0
into
ai-dynamo:release/1.4.1-solar-open2-250b-post.1
Adds Solar Open2 250B support to the vLLM 0.26.0 runtime that Dynamo 1.4.1 ships,
so the release branch CI can build a runtime image that serves the model.
vLLM
Two Python-only patches applied to the installed package during the runtime image
build, following the pattern used for other model bring-ups:
0001adds theSolarOpen2ForCausalLMarchitecture and its config, registersboth, and declares the KDA linear-attention custom op so the compilation pass
splits the hybrid attention graph correctly.
0002adds the reasoning parser, the tool-call parser and the chat-templatelogits processor, registers the two parsers, and hardens a shared tool-parser
helper against a tool schema whose
propertiesfield is not a dictionary.No kernels are built and the base image is unchanged, so no custom vLLM build is
required.
validate_solar_open2_port.pyruns inside the build and fails the imageif the architecture, the parsers or the attention op did not register.
Dynamo frontend
The vLLM processor must leave special tokens in the stream when a reasoning parser
is configured, otherwise the parser cannot see its own delimiters. The tool-call
marker lookup also needs to consider the model's start-of-tool marker.
Validation
Both patches were applied to
vllm/vllm-openai:v0.26.0-ubuntu2404, the base thisbranch builds from. All 12 files apply with no fuzz or rejected hunks, and the
port validator passes:
The equivalent image has been used for the model's performance and accuracy runs
on B200.