Views
No views yet
| Model | AIME24 | MATH500 | Training Samples |
|---|---|---|---|
| LIMO (Ours) | 57.1% | 94.8% | 817 |
| Previous SOTA | 6.5% | 59.2% | 100k+ |
| Benchmark | LIMO | Previous SOTA | Improvement |
|---|---|---|---|
| AIME24 | 57.1% | 6.5% | +50.6% |
| MATH500 | 94.8% | 59.2% | +35.6% |
| AMC23 | 92.0% | 40.6% | +51.4% |
| OlympiadBench | 66.8% | 36.7% | +30.1% |
| CHMath | 75.4% | 11.2% | +64.2% |
| Gaokao | 81.0% | 49.4% | +31.6% |
| Kaoyan | 73.4% | 32.7% | +40.7% |
| GradeSchool | 76.2% | 36.2% | +40.0% |
| Minerva | 44.9% | 47.1% | -2.2% |
| GPQA | 66.7% | 73.3% | -6.6% |
| Model | Backbone | Size | Link |
|---|---|---|---|
| LIMO | Qwen2.5-32B-Instruct | 32B | 🤗 |
| Dataset | Description | Size | Link |
|---|---|---|---|
| LIMO | Training set used to train LIMO model | 817 | 🤗 |
1# Install required packages
2pip install transformers1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Initialize model and tokenizer
5model = AutoModelForCausalLM.from_pretrained(
6 "GAIR/LIMO",
7 torch_dtype="auto",
8 trust_remote_code=True,
9 device_map="auto"
10)
11tokenizer = AutoTokenizer.from_pretrained("GAIR/LIMO", trust_remote_code=True)
12
13# Prepare input messages (We use the following template and system prompt during training and inference)
14messages = [
15 {"role": "system", "content": "Please reason step by step, and put your final answer within \\boxed{}."},
16 {"role": "user", "content": "What is the result of 1+1?"}
17]
18
19# Format input using chat template
20text = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True
24)
25
26# Tokenize input
27inputs = tokenizer(text, return_tensors="pt").to(model.device)
28
29# Generate response
30outputs = model.generate(
31 **inputs,
32 max_new_tokens=32768,
33 temperature=0.7,
34 top_p=0.95,
35 do_sample=True
36)
37
38# Decode and print response
39response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
40print(response)1# Install required packages
2pip install vllm1from vllm import LLM, SamplingParams
2from transformers import AutoTokenizer
3
4# Initialize the model
5llm = LLM(
6 model="GAIR/LIMO",
7 tensor_parallel_size=4, # adjust based on available GPUs
8 trust_remote_code=True,
9 swap_space=60,
10 gpu_memory_utilization=0.96,
11)
12
13# Prepare input messages (We use the following template and system prompt during training and inference)
14messages = [
15 {"role": "system", "content": "Please reason step by step, and put your final answer within \\boxed{}."},
16 {"role": "user", "content": "What is the result of 1+1?"}
17]
18
19# Setup tokenizer
20tokenizer = AutoTokenizer.from_pretrained("GAIR/LIMO", trust_remote_code=True)
21text = tokenizer.apply_chat_template(
22 messages,
23 tokenize=False,
24 add_generation_prompt=True
25)
26
27# Configure generation parameters
28sampling_params = SamplingParams(
29 temperature=0.7,
30 max_tokens=32768,
31 top_p=0.95,
32)
33
34# Generate response
35output = llm.generate(text, sampling_params)
36print(output[0].outputs[0].text)1@misc{ye2025limoreasoning,
2 title={LIMO: Less is More for Reasoning},
3 author={Yixin Ye and Zhen Huang and Yang Xiao and Ethan Chern and Shijie Xia and Pengfei Liu},
4 year={2025},
5 eprint={2502.03387},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2502.03387},
9}