> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/mo-xing/nemotron-3/nemotron-3-super.md).

# NVIDIA Nemotron-3-Super：运行指南

在你的设备上本地运行并微调 NVIDIA Nemotron-3-Super-120B-A12B！

NVIDIA 发布 **Nemotron-3-Super-120B-A12B**，这是一款拥有 120B 参数的开放式混合推理 MoE 模型，活跃参数为 12B，继此前发布的 [Nemotron-3-Nano](/docs/zh/mo-xing/nemotron-3.md)，其 30B 对应版本。Nemotron-3-Super 旨在为多智能体 AI 提供高效率和高准确率。凭借 **100 万 token** 上下文窗口，它在 AIME 2025、Terminal Bench 和 SWE-Bench Verified 基准上在同尺寸级别中领先，同时实现了最高吞吐量。

Nemotron-3-Super 可在配备 **64GB** 内存、VRAM 或统一内存的设备上运行，现在还可以在本地进行微调。感谢 NVIDIA 为 Unsloth 提供首日支持。

<a href="/docs/zh/mo-xing/nemotron-3.md#run-nemotron-3-super-120b" class="button primary">Nemotron 3 Super</a><a href="/docs/zh/mo-xing/nemotron-3.md" class="button secondary">Nemotron 3 Nano</a>

GGUF： [Nemotron-3-Super-120B-A12B-GGUF](https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF) • [NVFP4](https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4) • [FP8](https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-FP8) • [BF16](https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B)

### ⚙️ 使用指南

NVIDIA 建议以下推理设置：

{% columns %}
{% column %}
**通用聊天/指令（默认）：**

* `temperature = 1.0`
* `top_p = 1.0`
  {% endcolumn %}

{% column %}
**工具调用场景：**

* `temperature = 0.6`
* `top_p = 0.95`
  {% endcolumn %}
  {% endcolumns %}

**对于大多数本地使用，请设置：**

* `max_new_tokens` = `32,768` 改为 `262,144` 用于标准提示，最多可达 100 万 token
* 如你的 RAM/VRAM 允许，可增大以用于深度推理或长文本生成。

当我们使用以下内容时，可得到聊天模板格式：

{% code overflow="wrap" %}

```python
tokenizer.apply_chat_template([
    {"role" : "user", "content" : "1+1 等于多少？"},
    {"role" : "assistant", "content" : "2"},
    {"role" : "user", "content" : "1+1 等于多少？"}
    ], add_generation_prompt = True, tokenize = False,
)
```

{% endcode %}

{% hint style="success" %}
因为该模型使用 NoPE 训练，你只需要修改 `max_position_embeddings`。该模型不使用显式位置嵌入，因此不需要 YaRN。
{% endhint %}

#### Nemotron 3 聊天模板格式：

{% hint style="info" %}
Nemotron 3 使用 `<think>` 使用 token ID 12，并且 `</think>` 使用 token ID 13 用于推理。使用 `--special` 来查看 llama.cpp 的 token。你可能还需要 `--verbose-prompt` 以查看 `<think>` 因为它是前置添加的。
{% endhint %}

{% code overflow="wrap" lineNumbers="true" %}

```
<|im_start|>system\n<|im_end|>\n<|im_start|>user\n1+1 等于多少？<|im_end|>\n<|im_start|>assistant\n<think></think>2<|im_end|>\n<|im_start|>user\n2+2 等于多少？<|im_end|>\n<|im_start|>assistant\n<think>\n
```

{% endcode %}

### 🖥️ 运行 Nemotron-3-Super-120B-A12B

根据你的使用场景，你需要使用不同的设置。有些 GGUF 的大小会很接近，因为模型架构（例如 [gpt-oss](/docs/zh/mo-xing/gpt-oss-how-to-run-and-fine-tune.md)）存在不能被 128 整除的维度，因此部分内容无法量化到更低位宽。访问 GGUF [这里](https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF).

该模型的 4 位版本需要约 64GB RAM - 72GB RAM。8 位版本需要 128GB。

#### Llama.cpp 教程（GGUF）：

在 llama.cpp 中运行的说明（注意：为了适配大多数设备，我们将使用 4-bit）：

{% stepper %}
{% step %}
获取最新的 `llama.cpp` 在 [GitHub 上获取](https://github.com/ggml-org/llama.cpp)。你也可以按照下面的构建说明进行操作。将 `-DGGML_CUDA=ON` 改为 `-DGGML_CUDA=OFF` 如果你没有 GPU，或者只想使用 CPU 推理。

{% code overflow="wrap" %}

```bash
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
git clone https://github.com/ggml-org/llama.cpp
cmake llama.cpp -B llama.cpp/build \\
    -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-mtmd-cli llama-server llama-gguf-split
cp llama.cpp/build/bin/llama-* llama.cpp
```

{% endcode %}
{% endstep %}

{% step %}
你可以直接从 Hugging Face 拉取。你可以根据 RAM/VRAM 允许将上下文扩展到 100 万。

按照以下内容进行 **通用指令** 场景：

```bash
./llama.cpp/llama-cli \\
    -hf unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF:UD-Q4_K_XL \\
    --ctx-size 16384 \
    --temp 1.0 --top-p 1.0
```

按照以下内容进行 **工具调用** 场景：

```bash
./llama.cpp/llama-cli \\
    -hf unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF:UD-Q4_K_XL \\
    --ctx-size 32768 \\
    --temp 0.6 --top-p 0.95
```

{% endstep %}

{% step %}
通过以下方式下载模型（在安装 `pip install huggingface_hub hf_transfer` 之后）。你可以选择 Q4\_K\_M 或其他量化版本，例如 `UD-Q4_K_XL` 。我们建议至少使用 2-bit 动态量化 `UD-Q2_K_XL` 来平衡体积和准确性。如果下载卡住，请参见： [Hugging Face Hub、XET 调试](/docs/zh/ji-chu-zhi-shi/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md)

```bash
hf download unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF \\
    --local-dir unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF \\
    --include "*UD-Q4_K_XL*" # 对于 Dynamic 2 位使用 "*UD-Q2_K_XL*"
```

{% endstep %}

{% step %}
然后在对话模式下运行模型：

{% code overflow="wrap" %}

```bash
/llama.cpp/llama-cli \\
    --model unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF/UD-Q4_K_XL/NVIDIA-Nemotron-3-Super-120B-A12B-UD-Q4_K_XL-00001-of-00003.gguf \\
    --ctx-size 16384 \
    --seed 3407 \
    --prio 2 \
    --temp 0.6 \\
    --top-p 0.95
```

{% endcode %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FiGf05CCDNnMGE9g7KtqE%2Fimage.png?alt=media&amp;token=24cd05c6-4fd5-4e9b-9057-822fe27bf255" alt=""><figcaption></figcaption></figure>

另外，还要调整 **上下文窗口** 根据需要进行调整。确保你的硬件能够处理超过 256K 的上下文窗口。将其设置为 100 万可能会触发 CUDA OOM 并崩溃，这就是默认值为 262,144 的原因。
{% endstep %}
{% endstepper %}

### 🦥 Nemotron 3 与 RL 微调

Unsloth 现已支持所有 Nemotron 模型的微调，包括 Nemotron 3 Super 和 Nano。有关 Nano 的 notebook 示例，请参阅我们的 Nemotron 3 [Nano 微调指南](/docs/zh/mo-xing/nemotron-3.md).

#### Nemotron 3 Super

* 为了稳定性，路由层微调默认被禁用。
* Nemotron-3-Super-120B - bf16 LoRA 可在 256GB VRAM 上运行。如果你使用多 GPU，请添加     `device_map = "balanced"` 或参考我们的 [多 GPU 指南](/docs/zh/ji-chu-zhi-shi/multi-gpu-training-with-unsloth.md).

### 🦙Llama-server 提供服务与部署

要将 Nemotron 3 部署到生产环境，我们使用 `llama-server` 在新的终端中，例如通过 tmux，使用以下方式部署模型：

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-server \\
    --model unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF/UD-Q4_K_XL/NVIDIA-Nemotron-3-Super-120B-A12B-UD-Q4_K_XL-00001-of-00003.gguf \\
    --alias "unsloth/NVIDIA-Nemotron-3-Super-120B-A12B" \\
    --prio 3 \
    --min-p 0.01 \
    --temp 0.6 \\
    --top-p 0.95 \\
    --ctx-size 16384 \
    --port 8001
```

{% endcode %}

运行上述命令后，你将得到：

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FfEwDrf2FRCuWV7t7i7L6%2Fimage.png?alt=media&amp;token=e2449552-27f5-4238-9e09-c708377a4e61" alt=""><figcaption></figcaption></figure>

然后在新的终端中，在完成以下操作后 `pip install openai`，执行：

{% code overflow="wrap" %}

```python
from openai import OpenAI
import json
openai_client = OpenAI(
    base_url = "http://127.0.0.1:8001/v1",
    api_key = "sk-no-key-required",
)
completion = openai_client.chat.completions.create(
    model = "unsloth/NVIDIA-Nemotron-3-Super-120B-A12B",
    messages = [{"role": "user", "content": "2+2 等于多少？"},],
)
print(completion.choices[0].message.reasoning_content)
print(completion.choices[0].message.content)
```

{% endcode %}

这将打印

{% code overflow="wrap" %}

```
好，用户问的是“2+2 等于多少？”这看起来是一个非常基础的算术问题。

嗯，也许他们是在测试我是否在认真注意，或者可能是一个正在学数学的小孩子。也可能是有人想看看我会不会把一个简单问题过度复杂化。

我应该直截了当地回答，因为这个问题没有任何陷阱迹象。答案肯定是 4——没必要对基础加法多疑。

不过我心里还是有点怀疑他们是不是在铺垫一个笑话（比如“当 2 足够大时，2+2=5”），但既然他们没有提供任何上下文，我就当作是真诚提问。

最好清晰而友善地回答——如果他们在学习，这样也许会鼓励他们继续提问。不过不用啰嗦；只要有帮助地陈述事实就行。

2 + 2 等于 **4**。

这是十进制记数法中的一个基本算术事实。如果你是在不同的语境下提问（比如模运算、二进制，或者某个笑话/典故），欢迎说明——我很乐意调整！😊
```

{% endcode %}

### 基准测试

与同等规模的模型相比，Nemotron 3 Super 具备竞争力，同时提供最高吞吐量。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fe2p2jCqKu7D9pTtJpOQN%2Faccuracy_chart(1).png?alt=media&amp;token=df1805ab-f005-4a7f-bd77-b91f84a2c76f" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/zh/mo-xing/nemotron-3/nemotron-3-super.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
