NVIDIA-Nemotron-Nano-9B-v2-Japanese is a large language model (LLM) trained from scratch by NVIDIA and designed as a unified model for both reasoning and non-reasoning tasks, specifically optimized for the Japanese language. The model was further trained from NVIDIA-Nemotron-Nano-9B-v2 using Japanese tool-calling data created with the Nemotron-Personas-Japan dataset. It responds to user queries and tasks by first generating a reasoning trace and then concluding with a final response. The model's reasoning capabilities can be controlled via a system prompt. If the user prefers the model to provide its final answer without intermediate reasoning traces, it can be configured to do so, albeit with a slight decrease in accuracy for harder prompts that require reasoning. Conversely, allowing the model to generate reasoning traces first generally results in higher-quality final solutions to queries and tasks.
The model uses a hybrid architecture consisting primarily of Mamba-2 and MLP layers combined with just four Attention layers. For the architecture, please refer to the Nemotron-H tech report. The model was trained using Megatron-LM and NeMo-RL. Improved using Qwen.
Please refer to the release blog for NVIDIA-Nemotron-Nano-9B-v2-Japanese.
We evaluated this model using Nejumi Leaderboard 4, a Japanese multi-task benchmark. The full benchmark scores for each category are available on the leaderboard.
*Note: The individual benchmarks were evaluated using the Japanese data subsets included in the Nejumi Leaderboard 4 evaluation set. These scores are not compatible with the original benchmark scores.
NVIDIA-Nemotron-Nano-9B-v2-Japanese is a general purpose reasoning and chat model intended to be used in Japanese and coding languages. Developers designing AI Agent systems, chatbots, RAG systems, and other AI-powered applications. Also suitable for typical instruction-following tasks.
Our models are designed and optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA’s hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions.
To turn reasoning on or off, pass enable_thinking=True or enable_thinking=False to tokenizer.apply_chat_template.
We recommend setting temperature to 0.6, top_p to 0.95 for reasoning True and greedy search for reasoning False, and increase max_new_tokens to 1024 or higher for reasoning True.
The snippet below shows how to use this model with vLLM. Use the latest version of vLLM and follow these instructions to build and install vLLM. This model requires vLLM 0.11.2 or later.
pip install -U "vllm>=0.11.2"
これで、以下のコマンドを使用してサーバーを起動できます。
Now you can run the server with:
The reasoning budget allows developers to keep accuracy high and meet response‑time targets - which is especially crucial for customer support, autonomous agent steps, and edge devices where every millisecond counts.
With budget control, you can set a limit for internal reasoning:
max_thinking_tokens: This is a threshold that will attempt to end the reasoning trace at the next newline encountered in the reasoning trace. If no newline is encountered within 500 tokens, it will abruptly end the reasoning trace at `max_thinking_tokens + 500`.
1from typing import Any, Dict, List
23import openai
4from transformers import AutoTokenizer
567classThinkingBudgetClient:8def__init__(self, base_url:str, api_key:str, tokenizer_name_or_path:str):9 self.base_url = base_url
10 self.api_key = api_key
11 self.tokenizer = AutoTokenizer.from_pretrained(tokenizer_name_or_path)12 self.client = openai.OpenAI(base_url=self.base_url, api_key=self.api_key)131415defchat_completion(16 self,17 model:str,18 messages: List[Dict[str, Any]],19 max_thinking_budget:int=512,20 max_tokens:int=1024,21**kwargs,22)-> Dict[str, Any]:23assert(24 max_tokens > max_thinking_budget
25),f"thinking budget must be smaller than maximum new tokens. Given {max_tokens=} and {max_thinking_budget=}"262728# 1. first call chat completion to get reasoning content29 response = self.client.chat.completions.create(30 model=model, messages=messages, max_tokens=max_thinking_budget,**kwargs
31)32 content = response.choices[0].message.content
333435 reasoning_content = content
36ifnot"</think>"in reasoning_content:37# reasoning content is too long, closed with a period (.)38 reasoning_content =f"{reasoning_content}.\n</think>\n\n"39 reasoning_tokens_len =len(40 self.tokenizer.encode(reasoning_content, add_special_tokens=False)41)42 remaining_tokens = max_tokens - reasoning_tokens_len
43assert(44 remaining_tokens >045),f"remaining tokens must be positive. Given {remaining_tokens=}. Increase the max_tokens or lower the max_thinking_budget."464748# 2. append reasoning content to messages and call completion49 messages.append({"role":"assistant","content": reasoning_content})50 prompt = self.tokenizer.apply_chat_template(51 messages,52 tokenize=False,53 continue_final_message=True,54)55 response = self.client.completions.create(56 model=model, prompt=prompt, max_tokens=remaining_tokens,**kwargs
57)585960 response_data ={61"reasoning_content": reasoning_content.strip().strip("</think>").strip(),62"content": response.choices[0].text,63"finish_reason": response.choices[0].finish_reason,64}65return response_data
バジェットを指定してサーバーを呼び出す(ここでは例として 32 トークンに制限):
Calling the server with a budget (Restricted to 32 tokens here as an example)
py
1tokenizer_name_or_path ="nvidia/NVIDIA-Nemotron-Nano-9B-v2-Japanese"2client = ThinkingBudgetClient(3 base_url="http://localhost:8000/v1",# Nano 9B v2 deployed in thinking mode4 api_key="EMPTY",5 tokenizer_name_or_path=tokenizer_name_or_path,6)789result = client.chat_completion(10 model="nvidia/NVIDIA-Nemotron-Nano-9B-v2-Japanese",11 messages=[12{"role":"system","content":"You are a helpful assistant."},13{"role":"user","content":"What is 2+2?"},14],15 max_thinking_budget=32,16 max_tokens=512,17 temperature=0.6,18 top_p=0.95,19)20print(result)
以下のような出力が表示されるはずです。
You should see output similar to the following:
{'reasoning_content': "Okay, the user asked, What is 2+2? Let me think. Well, 2 plus 2 equals 4. That's a basic.", 'content': '2 + 2 equals **4**.\n', 'finish_reason': 'stop'}
vLLM サーバーでのツール呼び出しの使用方法 (Using Tool-Calling with a vLLM Server)
ツール呼び出しを有効にして vLLM サーバーを起動する:
Start a vLLM server with native tool-calling:
After launching a vLLM server, you can call the server with tool-call support using a Python script like below:
py
1from openai import OpenAI
23client = OpenAI(4 base_url="http://0.0.0.0:5000/v1",5 api_key="dummy",6)78completion = client.chat.completions.create(9 model="nvidia/NVIDIA-Nemotron-Nano-9B-v2-Japanese",10 messages=[11{"role":"user","content":"My bill is $100. What will be the amount for 18% tip?"}12],13 tools=[14{15"type":"function",16"function":{17"name":"calculate_tip",18"parameters":{19"type":"object",20"properties":{21"bill_total":{22"type":"integer",23"description":"The total amount of the bill"24},25"tip_percentage":{26"type":"integer",27"description":"The percentage of tip to be applied"28}29},30"required":["bill_total","tip_percentage"]31}32}33},34{35"type":"function",36"function":{37"name":"convert_currency",38"parameters":{39"type":"object",40"properties":{41"amount":{42"type":"integer",43"description":"The amount to be converted"44},45"from_currency":{46"type":"string",47"description":"The currency code to convert from"48},49"to_currency":{50"type":"string",51"description":"The currency code to convert to"52}53},54"required":["from_currency","amount","to_currency"]55}56}57}58],59 temperature=0.6,60 top_p=0.95,61 max_tokens=32768,62 stream=False63)6465print(completion.choices[0].message.content)66print(completion.choices[0].message.tool_calls)
以下のような出力が表示されるはずです。
You should see output similar to the following:
<think>
Okay, let's see. The user has a bill of $100 and wants to know the amount for an 18% tip. Hmm, I need to calculate the tip based on the bill total and the percentage. The tools provided include calculate_tip, which takes bill_total and tip_percentage as parameters. So the bill_total here is 100, and the tip_percentage is 18. I should call the calculate_tip function with these values. Wait, do I need to check if the parameters are integers? The bill is $100, which is an integer, and 18% is also an integer. So that fits the function's requirements. I don't need to convert any currency here because the user is asking about a tip in the same currency. So the correct tool to use is calculate_tip with those parameters.
</think>
[ChatCompletionMessageToolCall(id='chatcmpl-tool-e341c6954d2c48c2a0e9071c7bdefd8b', function=Function(arguments='{"bill_total": 100, "tip_percentage": 18}', name='calculate_tip'), type='function')]
We follow the jinja chat template provided below. This template conditionally adds <think>\n to the start of the Assistant response if enable_thinking: true is found in the chat_template_kwargs. If no reasoning signal is added, the model defaults to reasoning "on" mode. The chat template adds <think></think> to the start of the Assistant response if enable_thinking: false is found in the chat_template_kwargs. Thus enforcing reasoning on/off behavior.
jinja
1{%- set ns = namespace() %}
2{%- if messages[0]['role'] != 'system' -%}
3 {%- set ns.non_tool_system_content = '' -%}
4 {{- '<SPECIAL_10>System\n' -}}
5{%- else -%}
6 {%- set ns.non_tool_system_content = messages[0]['content'].strip() -%}
7 {{- '<SPECIAL_10>System\n' + ns.non_tool_system_content }}
8{%- endif -%}
910{%- if tools -%}
11 {%- if ns.non_tool_system_content is defined and ns.non_tool_system_content != '' -%}
12 {{- '\n\n' -}}
13 {%- endif -%}
14 {{- 'You can use the following tools to assist the user if required:' -}}
15 {{- '\n<AVAILABLE_TOOLS>[' -}}
16 {%- for tool in tools -%}
17 {{- (tool.function if tool.function is defined else tool) | tojson -}}
18 {{- ', ' if not loop.last else '' -}}
19 {%- endfor -%}
20 {{- ']</AVAILABLE_TOOLS>\n\n' -}}
21 {{- 'If you decide to call any tool(s), use the following format:\n' -}}
22 {{- '<TOOLCALL>[{{"name": "tool_name1", "arguments": "tool_args1"}}, ' -}}
23 {{- '{{"name": "tool_name2", "arguments": "tool_args2"}}]</TOOLCALL>\n\n' -}}
24 {{- 'The user will execute tool-calls and return responses from tool(s) in this format:\n' -}}
25 {{- '<TOOL_RESPONSE>[{{"tool_response1"}}, {{"tool_response2"}}]</TOOL_RESPONSE>\n\n' -}}
26 {{- 'Based on the tool responses, you can call additional tools if needed, correct tool calls if any errors are found, or just respond to the user.' -}}
27{%- endif -%}
2829{{- '\n' -}}
30{%- set messages = messages[1:] if messages[0]['role'] == 'system' else messages -%}
3132{%- if messages[-1]['role'] == 'assistant' -%}
33 {%- set ns.last_turn_assistant_content = messages[-1]['content'].strip() -%}
34 {%- set messages = messages[:-1] -%}
35{%- endif -%}
3637{%- for message in messages %}
38 {%- set content = message['content'] if 'content' in message else '' %}
39 {%- if message['role'] == 'user' -%}
40 {{- '<SPECIAL_11>User\n' + content.strip() + '\n' }}
41 {%- elif message['role'] == 'tool' -%}
42 {%- if loop.first or (messages[loop.index0 - 1].role != 'tool') -%}
43 {{- '<SPECIAL_11>User\n' + '<TOOL_RESPONSE>[' }}
44 {%- endif -%}
45 {{- message['content'] -}}
46 {{- ', ' if not loop.last and (messages[loop.index0 + 1].role == 'tool') else '' -}}
47 {%- if loop.last or (messages[loop.index0 + 1].role != 'tool') -%}
48 {{- ']</TOOL_RESPONSE>\n' -}}
49 {%- endif -%}
50 {%- elif message['role'] == 'assistant' -%}
51 {%- if '</think>' in content -%}
52 {%- set content = content.split('</think>')[1].strip() %}
53 {%- endif -%}
54 {{- '<SPECIAL_11>Assistant\n' + content.strip() }}
55 {%- if message.tool_calls -%}
56 {%- if content.strip() != '' -%}
57 {{- '\n\n' -}}
58 {%- endif -%}
59 {{- '<TOOLCALL>[' -}}
60 {%- for call in message.tool_calls -%}
61 {%- set fn = call.function if call.function is defined else call -%}
62 {{- '{"name": "' + fn.name + '", "arguments": ' -}}
63 {%- if fn.arguments is string -%}
64 {{- fn.arguments -}}
65 {%- else -%}
66 {{- fn.arguments | tojson -}}
67 {%- endif -%}
68 {{- '}' + (', ' if not loop.last else '') -}}
69 {%- endfor -%}{{- ']</TOOLCALL>' -}}
70 {%- endif -%}
71 {{- '\n<SPECIAL_12>\n' -}}
72 {%- endif -%}
73{%- endfor -%}
7475{%- if add_generation_prompt -%}
76 {{- '<SPECIAL_11>Assistant\n' -}}
77 {%- if enable_thinking is defined and not enable_thinking -%}
78 {{- '<think></think>' -}}
79 {%- else -%}
80 {{- '<think>\n' -}}
81 {%- endif -%}
82 {%- if ns.last_turn_assistant_content is defined and ns.last_turn_assistant_content != '' -%}
83 {{- ns.last_turn_assistant_content -}}
84 {%- endif -%}
85{%- else -%}
86 {%- if ns.last_turn_assistant_content is defined and ns.last_turn_assistant_content != '' -%}
87 {{- '<SPECIAL_11>Assistant\n' -}}
88 {%- if enable_thinking is defined and not enable_thinking -%}
89 {{- '<think></think>' -}}
90 {%- else -%}
91 {{- '<think>\n' -}}
92 {%- endif -%}
93 {{- ns.last_turn_assistant_content -}}
94 {%- if continue_final_message is defined -%}
95 {%- if continue_final_message is false -%}
96 {{- '\n<SPECIAL_12>\n' -}}
97 {%- endif -%}
98 {%- else -%}
99 {{- '\n<SPECIAL_12>\n' -}}
100 {%- endif -%}
101 {%- endif -%}
102{%- endif -%}
学習、テスト、評価データセット (Training, Testing, and Evaluation Datasets)
The fine-tuning corpus for NVIDIA-Nemotron-Nano-9B-v2-Japanese consists of Japanese and English text. Our resources cover book and webpages. For Japanese tool calling, we used synthetic data generated by Qwen3-235B-A22B, Qwen3-235B-A22B-Thinking-2507, GPT-OSS-120B.
モデル品質、リスク、セキュリティ脆弱性、または NVIDIA AI に関する懸念事項がある場合は、こちらの窓口までご報告ください。
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our Trustworthy AI terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.