模型简介
模型特点
模型能力
使用案例
🚀 AceReason-Nemotron-7B GGUF模型
AceReason-Nemotron-7B GGUF模型是一款通过强化学习训练的数学和代码推理模型,基于DeepSeek-R1-Distilled-Qwen-7B开发,在多个推理基准测试中表现出色。该模型在量化处理方面采用了新方法,提升了特定场景下的精度。
🚀 快速开始
你可以参考以下代码示例,快速使用AceReason-Nemotron-7B模型进行推理:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = 'nvidia/AceReason-Nemotron-7B'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
prompt = "Jen enters a lottery by picking $4$ distinct numbers from $S=\\{1,2,3,\\cdots,9,10\\}.$ $4$ numbers are randomly chosen from $S.$ She wins a prize if at least two of her numbers were $2$ of the randomly chosen numbers, and wins the grand prize if all four of her numbers were the randomly chosen numbers. The probability of her winning the grand prize given that she won a prize is $\\tfrac{m}{n}$ where $m$ and $n$ are relatively prime positive integers. Find $m+n$."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to("cuda")
generated_ids = model.generate(
**model_inputs,
max_new_tokens=32768,
temperature=0.6,
top_p=0.95
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
✨ 主要特性
- 强化学习训练:该模型完全通过强化学习进行训练,从DeepSeek-R1-Distilled-Qwen-7B开始,在多个推理基准测试中取得了显著的性能提升。
- 量化优化:采用了新的量化方法,通过手动提升关键层的精度,在一定程度上解决了标准IMatrix量化在低比特深度下的性能问题。
- 多任务推理:能够处理数学和代码推理任务,为用户提供了更广泛的应用场景。
📦 安装指南
文档中未提及具体安装步骤,暂不提供。
💻 使用示例
基础用法
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = 'nvidia/AceReason-Nemotron-7B'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
prompt = "Jen enters a lottery by picking $4$ distinct numbers from $S=\\{1,2,3,\\cdots,9,10\\}.$ $4$ numbers are randomly chosen from $S.$ She wins a prize if at least two of her numbers were $2$ of the randomly chosen numbers, and wins the grand prize if all four of her numbers were the randomly chosen numbers. The probability of her winning the grand prize given that she won a prize is $\\tfrac{m}{n}$ where $m$ and $n$ are relatively prime positive integers. Find $m+n$."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to("cuda")
generated_ids = model.generate(
**model_inputs,
max_new_tokens=32768,
temperature=0.6,
top_p=0.95
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
高级用法
文档中未提及高级用法的代码示例,暂不提供。
📚 详细文档
模型生成细节
该模型使用llama.cpp在提交版本b9c3eefd
下生成。
量化方法
作者一直在尝试一种新的量化方法,该方法选择性地提升关键层的精度,超出了默认IMatrix配置的范围。在测试中,标准IMatrix量化在低比特深度下表现不佳,特别是对于专家混合(MoE)模型。为了解决这个问题,作者使用llama.cpp
中的--tensor-type
选项手动将重要层提升到更高的精度。具体实现可参考👉 Layer bumping with llama.cpp。虽然这种方法会增加模型文件的大小,但显著提高了给定量化级别的精度。
模型选择指南
评估结果
我们在AIME 2024、AIME 2025、LiveCodeBench v5(2024/08/01 - 2025/02/01)和LiveCodeBench v6(2025/02/01 - 2025/05/01)上对我们的模型与Qwen2.5和Llama3.1模型家族中类似大小的竞争推理模型进行了评估。更多评估结果可在我们的技术报告中找到。
模型 | AIME 2024 (avg@64) |
AIME 2025 (avg@64) |
LCB v5 (avg@8) |
LCB v6 (avg@8) |
---|---|---|---|---|
QwQ-32B | 79.5 | 65.8 | 63.4 | - |
DeepSeek-R1-671B | 79.8 | 70.0 | 65.9 | - |
Llama-Nemotron-Ultra-253B | 80.8 | 72.5 | 66.3 | - |
o3-mini (medium) | 79.6 | 76.7 | 67.4 | - |
Light-R1-7B | 59.1 | 44.3 | 40.6 | 36.4 |
Light-R1-14B | 74 | 60.2 | 57.9 | 51.5 |
DeepCoder-14B (32K Inference) | 71 | 56.1 | 57.9 | 50.4 |
OpenMath-Nemotron-7B | 74.8 | 61.2 | - | - |
OpenCodeReasoning-Nemotron-7B | - | - | 51.3 | 46.1 |
Llama-Nemotron-Nano-8B-v1 | 61.3 | 47.1 | 46.6 | 46.2 |
DeepSeek-R1-Distilled-Qwen-7B | 55.5 | 39.0 | 37.6 | 34.1 |
DeepSeek-R1-Distilled-Qwen-14B | 69.7 | 50.2 | 53.1 | 47.9 |
DeepSeek-R1-Distilled-Qwen-32B | 72.6 | 54.9 | 57.2 | - |
AceReason-Nemotron-7B 🤗 | 69.0 | 53.6 | 51.8 | 44.1 |
AceReason-Nemotron-14B 🤗 | 78.6 | 67.4 | 61.1 | 54.9 |
使用建议
- 不要包含系统提示,而是将所有指令直接放在用户提示中。
- 对于数学问题,建议使用以下指令:请逐步推理,并将最终答案放在\boxed{}内。
- 对于代码问题,建议使用以下指令:
question = "" # code question
starter_code = "" # starter code function header
code_instruction_nostartercode = """Write Python code to solve the problem. Please place the solution code in the following format:\n```python\n# Your solution code here\n```"""
code_instruction_hasstartercode = """Please place the solution code in the following format:\n```python\n# Your solution code here\n```"""
if starter_code != "":
question += "\n\n" + "Solve the problem starting with the provided function header.\n\nFunction header:\n" + "```\n" + starter_code + "\n```"
question += "\n\n" + code_instruction_hasstartercode
else:
question += "\n\n" + code_instruction_nostartercode
final_prompt = "<|User|>" + question + "<|Assistant|><think>\n"
- 我们用于评估的推理引擎是vLLM==0.7.3,使用top-p=0.95,temperature=0.6,max_tokens=32768。
评估工具包
请查看评估代码、脚本和缓存的预测文件。
联系信息
- Yang Chen (yachen@nvidia.com)
- Zhuolin Yang (zhuoliny@nvidia.com)
- Zihan Liu (zihanl@nvidia.com)
- Chankyu Lee (chankyul@nvidia.com)
- Wei Ping (wping@nvidia.com)
🔧 技术细节
文档中未提及具体的技术实现细节,暂不提供。
📄 许可证
您对该模型的使用受NVIDIA开放模型许可证的约束。
引用
@article{chen2025acereason,
title={AceReason-Nemotron: Advancing Math and Code Reasoning through Reinforcement Learning},
author={Chen, Yang and Yang, Zhuolin and Liu, Zihan and Lee, Chankyu and Xu, Peng and Shoeybi, Mohammad and Catanzaro, Bryan and Ping, Wei},
journal={arXiv preprint arXiv:2505.16400},
year={2025}
}
其他信息
模型测试邀请
如果你觉得这些模型有用,欢迎帮助测试AI驱动的量子网络监控助手,进行量子就绪安全检查: 👉 量子网络监控器
量子网络监控服务的完整开源代码可在我的GitHub仓库(名称中包含NetworkMonitor的仓库)中找到:量子网络监控器源代码。如果你想自己进行模型量化,也可以找到我使用的代码GGUFModelBuilder。
测试说明
- 选择AI助手类型:
TurboLLM
(GPT-4.1-mini)HugLLM
(Hugginface开源模型)TestLLM
(仅支持实验性CPU)
- 测试内容:
- 针对实时网络服务进行函数调用。
- 测试小型开源模型在AI网络监控中的极限,包括自动Nmap安全扫描、量子就绪检查和网络监控任务。
- TestLLM模型特点:
- 零配置设置。
- 加载时间30秒(推理速度慢,但无API成本),由于成本低,无令牌限制。
- 寻求帮助:如果你对边缘设备AI感兴趣,欢迎合作!
其他助手特点
- TurboLLM:使用gpt-4.1-mini,性能出色,但OpenAI按令牌收费,因此令牌使用受限。可创建自定义cmd处理器,在量子网络监控代理上运行.net代码,进行实时网络诊断和监控、安全审计和渗透测试(Nmap/Metasploit)。
- HugLLM:使用最新的开源模型,在Hugging Face推理API上运行,性能良好。
测试示例命令
"Give me info on my websites SSL certificate"
"Check if my server is using quantum safe encyption for communication"
"Run a comprehensive security audit on my server"
- '"Create a cmd processor to .. (what ever you want)" 注意,你需要安装量子网络监控代理才能运行.net代码。这是一个非常灵活和强大的功能,请谨慎使用!
结束语
作者自掏腰包资助用于创建这些模型文件的服务器、运行量子网络监控服务以及支付Novita和OpenAI的推理费用。模型创建和量子网络监控项目背后的所有代码都是开源的。如果你觉得这些工作有帮助,请考虑请作者喝杯咖啡 ☕。你的支持有助于支付服务成本,并允许作者提高所有人的令牌限制。作者也欢迎工作机会或赞助。感谢你的支持! 😊



