Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
e661b9ee
Unverified
Commit
e661b9ee
authored
Mar 11, 2026
by
roikoren755
Committed by
GitHub
Mar 11, 2026
Browse files
[NemotronH] Small fix reasoning parser (#36635)
Signed-off-by:
Roi Koren
<
roik@nvidia.com
>
parent
c910eeb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
tests/reasoning/test_nemotron_v3_reasoning_parser.py
tests/reasoning/test_nemotron_v3_reasoning_parser.py
+22
-0
vllm/reasoning/nemotron_v3_reasoning_parser.py
vllm/reasoning/nemotron_v3_reasoning_parser.py
+4
-1
No files found.
tests/reasoning/test_nemotron_v3_reasoning_parser.py
View file @
e661b9ee
...
...
@@ -128,6 +128,28 @@ def test_nemotron_v3_without_thinking_returns_content(
assert
content
==
"This is plain content"
def
test_nemotron_v3_force_nonempty_content_returns_content
(
tokenizer
:
FakeNemotronTokenizer
,
):
parser_cls
=
ReasoningParserManager
.
get_reasoning_parser
(
parser_name
)
parser
=
parser_cls
(
tokenizer
)
request
=
ChatCompletionRequest
(
model
=
"test-model"
,
messages
=
[],
chat_template_kwargs
=
{
"force_nonempty_content"
:
True
},
)
reasoning
,
content
=
run_reasoning_extraction
(
parser
,
[
"<think>This is plain content"
],
request
=
request
,
streaming
=
False
,
)
assert
reasoning
is
None
assert
content
==
"This is plain content"
def
test_nemotron_v3_with_thinking_keeps_truncated_reasoning
(
tokenizer
:
FakeNemotronTokenizer
,
):
...
...
vllm/reasoning/nemotron_v3_reasoning_parser.py
View file @
e661b9ee
...
...
@@ -24,7 +24,10 @@ class NemotronV3ReasoningParser(DeepSeekR1ReasoningParser):
if
(
chat_template_kwargs
and
chat_template_kwargs
.
get
(
"enable_thinking"
)
is
False
and
(
chat_template_kwargs
.
get
(
"enable_thinking"
)
is
False
or
chat_template_kwargs
.
get
(
"force_nonempty_content"
)
is
True
)
and
final_content
is
None
):
reasoning_content
,
final_content
=
final_content
,
reasoning_content
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment