|
|
--- |
|
|
license: cc-by-nc-4.0 |
|
|
language: |
|
|
- en |
|
|
pipeline_tag: text-generation |
|
|
tags: |
|
|
- nvidia |
|
|
- AceMath |
|
|
- math |
|
|
- CoT |
|
|
- pytorch |
|
|
--- |
|
|
|
|
|
# <span style="color: #7FFF7F;">AceMath-7B-Instruct GGUF Models</span> |
|
|
|
|
|
|
|
|
## <span style="color: #7F7FFF;">Model Generation Details</span> |
|
|
|
|
|
This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`e743cddb`](https://github.com/ggerganov/llama.cpp/commit/e743cddb60dc3a8815b9de7dd7d5c491e61b2259). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
## <span style="color: #7FFF7F;">Quantization Beyond the IMatrix</span> |
|
|
|
|
|
I've been experimenting with a new quantization approach that selectively elevates the precision of key layers beyond what the default IMatrix configuration provides. |
|
|
|
|
|
In my testing, standard IMatrix quantization underperforms at lower bit depths, especially with Mixture of Experts (MoE) models. To address this, I'm using the `--tensor-type` option in `llama.cpp` to manually "bump" important layers to higher precision. You can see the implementation here: |
|
|
👉 [Layer bumping with llama.cpp](https://github.com/Mungert69/GGUFModelBuilder/blob/main/model-converter/tensor_list_builder.py) |
|
|
|
|
|
While this does increase model file size, it significantly improves precision for a given quantization level. |
|
|
|
|
|
### **I'd love your feedback—have you tried this? How does it perform for you?** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
<a href="https://readyforquantum.com/huggingface_gguf_selection_guide.html" style="color: #7FFF7F;"> |
|
|
Click here to get info on choosing the right GGUF model format |
|
|
</a> |
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
<!--Begin Original Model Card--> |
|
|
|
|
|
|
|
|
|
|
|
## 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 <b>Improved using Qwen</b>. |
|
|
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](https://research.nvidia.com/labs/adlr/acemath/) and [paper](https://arxiv.org/abs/2412.15084). |
|
|
|
|
|
|
|
|
## All Resources |
|
|
### AceMath Instruction Models |
|
|
- [AceMath-1.5B-Instruct](https://huggingface.co/nvidia/AceMath-1.5B-Instruct), [AceMath-7B-Instruct](https://huggingface.co/nvidia/AceMath-7B-Instruct), [AceMath-72B-Instruct](https://huggingface.co/nvidia/AceMath-72B-Instruct) |
|
|
|
|
|
### AceMath Reward Models |
|
|
- [AceMath-7B-RM](https://huggingface.co/nvidia/AceMath-7B-RM), [AceMath-72B-RM](https://huggingface.co/nvidia/AceMath-72B-RM) |
|
|
|
|
|
### Evaluation & Training Data |
|
|
- [AceMath-RewardBench](https://huggingface.co/datasets/nvidia/AceMath-RewardBench), [AceMath-Instruct Training Data](https://huggingface.co/datasets/nvidia/AceMath-Instruct-Training-Data), [AceMath-RM Training Data](https://huggingface.co/datasets/nvidia/AceMath-RM-Training-Data) |
|
|
|
|
|
### General Instruction Models |
|
|
- [AceInstruct-1.5B](https://huggingface.co/nvidia/AceInstruct-1.5B), [AceInstruct-7B](https://huggingface.co/nvidia/AceInstruct-7B), [AceInstruct-72B](https://huggingface.co/nvidia/AceInstruct-72B) |
|
|
|
|
|
|
|
|
## Benchmark Results (AceMath-Instruct + AceMath-72B-RM) |
|
|
|
|
|
<p align="center"> |
|
|
<img src="./acemath-pic.png" alt="AceMath Benchmark Results" width="800"> |
|
|
</p> |
|
|
|
|
|
|
|
|
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 |
|
|
```python |
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer |
|
|
|
|
|
model_name = "nvidia/AceMath-7B-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. |
|
|
<pre> |
|
|
@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} |
|
|
} |
|
|
</pre> |
|
|
|
|
|
|
|
|
## License |
|
|
All models in the AceMath family are for non-commercial use only, subject to [Terms of Use](https://openai.com/policies/row-terms-of-use/) of the data generated by OpenAI. We put the AceMath models under the license of [Creative Commons Attribution: Non-Commercial 4.0 International](https://spdx.org/licenses/CC-BY-NC-4.0). |
|
|
|
|
|
<!--End Original Model Card--> |
|
|
|
|
|
--- |
|
|
|
|
|
# <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span> |
|
|
|
|
|
Help me test my **AI-Powered Quantum Network Monitor Assistant** with **quantum-ready security checks**: |
|
|
|
|
|
👉 [Quantum Network Monitor](https://readyforquantum.com/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) |
|
|
|
|
|
|
|
|
The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : [Source Code Quantum Network Monitor](https://github.com/Mungert69). You will also find the code I use to quantize the models if you want to do it yourself [GGUFModelBuilder](https://github.com/Mungert69/GGUFModelBuilder) |
|
|
|
|
|
💬 **How to test**: |
|
|
Choose an **AI assistant type**: |
|
|
- `TurboLLM` (GPT-4.1-mini) |
|
|
- `HugLLM` (Hugginface Open-source models) |
|
|
- `TestLLM` (Experimental CPU-only) |
|
|
|
|
|
### **What I’m Testing** |
|
|
I’m pushing the limits of **small open-source models for AI network monitoring**, specifically: |
|
|
- **Function calling** against live network services |
|
|
- **How small can a model go** while still handling: |
|
|
- Automated **Nmap security scans** |
|
|
- **Quantum-readiness checks** |
|
|
- **Network Monitoring tasks** |
|
|
|
|
|
🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space): |
|
|
- ✅ **Zero-configuration setup** |
|
|
- ⏳ 30s load time (slow inference but **no API costs**) . No token limited as the cost is low. |
|
|
- 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate! |
|
|
|
|
|
### **Other Assistants** |
|
|
🟢 **TurboLLM** – Uses **gpt-4.1-mini** : |
|
|
- **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited. |
|
|
- **Create custom cmd processors to run .net code on Quantum Network Monitor Agents** |
|
|
- **Real-time network diagnostics and monitoring** |
|
|
- **Security Audits** |
|
|
- **Penetration testing** (Nmap/Metasploit) |
|
|
|
|
|
🔵 **HugLLM** – Latest Open-source models: |
|
|
- 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita. |
|
|
|
|
|
### 💡 **Example commands you could test**: |
|
|
1. `"Give me info on my websites SSL certificate"` |
|
|
2. `"Check if my server is using quantum safe encyption for communication"` |
|
|
3. `"Run a comprehensive security audit on my server"` |
|
|
4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a [Quantum Network Monitor Agent](https://readyforquantum.com/Download/?utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) to run the .net code on. This is a very flexible and powerful feature. Use with caution! |
|
|
|
|
|
### Final Word |
|
|
|
|
|
I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful. |
|
|
|
|
|
If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone. |
|
|
|
|
|
I'm also open to job opportunities or sponsorship. |
|
|
|
|
|
Thank you! 😊 |
|
|
|