Instructions to use inarikami/AceMath-72B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inarikami/AceMath-72B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="inarikami/AceMath-72B-Instruct-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("inarikami/AceMath-72B-Instruct-GGUF", dtype="auto") - llama-cpp-python
How to use inarikami/AceMath-72B-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="inarikami/AceMath-72B-Instruct-GGUF", filename="model-Q8_0_part_aa.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 inarikami/AceMath-72B-Instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART # Run inference directly in the terminal: llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART # Run inference directly in the terminal: llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
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 inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART # Run inference directly in the terminal: ./llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
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 inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART # Run inference directly in the terminal: ./build/bin/llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
Use Docker
docker model run hf.co/inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
- LM Studio
- Jan
- vLLM
How to use inarikami/AceMath-72B-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inarikami/AceMath-72B-Instruct-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": "inarikami/AceMath-72B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
- SGLang
How to use inarikami/AceMath-72B-Instruct-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 "inarikami/AceMath-72B-Instruct-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": "inarikami/AceMath-72B-Instruct-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 "inarikami/AceMath-72B-Instruct-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": "inarikami/AceMath-72B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use inarikami/AceMath-72B-Instruct-GGUF with Ollama:
ollama run hf.co/inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
- Unsloth Studio new
How to use inarikami/AceMath-72B-Instruct-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 inarikami/AceMath-72B-Instruct-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 inarikami/AceMath-72B-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for inarikami/AceMath-72B-Instruct-GGUF to start chatting
- Docker Model Runner
How to use inarikami/AceMath-72B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
- Lemonade
How to use inarikami/AceMath-72B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART
Run and chat with the model
lemonade run user.AceMath-72B-Instruct-GGUF-Q8_0_PART
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART# Run inference directly in the terminal:
llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PARTUse 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 inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART# Run inference directly in the terminal:
./llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PARTBuild 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 inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART# Run inference directly in the terminal:
./build/bin/llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PARTUse Docker
docker model run hf.co/inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PARTGGUF Conversion
This is a llama.cpp conversion in F16, Q8 for the original https://huggingface.co/nvidia/AceMath-72B-Instruct model published by Nvidia. In order to meet the file size upload limit the GGUF file was split into two parts.
It can be recombined by running:
./recombine.sh
Introduction
We introduce AceMath, a family of frontier models designed for mathematical reasoning. The models in AceMath family, including AceMath-1.5B/7B/72B-Instruct and AceMath-7B/72B-RM, are Improved using Qwen. The AceMath-1.5B/7B/72B-Instruct models excel at solving English mathematical problems using Chain-of-Thought (CoT) reasoning, while the AceMath-7B/72B-RM models, as outcome reward models, specialize in evaluating and scoring mathematical solutions.
The AceMath-1.5B/7B/72B-Instruct models are developed from the Qwen2.5-Math-1.5B/7B/72B-Base models, leveraging a multi-stage supervised fine-tuning (SFT) process: first with general-purpose SFT data, followed by math-specific SFT data. We are releasing all training data to support further research in this field.
We only recommend using the AceMath models for solving math problems. To support other tasks, we also release AceInstruct-1.5B/7B/72B, a series of general-purpose SFT models designed to handle code, math, and general knowledge tasks. These models are built upon the Qwen2.5-1.5B/7B/72B-Base.
For more information about AceMath, check our website and paper.
All Resources
AceMath Instruction Models
AceMath Reward Models
Evaluation & Training Data
General Instruction Models
Benchmark Results (AceMath-Instruct + AceMath-72B-RM)
We compare AceMath to leading proprietary and open-access math models in above Table. Our AceMath-7B-Instruct, largely outperforms the previous best-in-class Qwen2.5-Math-7B-Instruct (Average pass@1: 67.2 vs. 62.9) on a variety of math reasoning benchmarks, while coming close to the performance of 10× larger Qwen2.5-Math-72B-Instruct (67.2 vs. 68.2). Notably, our AceMath-72B-Instruct outperforms the state-of-the-art Qwen2.5-Math-72B-Instruct (71.8 vs. 68.2), GPT-4o (67.4) and Claude 3.5 Sonnet (65.6) by a margin. We also report the rm@8 accuracy (best of 8) achieved by our reward model, AceMath-72B-RM, which sets a new record on these reasoning benchmarks. This excludes OpenAI’s o1 model, which relies on scaled inference computation.
How to use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "nvidia/AceMath-72B-Instruct"
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=2048
)
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]
Correspondence to
Zihan Liu (zihanl@nvidia.com), Yang Chen (yachen@nvidia.com), Wei Ping (wping@nvidia.com)
Citation
If you find our work helpful, we’d appreciate it if you could cite us.
@article{acemath2024,
title={AceMath: Advancing Frontier Math Reasoning with Post-Training and Reward Modeling},
author={Liu, Zihan and Chen, Yang and Shoeybi, Mohammad and Catanzaro, Bryan and Ping, Wei},
journal={arXiv preprint},
year={2024}
}
- Downloads last month
- 30
8-bit
Model tree for inarikami/AceMath-72B-Instruct-GGUF
Base model
nvidia/AceMath-72B-Instruct
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART# Run inference directly in the terminal: llama-cli -hf inarikami/AceMath-72B-Instruct-GGUF:Q8_0_PART