Model

ankit/NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP4

Blame for nano_v3_reasoning_parser.py at 4c53d11

Line blame for nano_v3_reasoning_parser.py
LineCommitAuthorDateCode
1Mirror nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP44c53d11ankitfrom vllm.reasoning.abs_reasoning_parsers import ReasoningParserManager
2from vllm.reasoning.deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser
3
4
5@ReasoningParserManager.register_module("nano_v3")
6class NanoV3ReasoningParser(DeepSeekR1ReasoningParser):
7 def extract_reasoning(self, model_output, request):
8 reasoning_content, final_content = super().extract_reasoning(
9 model_output, request
10 )
11 if (
12 hasattr(request, "chat_template_kwargs")
13 and request.chat_template_kwargs
14 and request.chat_template_kwargs.get("enable_thinking") is False
15 and final_content is None
16 ):
17 reasoning_content, final_content = final_content, reasoning_content
18
19 return reasoning_content, final_content