🚀 AceInstruct:先进的SFT模型家族
AceInstruct是一系列用于编码、数学和通用任务的先进SFT模型。该家族包含AceInstruct - 1.5B、7B和72B等模型,基于Qwen进行了改进。这些模型在Qwen2.5 - Base上使用通用SFT数据集进行微调,相同的数据集也用于AceMath - Instruct的训练。与专门处理数学问题的AceMath - Instruct不同,AceInstruct具有通用性,可应用于广泛的领域。在编码、数学和通用知识任务的基准评估中,AceInstruct的表现可与Qwen2.5 - Instruct相媲美。
如需了解AceInstruct的更多信息,请访问我们的网站和论文。
✨ 主要特性
- 多领域适用性:可用于编码、数学和通用任务。
- 性能优越:在基准评估中表现出色,部分模型优于Qwen2.5 - Instruct。
- 改进架构:基于Qwen进行改进,使用通用SFT数据集微调。
📊 基准测试结果
|
Qwen2.5 - 1.5B - Instruct |
AceInstruct - 1.5B |
Qwen2.5 - 7B - Instruct |
AceInstruct - 7B |
Qwen2.5 - 72B - Instruct |
AceInstruct - 72B |
HumanEval |
61.60 |
73.17 |
84.80 |
85.37 |
86.60 |
89.63 |
MBPP |
63.20 |
65.76 |
79.20 |
74.32 |
88.20 |
83.66 |
GSM8K |
73.20 |
80.44 |
91.60 |
93.10 |
95.80 |
96.36 |
MATH |
55.20 |
60.34 |
75.50 |
76.40 |
83.10 |
84.50 |
MMLU |
58.37 |
58.17 |
74.51 |
74.68 |
84.67 |
83.88 |
MMLU Pro |
32.40 |
33.78 |
56.30 |
54.50 |
71.10 |
66.10 |
平均得分 |
57.33 |
61.94 |
76.99 |
76.40 |
84.91 |
84.02 |
我们在编码、数学和通用知识任务中对AceInstruct和Qwen2.5 - Instruct进行了比较。结果显示,AceInstruct - 1.5B的表现优于Qwen2.5 - 1.5B - Instruct(61.94 vs. 57.33),而AceInstruct - 7B和AceInstruct - 72B的表现与Qwen2.5 - 7B - Instruct和Qwen2.5 - 72B - Instruct相近。
📦 所有资源
AceMath指令模型
AceMath奖励模型
评估与训练数据
通用指令模型
💻 使用示例
基础用法
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "AceInstruct-7B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
prompt = "Tell me something about artificial intelligence."
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=1024
)
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]
📞 联系方式
- 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}
}
📄 许可证
AceInstruct家族的所有模型仅用于非商业用途,需遵循OpenAI生成数据的使用条款。我们将AceInstruct模型置于知识共享署名 - 非商业性使用4.0国际许可协议之下。