MMR1 Math V0 7B
專注於數學任務的大型多模態模型,在開源7B多模態模型中實現最先進的性能
Downloads 75
Release Time : 3/11/2025
Model Overview
MMR1-Math-v0-7B是基於Qwen2.5-VL-7B-Instruct構建的多模態大模型,專注於數學推理任務。該模型僅使用6k精選數據樣本訓練即達到SOTA性能,在多個數學推理基準測試上表現優異。
Model Features
SOTA性能
在開源7B多模態模型中創下數學任務的新標杆
高效訓練
僅需6k高質量樣本和6小時RL訓練即可達到頂級表現
數據策略
基於任務難度和數學推理多樣性進行均勻採樣的高質量公開數據
GRPO訓練
使用64張H100顯卡進行高效RL訓練(15個epoch)
Model Capabilities
多模態數學推理
圖像文本理解
複雜數學問題解答
邏輯推理
Use Cases
教育
數學題目解答
幫助學生理解並解答覆雜的數學題目
在MathVista等基準測試上達到71.0分
研究
多模態推理研究
為多模態推理領域提供基準模型
在多個數學推理基準上超越同類模型
🚀 MMR1:推進多模態推理的前沿
MMR1是一個專注於多模態推理的項目,其推出的MMR1 - Math - v0模型在數學多模態任務上表現出色,僅用6k數據就達到了SOTA水平,為多模態推理領域帶來了新的突破。
🚀 快速開始
from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
# default: Load the model on the available device(s)
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"MMR1/MMR1-Math-v0-7B",
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2",
device_map="auto",
)
# default processer
processor = AutoProcessor.from_pretrained("MMR1/MMR1-Math-v0-7B")
# Example input
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "path/to/image.jpeg",
},
{"type": "text", "text": "Describe this image."},
],
}
]
# Preparation for inference
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)
批量推理
# Sample messages for batch inference
messages1 = [
{
"role": "user",
"content": [
{"type": "image", "image": "file:///path/to/image1.jpg"},
{"type": "image", "image": "file:///path/to/image2.jpg"},
{"type": "text", "text": "What are the common elements in these pictures?"},
],
}
]
messages2 = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who are you?"},
]
# Combine messages for batch processing
messages = [messages1, messages2]
# Preparation for batch inference
texts = [
processor.apply_chat_template(msg, tokenize=False, add_generation_prompt=True)
for msg in messages
]
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=texts,
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to("cuda")
# Batch Inference
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_texts = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_texts)
✨ 主要特性
模型亮點
- SOTA性能:在開源7B模型的數學相關多模態任務中,樹立了新的最優基準。
- 少量訓練數據:僅使用來自公共訓練數據集的6k高質量樣本,就取得了頂級性能。
- GRPO高效訓練:使用64個H100進行6小時的強化學習訓練,共15個epoch。
- 公開且高質量的數據:數據來源於公開數據集,經過嚴格篩選,在難度和數學問題類型上保持平衡。
- 平衡的數據策略:基於任務難度(過濾過於簡單的問題)和數學推理多樣性進行均勻的數據採樣。
📚 詳細文檔
📰 新聞
- [2025.03.11] 🔥🔥 發佈MMR1 - Math - v0,僅用6k數據就達到了SOTA水平!
鏈接
- 代碼:https://github.com/LengSicong/MMR1
- 該模型在論文 LMM - R1: Empowering 3B LMMs with Strong Reasoning Abilities Through Two - Stage Rule - Based RL 中展示,代碼可在 https://github.com/LengSicong/MMR1 找到。
模型描述
MMR1 - Math - v0 - 7B是一個專門用於數學任務的大型多模態模型。值得注意的是,MMR1 - Math - v0 - 7B在開源7B多模態模型中達到了最優性能,即使與參數規模大得多的專有模型競爭也不落下風,而這一切僅通過精心策劃的6k數據實例訓練而成。
評估結果
我們使用 VLMEvalKit 在四個數學推理基準測試上評估了我們的模型:MathVista_MINI、MathVision、LogicVista和MathVerse_MINI。
我們還包含了MathVerse_MINI_Vision_Only_cot (MathVerse_V) 子集的結果,以與VLMEvalKit排行榜保持一致。下表將我們模型的性能與各種開源和專有模型進行了比較。
模型 | 規模 | MathVista | MathVision | LogicVista | MathVerse | MathVerse_V |
---|---|---|---|---|---|---|
閉源模型 | ||||||
[GPT - 4o 1120](https://openai.com/index/gpt - 4o - system - card/) | - | 60.0 | 31.2 | 52.8 | 40.6 | - |
Gemini - 2.0 - flash | - | 70.4 | 43.6 | 52.3 | 47.8 | - |
[Claude3.7 - Sonnet](https://www.anthropic.com/news/claude - 3 - 7 - sonnet) | - | 66.8 | 41.9 | 58.2 | 46.7 | - |
與R1相關的模型 | ||||||
[LLaVA - CoT](https://github.com/PKU - YuanGroup/LLaVA - CoT) | 11B | 52.5 | 19.9 | 39.6 | 22.6 | - |
[Open - R1 - Multimodal](https://github.com/EvolvingLMMs - Lab/open - r1 - multimodal) | 7B | 60.6 | - | - | - | - |
Mulberry | 7B | 63.1 | - | - | - | - |
LMM - R1 | 3B | 63.2 | 26.4 | - | - | 41.6 |
[R1 - Onevision](https://github.com/Fancy - MLLM/R1 - Onevision?tab=readme - ov - file) | 7B | - | 26.2 | - | - | 44.1 |
[MM - Eureka](https://github.com/ModalMinds/MM - EUREKA) | 8B | 67.1 | 22.2 | - | - | 40.4 |
[MM - Eureka](https://github.com/ModalMinds/MM - EUREKA) | 38B | 64.2 | 26.6 | - | - | 48.9 |
開源模型 | ||||||
[Ovis2 - 8b](https://github.com/AIDC - AI/Ovis) | 8B | 71.8 | 25.9 | 39.4 | 42.3 | - |
[MiniCPM - o - 2.6](https://github.com/OpenBMB/MiniCPM - o) | 8B | 71.9 | 21.7 | 36.0 | 35.0 | - |
[Qwen2.5 - VL](https://github.com/QwenLM/Qwen2.5 - VL) (官方) | 7B | 68.2 | 25.4 | 47.9 | 41.1 | - |
[Qwen2.5 - VL](https://github.com/QwenLM/Qwen2.5 - VL) (復現) | 7B | 67.5 | 25.6 | 46.8 | 42.5 | 46.9 |
我們的模型 | ||||||
MMR1 - math - v0 | 7B | 71.0 | 30.2 | 50.8 | 45.1 | 49.8 |
📄 許可證
本項目採用apache - 2.0許可證。
📚 引用
如果您發現MMR1對您的研究和應用有用,請使用以下BibTeX進行引用:
@misc{MMR1-Math2025,
title={MMR1: Advancing the Frontiers of Multimodal Reasoning},
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†},
year={2025},
howpublished={\url{https://github.com/LengSicong/MMR1}},
}
MMR1: 推進多模態推理的前沿
如果您喜歡我們的項目,請在 Github 上給我們一個星星 ⭐ 以支持我們。 🙏🙏
Clip Vit Large Patch14 336
基於Vision Transformer架構的大規模視覺語言預訓練模型,支持圖像與文本的跨模態理解
文本生成圖像
Transformers

C
openai
5.9M
241
Fashion Clip
MIT
FashionCLIP是基於CLIP開發的視覺語言模型,專門針對時尚領域進行微調,能夠生成通用產品表徵。
文本生成圖像
Transformers English

F
patrickjohncyh
3.8M
222
Gemma 3 1b It
Gemma 3是Google推出的輕量級先進開放模型系列,基於與Gemini模型相同的研究和技術構建。該模型是多模態模型,能夠處理文本和圖像輸入並生成文本輸出。
文本生成圖像
Transformers

G
google
2.1M
347
Blip Vqa Base
Bsd-3-clause
BLIP是一個統一的視覺語言預訓練框架,擅長視覺問答任務,通過語言-圖像聯合訓練實現多模態理解與生成能力
文本生成圖像
Transformers

B
Salesforce
1.9M
154
CLIP ViT H 14 Laion2b S32b B79k
MIT
基於OpenCLIP框架在LAION-2B英文數據集上訓練的視覺-語言模型,支持零樣本圖像分類和跨模態檢索任務
文本生成圖像
Safetensors
C
laion
1.8M
368
CLIP ViT B 32 Laion2b S34b B79k
MIT
基於OpenCLIP框架在LAION-2B英語子集上訓練的視覺-語言模型,支持零樣本圖像分類和跨模態檢索
文本生成圖像
Safetensors
C
laion
1.1M
112
Pickscore V1
PickScore v1 是一個針對文本生成圖像的評分函數,可用於預測人類偏好、評估模型性能和圖像排序等任務。
文本生成圖像
Transformers

P
yuvalkirstain
1.1M
44
Owlv2 Base Patch16 Ensemble
Apache-2.0
OWLv2是一種零樣本文本條件目標檢測模型,可通過文本查詢在圖像中定位對象。
文本生成圖像
Transformers

O
google
932.80k
99
Llama 3.2 11B Vision Instruct
Llama 3.2 是 Meta 發佈的多語言多模態大型語言模型,支持圖像文本到文本的轉換任務,具備強大的跨模態理解能力。
文本生成圖像
Transformers Supports Multiple Languages

L
meta-llama
784.19k
1,424
Owlvit Base Patch32
Apache-2.0
OWL-ViT是一個零樣本文本條件目標檢測模型,可以通過文本查詢搜索圖像中的對象,無需特定類別的訓練數據。
文本生成圖像
Transformers

O
google
764.95k
129
Featured Recommended AI Models
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers Supports Multiple Languages

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers English

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 Chinese
R
uer
2,694
98