Instructions to use QuantFactory/AceReason-Nemotron-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/AceReason-Nemotron-7B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/AceReason-Nemotron-7B-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/AceReason-Nemotron-7B-GGUF", filename="AceReason-Nemotron-7B.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/AceReason-Nemotron-7B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/AceReason-Nemotron-7B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "QuantFactory/AceReason-Nemotron-7B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/AceReason-Nemotron-7B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "QuantFactory/AceReason-Nemotron-7B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/AceReason-Nemotron-7B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with Ollama:
ollama run hf.co/QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/AceReason-Nemotron-7B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/AceReason-Nemotron-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/AceReason-Nemotron-7B-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/AceReason-Nemotron-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/AceReason-Nemotron-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.AceReason-Nemotron-7B-GGUF-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)QuantFactory/AceReason-Nemotron-7B-GGUF
This is quantized version of nvidia/AceReason-Nemotron-7B created using llama.cpp
Original Model Card
library_name: transformers license: other license_name: nvidia-open-model-license license_link: >- https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/ pipeline_tag: text-generation language: - en tags: - nvidia - reasoning - math - code - reinforcement learning - pytorch
AceReason-Nemotron: Advancing Math and Code Reasoning through Reinforcement Learning
🔥News
- 6/11/2025: We share our evaluation toolkit at AceReason Evalution including:
- scripts to run inference and scoring
- LiveCodeBench (avg@8): model prediction files and scores for each month (2023/5-2025/5)
- AIME24/25 (avg@64): model prediction files and scores
- 6/2/2025: We are excited to share our Math RL training dataset at AceReason-Math
We're thrilled to introduce AceReason-Nemotron-7B, a math and code reasoning model trained entirely through reinforcement learning (RL), starting from the DeepSeek-R1-Distilled-Qwen-7B. It delivers impressive results, achieving 69.0% on AIME 2024 (+14.5%), 53.6% on AIME 2025 (+17.4%), 51.8% on LiveCodeBench v5 (+8%), 44.1% on LiveCodeBench v6 (+7%). We systematically study the RL training process through extensive ablations and propose a simple yet effective approach: first RL training on math-only prompts, then RL training on code-only prompts. Notably, we find that math-only RL not only significantly enhances the performance of strong distilled models on math benchmarks, but also code reasoning tasks. In addition, extended code-only RL further improves code benchmark performance while causing minimal degradation in math results. We find that RL not only elicits the foundational reasoning capabilities acquired during pre-training and supervised fine-tuning (e.g., distillation), but also pushes the limits of the model's reasoning ability, enabling it to solve problems that were previously unsolvable.
We share our training recipe, training logs in our technical report.
Results
We evaluate our model against competitive reasoning models of comparable size within Qwen2.5 and Llama3.1 model family on AIME 2024, AIME 2025, LiveCodeBench v5 (2024/08/01 - 2025/02/01), and LiveCodeBench v6 (2025/02/01-2025/05/01). More evaluation results can be found in our technical report.
| Model | 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 |
How to use
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]
Usage Recommendations
- Don't include a system prompt; instead, place all instructions directly in the user prompt.
- We recommend using the following instruction for math questions: Please reason step by step, and put your final answer within \boxed{}.
- We recommend using the following instruction for code questions:
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"
- Our inference engine for evaluation is vLLM==0.7.3 using top-p=0.95, temperature=0.6, max_tokens=32768.
Evaluation Toolkit
Please check evaluation code, scripts, cached prediction files in https://huggingface.co/nvidia/AceReason-Nemotron-14B/blob/main/README_EVALUATION.md
Correspondence to
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)
License
Your use of this model is governed by the NVIDIA Open Model License.
Citation
@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}
}
- Downloads last month
- 55
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/AceReason-Nemotron-7B-GGUF", filename="", )