🚀 AceMath
AceMathは、数学的推論に特化した最先端のモデルファミリーです。このモデルは、数学的問題の解決や評価に高い性能を発揮し、関連する研究や開発を支援します。
🚀 クイックスタート
AceMathは、数学的推論のために設計された最先端のモデルファミリーです。AceMathファミリーのモデルには、AceMath - 1.5B/7B/72B - Instruct と AceMath - 7B/72B - RM が含まれ、これらはQwenを改良したものです。
AceMath - 1.5B/7B/72B - Instruct モデルは、Chain - of - Thought (CoT) 推論を使用して英語の数学問題を解く能力に優れています。一方、AceMath - 7B/72B - RM モデルは、結果報酬モデルとして、数学的な解の評価とスコアリングに特化しています。
AceMath - 1.5B/7B/72B - Instruct モデルは、Qwen2.5 - Math - 1.5B/7B/72B - Base モデルから開発され、多段階の教師付き微調整 (SFT) プロセスを利用しています。まず汎用的なSFTデータで、次に数学に特化したSFTデータで微調整されます。我々は、この分野のさらなる研究を支援するために、すべての学習データを公開しています。
我々は、AceMathモデルを数学問題の解決にのみ使用することを推奨しています。他のタスクをサポートするために、我々はまた、コード、数学、一般知識のタスクを処理するように設計された汎用的なSFTモデルのシリーズであるAceInstruct - 1.5B/7B/72Bを公開しています。これらのモデルは、Qwen2.5 - 1.5B/7B/72B - Base をベースに構築されています。
AceMathの詳細については、ウェブサイト と 論文 をご確認ください。
✨ 主な機能
- 高度な数学推論能力:AceMathモデルは、CoT推論を用いて複雑な数学問題を解くことができます。
- 結果評価機能:AceMath - RMモデルは、数学的な解の評価とスコアリングに特化しています。
- 多段階微調整:多段階の教師付き微調整により、モデルの性能を向上させています。
📦 インストール
このREADMEには具体的なインストール手順が記載されていないため、このセクションをスキップします。
💻 使用例
基本的な使用法
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]
高度な使用法
このREADMEには高度な使用法のコード例が記載されていないため、このサブセクションを省略します。
📚 ドキュメント
すべてのリソース
AceMath命令モデル
AceMath報酬モデル
評価と学習データ
汎用命令モデル
ベンチマーク結果 (AceMath - Instruct + AceMath - 72B - RM)
上の表では、AceMathを主要な独自およびオープンアクセスの数学モデルと比較しています。我々のAceMath - 7B - Instructは、さまざまな数学推論ベンチマークで、以前の最高水準のQwen2.5 - Math - 7B - Instruct (平均pass@1: 67.2対62.9) を大きく上回り、10倍大きいQwen2.5 - Math - 72B - Instruct (67.2対68.2) の性能に近づいています。特に、我々のAceMath - 72B - Instructは、最先端のQwen2.5 - Math - 72B - Instruct (71.8対68.2)、GPT - 4o (67.4) およびClaude 3.5 Sonnet (65.6) を上回っています。我々はまた、報酬モデルであるAceMath - 72B - RMが達成したrm@8精度 (8のうち最良) を報告しており、これはこれらの推論ベンチマークで新記録を樹立しています。ただし、大規模な推論計算に依存するOpenAIのo1モデルは除外されています。
対応先
- Zihan Liu (zihanl@nvidia.com)
- Yang Chen (yachen@nvidia.com)
- Wei Ping (wping@nvidia.com)
引用
もしあなたが我々の研究が役に立ったと感じた場合、以下のように引用していただけると幸いです。
@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}
}
📄 ライセンス
AceMathファミリーのすべてのモデルは、OpenAIによって生成されたデータの使用条件に従い、非商用利用のみを目的としています。我々は、AceMathモデルをCreative Commons Attribution: Non - Commercial 4.0 Internationalのライセンスの下に置いています。