INF-o1-pi0: Initiating the Journey to the Infinity of LLM Reasoning
INF AI specializes in foundational large language model technology and applications. We develop trustworthy vertical-domain models and AI-native solutions tailored to industry needs. Our team of expert AI scientists and industry leaders focuses on practical "gray-box" technologies, unlocking the productivity of large language models to drive innovation across sectors. Our mission in the INF-o1 project is to enhance the reasoning capabilities of LLMs across various industrial domains and ensure a trustworthy reasoning process to serve industry needs.
INFLY TECH (Shanghai) Co., Ltd.
2024.12.31
Overview
We are pleased to share the initial checkpoint of our reasoning foundation large language model as an open-source resource. This checkpoint is intended to help evaluate our team's data production pipeline across various domains, including mathematics, programming, logic, safety, and others. Its goal is to provide a solid starting point for developing a robust policy for the subsequent reinforcement learning process.
We are hopeful that applying our reinforcement learning algorithms, supported by our carefully designed infrastructure, will lead to meaningful improvements in the model’s reasoning capabilities across various domains. At the heart of the project is our data production pipeline, which we believe plays a crucial role in enabling general reasoning capabilities. We also believe that the reasoning capability induced by the data production pipline can address a range of real-world industrial scenarios with increasing precision and reliability.
Based on our observations during the production of pi0, we have identified quality and diversity as critical factors for fostering high-quality, long Chain-of-Thought (CoT) reasoning capabilities. This insight aligns closely with conclusions drawn from the general alignment process of large language models. By meticulously designing self-verification and backtracking mechanisms to ensure process correctness in data generation, we have developed datasets that effectively induce robust long-context reasoning across diverse domains. This approach demonstrates superior performance compared to state-of-the-art o1-lile models with similar objectives, highlighting the potential of our data production pipline in advancing reasoning capabilities.
Experiments
Math Benchmarks
Model | College Math | AMC23 | MATH | Olympiad Bench | GaoKao 2023 En | AIME24 |
---|---|---|---|---|---|---|
Qwen2.5-32B-Instruct | 45.71 | 72.5 | 82.82 | 46.81 | 68.83 | 23.33 |
Qwen2.5-32B-QwQ | 43.33 | 72.5 | 88.54 | 55.56 | 78.70 | 40.00 |
INF-o1-pi0 | 47.27 | 85.0 | 88.60 | 56.00 | 77.14 | 40.00 |
Logical Benchmark
Model | lsat |
---|---|
Qwen2.5-32B-Instruct | 33.7 |
Qwen2.5-32B-QwQ | 67.0 |
INF-o1-pi0 | 71.8 |
Safety Benchmarks
Model | AIR-BENCH 2024 | AIR-BENCH 2024(CRF) |
---|---|---|
Qwen2.5-32B-Instruct | 54.29 | 53.83 |
Qwen2.5-32B-QwQ | 52.61 | 53.42 |
o1-preview | 73.25 | 70.72 |
INF-o1-pi0 | 77.25 | 74.49 |
SQL Benchmarks
Model | bird | spider |
---|---|---|
Qwen2.5-32B-Instruct | 50.2 | 77.8 |
Qwen2.5-32B-QwQ | 43.7 | 69.9 |
o1-preview | 48.9 | 70.6 |
INF-o1-pi0 | 55.3 | 79.7 |
Quick Start
We provide an example usage of the inf-o1-pi0 below.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "infly/inf-o1-pi0"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Give me a short introduction to large language model."
messages = [
{"role": "system", "content": "You are an advanced AI language model specializing in solving math and programming problems step by step. Carefully analyze each part of the problem, verify the accuracy of your reasoning with relevant facts and data, and provide clear, logical solutions. Reflect on and review your approach throughout the problem-solving process to ensure precision and thoroughness. Always think through the problem step by step and provide your answers accordingly."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
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]
print(response)
Future Plan
Our pi0 serves as the foundation for ensuring that our data generation pipeline effectively leverages the long reasoning capabilities of large language models. Looking ahead, we plan to use pi0 as the initial policy checkpoint for reinforcement learning training. Through this process, we aim to significantly enhance the generalization of reasoning capabilities, particularly for tasks in the financial and medical domains, which are critical for both academic research and industrial applications.
Contributor
Supervisors
Wei Chu • Yinghui Xu • Yuan Qi
INF-o1 team
Listed in Alphabetical Order
Chao Qu - Team Leader • Chao Wang - Infrastructure • Cheng Peng - Data Pipeline (Logical) • Dakuan Lu - Data Pipeline (Science) • Haozhe Wang - Data Pipeline (Math) & RL • Hongqing Hu - Infrastructure • Jianming Feng - Data Pipeline (Safety) • Jiaran Hao - Data Pipeline (SQL) & Infrastructure • Kelang Tian - Infrastructure • Minghao Yang - Data Pipeline (Math) • Quanbin Wang - Data Pipeline (Safety) • J.K. Liu - Data Pipeline (SQL) • Tianchu Yao - Data Pipeline & Alignment • Weidi Xu - Data Pipeline (Logical) • Xiaoyu Tan - Data Pipeline & Alignment • Yihan Songliu - Infrastructure
License Agreement
infly-o1-pi0 support commercial applications under a permissive License.
Contact
Chao Qu: [email protected] Xiaoyu Tan: [email protected]
Cititation
If you find our work helpful, feel free to give us a cite.
@misc{inftech_pi_zero2024,
author = {INF-o1 Team},
title = {INF-o1 (\(\pi_0\)): Initiating the Journey to the Infinity of LLM Reasoning},
year = {2024},
url = {https://inftech-pi-zero.github.io/},
note = {Accessed: 2024-12-31}
}
- Downloads last month
- 10