Nemotron-3-Super混合专家模型本地运行与微调要点

NVIDIA发布Nemotron-3-Super-120B-A12B混合推理MoE模型,总参数120B、激活参数12B,面向多智能体场景。该模型可在64GB内存或显存设备上运行,并提供GGUF、NVFP4、FP8、BF16等多种量化格式,支持本地微调。

NVIDIA 发布 **Nemotron-3-Super-120B-A12B**,一个带有12B活性参数的 120B 开放混合推理 MoE 模型,在此之前推出 [Nemotron-3 - 纳诺](<https://unsloth.ai/docs/models/nemotron-3>),其30B对应. Nemotron-3 - Super是针对多代理AI的高效和精度设计的. **1M - 键** 上下文窗口,它在AIME 2025,终端座椅和SWE-Bench验证基准上领先其大小类,同时实现最高的吞吐量. Nemotron-3 - 超级运行在设备上 **64GB (64GB) (中文(简体) ).** 的 RAM , VRAM , 或 统一内存, 现在可以在本地进行微调 。 感谢 NVIDIA 给予 Unsloth 日零支持 。 [尼莫特龙 3 超级](<https://unsloth.ai/docs/models/nemotron-3#run-nemotron-3-super-120b>)[尼莫特龙 3 纳诺](<https://unsloth.ai/docs/models/nemotron-3>) 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建议这些设置进行推论: **一般聊天/指令( 默认) :** - `temperature = 1.0` - `top_p = 1.0` **调用使用大小写的工具 :** - `temperature = 0.6` - `top_p = 0.95` **用于当地大多数用途,设置:** - `max_new_tokens` = `32,768` 改为: `262,144` 最大值为 1M 令牌的标准提示 - 根据您的 RAM / VRAM 允许, 为深推理或长形生成增加 。 聊天模板格式在使用下列时找到: ``` tokenizer.apply_chat_template([ {"role" : "user", "content" : "What is 1+1?"}, {"role" : "assistant", "content" : "2"}, {"role" : "user", "content" : "What is 2+2?"} ], add_generation_prompt = True, tokenize = False, ) ``` 因为模型是用NoPE训练的 你只需要改变 `max_position_embeddings`。 该模型不使用明确的定位嵌入,所以不需要YaRN。 #### Nemotron 3 聊天模板格式 : 尼莫特龙 3 用途 `<think>` 带有符号 ID 12 和 `</think>` 与符号 ID 13 进行推理。使用 `--special` 以查看 lama.cpp 的标志。您可能还需要 `--verbose-prompt` 来看 `<think>` 因为它是预设的。 ### 运行 Nemotron-3-Super-120B - A12B 根据您的使用大小, 您需要使用不同的设置。 有些 GGUF 最终大小类似, 因为模型架构( 如 : [gpt-oss](<https://unsloth.ai/docs/models/gpt-oss-how-to-run-and-fine-tune>))的维度不能被128分辨,所以不能将部件分解为较低的位元。 Access GGUFs [这儿](<https://huggingface.co/unsloth/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF>). 该型号的4 - 位元版本需要~64GB RAM - 72GB RAM. 8 - 位元需要128GB. #### Llama.cpp 教学(GGUF): 在 lama.cpp 中运行的指示(注意我们将使用 4 - bit 来适应大多数设备) : 1 获取最新数据 `llama.cpp` 打开 [这里的GitHub](<https://github.com/ggml-org/llama.cpp>)。也可以遵循下面的构建指令。更改 `-DGGML_CUDA=ON` 改为: `-DGGML_CUDA=OFF` 如果你没有GPU 或者只是想要CPU推论. 2 您可以直接从 Hugging Face 中拉动。 您可以根据您的 RAM / VRAM 允许, 将上下文增加为 1M 。 跟着这个 **普通教学** 使用大小写 : 跟着这个 **tool-calling** 使用大小写 : 3 通过(安装后)下载模型 `pip install huggingface_hub hf_transfer` 您可以选择 Q4_K_M 或其他量化版本, 如 。 `UD-Q4_K_XL` 。我们建议至少使用 2 - 位元动态量 `UD-Q2_K_XL` 以平衡大小和准确性。如果下载被卡住,请参见: [Hugging Face 枢纽, XET 调试](<https://unsloth.ai/docs/basics/troubleshooting-and-faqs/hugging-face-hub-xet-debugging>) 4 然后在对话模式下运行模型 : ![](<https://unsloth.ai/docs/~gitbook/image?url=https%3A%2F%2F3215535692-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FxhOjnexMCB3dmuQFQ2Zq%252Fuploads%252FiGf05CCDNnMGE9g7KtqE%252Fimage.png%3Falt%3Dmedia%26token%3D24cd05c6-4fd5-4e9b-9057-822fe27bf255&width=768&dpr=3&quality=100&sign=ec554ec2acdd51a46882ff667952b1d9&sv=3>) 还有,调整一下 **上下文窗口** 。确保您的硬件能够处理超过 256K 上下文窗口。设置到 1M 可能会触发 CUDA OOM 并崩溃,这就是默认是 262,144 的原因 。 ### 🦥 微调 尼莫特龙 3和 RL Unsloth现在支持所有Nemotron模型的微调,包括Nemotron 3 Super 和 Nano。关于Nano的笔记本实例,请参见我们的Nemotron 3 [纳米微调指南](<https://unsloth.ai/docs/models/nemotron-3>). #### 尼莫特龙 3 超级 - 路由层微调默认为停止稳定. - Nemotron-3-Super-120B - bf16 LoRA在256GB VRAM上工作. 如果你使用multiGPUs,请添加 `device_map = "balanced"` 或者跟着我们 [multiGPU 指南](<https://unsloth.ai/docs/basics/multi-gpu-training-with-unsloth>). ### 服务与部署的 LLLama 服务器 为了部署Nemotron 3用于生产,我们使用 `llama-server` 在通过 tmux 的新终端中,通过下列方式部署模型: 当你运行上面,你会得到: ![](<https://unsloth.ai/docs/~gitbook/image?url=https%3A%2F%2F3215535692-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FxhOjnexMCB3dmuQFQ2Zq%252Fuploads%252FfEwDrf2FRCuWV7t7i7L6%252Fimage.png%3Falt%3Dmedia%26token%3De2449552-27f5-4238-9e09-c708377a4e61&width=768&dpr=3&quality=100&sign=df25f44ad5ab6fa950631c861372faae&sv=3>) 然后在新的终点站, 做之后 `pip install openai`中,请检查url=值 (帮助). 将打印 ### 基准 与类似大小的型号相比,Nemotron 3 Super在提供最高吞吐量的同时具有竞争力. ![](<https://unsloth.ai/docs/~gitbook/image?url=https%3A%2F%2F3215535692-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FxhOjnexMCB3dmuQFQ2Zq%252Fuploads%252Fe2p2jCqKu7D9pTtJpOQN%252Faccuracy_chart%281%29.png%3Falt%3Dmedia%26token%3Ddf1805ab-f005-4a7f-bd77-b91f84a2c76f&width=768&dpr=3&quality=100&sign=33624aa3010c04f08edc525dea17b006&sv=3>) 上次更新的 6 几个月前 这有帮助吗?

查看原始来源