MMR1-Math-v0-7B is a Large Multimodal Model specialized in mathematical tasks. Remarkably, MMR1-Math-v0-7B achieves state-of-the-art performance among open-source 7B multimodal models, competing effectively even against proprietary models with significantly larger parameter sizes—all trained using only 6k carefully curated data instances.
-
SOTA Performance: Sets a new state-of-the-art benchmark on math-related multimodal tasks among open-source 7B models.
-
Minimal Training Data: Remarkably achieves top-tier performance with just 6k high-quality samples from public training datasets.
-
Efficient Training with GRPO: 6 hours of RL training with 64 H100s for 15 epochs.
-
Public and High-Quality Data: Publicly sourced datasets, rigorously filtered and balanced across both difficulty and mathematical problem types.
-
Balanced Data Strategy: Uniform sampling of data based on both task difficulty (filtering out overly simple problems) and mathematical reasoning diversity.
We evaluated our model using
VLMEvalKit on four mathematical reasoning benchmarks: MathVista_MINI, MathVision, LogicVista, and MathVerse_MINI.
We also include results on the MathVerse_MINI_Vision_Only_cot (MathVerse_V) subset to maintain consistency with the VLMEvalKit leaderboard. The table below compares our model's performance against various open-source and proprietary models.
1from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
2from qwen_vl_utils import process_vision_info
3# default: Load the model on the available device(s)
4model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
5 "MMR1/MMR1-Math-v0-7B",
6 torch_dtype=torch.bfloat16,
7 attn_implementation="flash_attention_2",
8 device_map="auto",
9)
10# default processer
11processor = AutoProcessor.from_pretrained("MMR1/MMR1-Math-v0-7B")
12# Example input
13messages = [
14 {
15 "role": "user",
16 "content": [
17 {
18 "type": "image",
19 "image": "path/to/image.jpeg",
20 },
21 {"type": "text", "text": "Describe this image."},
22 ],
23 }
24]
25# Preparation for inference
26text = processor.apply_chat_template(
27 messages, tokenize=False, add_generation_prompt=True
28)
29image_inputs, video_inputs = process_vision_info(messages)
30inputs = processor(
31 text=[text],
32 images=image_inputs,
33 videos=video_inputs,
34 padding=True,
35 return_tensors="pt",
36)
37inputs = inputs.to("cuda")
38# Inference: Generation of the output
39generated_ids = model.generate(**inputs, max_new_tokens=128)
40generated_ids_trimmed = [
41 out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
42]
43output_text = processor.batch_decode(
44 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
45)
46print(output_text)
If you find MMR1 useful for your research and applications, please cite using this BibTeX:
1@misc{MMR1-Math2025,
2 title={MMR1: Advancing the Frontiers of Multimodal Reasoning},
3 author={Sicong Leng*, Jing Wang*, Jiaxi Li*, Hao Zhang*, Zhiqiang Hu, Boqiang Zhang, Hang Zhang, Yuming Jiang, Xin Li, Fan Wang, Yu Rong, Aixin Sun†, Shijian Lu†},
4 year={2025},
5 howpublished={\url{https://github.com/LengSicong/MMR1}},
6}