Instructions to use XiaomiMiMo/MiMo-VL-7B-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaomiMiMo/MiMo-VL-7B-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="XiaomiMiMo/MiMo-VL-7B-RL") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("XiaomiMiMo/MiMo-VL-7B-RL") model = AutoModelForMultimodalLM.from_pretrained("XiaomiMiMo/MiMo-VL-7B-RL") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaomiMiMo/MiMo-VL-7B-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XiaomiMiMo/MiMo-VL-7B-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaomiMiMo/MiMo-VL-7B-RL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/XiaomiMiMo/MiMo-VL-7B-RL
- SGLang
How to use XiaomiMiMo/MiMo-VL-7B-RL with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "XiaomiMiMo/MiMo-VL-7B-RL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaomiMiMo/MiMo-VL-7B-RL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "XiaomiMiMo/MiMo-VL-7B-RL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaomiMiMo/MiMo-VL-7B-RL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use XiaomiMiMo/MiMo-VL-7B-RL with Docker Model Runner:
docker model run hf.co/XiaomiMiMo/MiMo-VL-7B-RL
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,6 +22,8 @@ base_model:
|
|
| 22 |
</b>
|
| 23 |
</h3>
|
| 24 |
|
|
|
|
|
|
|
| 25 |
<div align="center" style="line-height: 1;">
|
| 26 |
|
|
| 27 |
<a href="https://huggingface.co/collections/XiaomiMiMo/mimo-vl-68382ccacc7c2875500cd212" target="_blank">🤗 HuggingFace</a>
|
|
@@ -37,7 +39,7 @@ base_model:
|
|
| 37 |
|
| 38 |
## I. Introduction
|
| 39 |
|
| 40 |
-
In this report, we share our efforts to build a compact yet powerful VLM, MiMo-VL-7B. MiMo-VL-7B comprises (1) a native resolution ViT encoder that preserves fine-grained visual details, (2) an MLP projector for efficient cross-modal alignment, and (3) our MiMo-7B language model, specifically optimized for complex reasoning tasks.
|
| 41 |
|
| 42 |
The development of MiMo-VL-7B involves two sequential training processes: (1) A four-stage pre-training phase, which includes projector warmup, vision-language alignment, general multi-modal pre-training, and long-context Supervised Fine-Tuning (SFT). This phase yields the MiMo-VL-7B-SFT model. (2) A subsequent post-training phase, where we introduce Mixed On-policy Reinforcement Learning (MORL), a novel framework that seamlessly integrates diverse reward signals spanning perception accuracy, visual grounding precision, logical reasoning capabilities, and human/AI preferences. This phase yields the MiMo-VL-7B-RL model.
|
| 43 |
|
|
@@ -50,10 +52,10 @@ We believe this report along with the models will provide valuable insights to d
|
|
| 50 |
|
| 51 |
### 🛤️ During this journey, we find
|
| 52 |
|
| 53 |
-
- **Incorporating high-quality, broad-coverage reasoning data from the pre-training stage is crucial for enhancing model performance
|
| 54 |
-
- We
|
| 55 |
-
-
|
| 56 |
-
- **Mixed On-policy Reinforcement Learning further enhances model performance, while achieving stable simultaneous improvements
|
| 57 |
- We apply RL across diverse capabilities, including reasoning, perception, grounding, and human preference alignment, spanning modalities including text, images, and videos. While this hybrid training approach further unlock model’s potential, interference across data domains remains a challenge.
|
| 58 |
|
| 59 |
## II. Model Details
|
|
@@ -91,9 +93,9 @@ In multi-modal reasoning, both the SFT and RL models significantly outperform al
|
|
| 91 |
> Results marked with \* are obtained using our evaluation framework.
|
| 92 |
> Tasks with ${\dagger}$ are evaluated by GPT-4o.
|
| 93 |
|
| 94 |
-
### GUI
|
| 95 |
|
| 96 |
-
MiMo-VL-7B-RL possess exceptional GUI
|
| 97 |
|
| 98 |
<p align="center">
|
| 99 |
<img width="95%" src="https://github.com/XiaomiMiMo/MiMo-VL/raw/main/figures/benchmarks_gui.png?raw=true">
|
|
@@ -125,4 +127,4 @@ The MiMo-VL-7B series maintain full compatibility with the `Qwen2_5_VLForConditi
|
|
| 125 |
|
| 126 |
## VI. Contact
|
| 127 |
|
| 128 |
-
Please contact us at [mimo@xiaomi.com](mailto:mimo@xiaomi.com) or open an issue if you have any questions.
|
|
|
|
| 22 |
</b>
|
| 23 |
</h3>
|
| 24 |
|
| 25 |
+
<br/>
|
| 26 |
+
|
| 27 |
<div align="center" style="line-height: 1;">
|
| 28 |
|
|
| 29 |
<a href="https://huggingface.co/collections/XiaomiMiMo/mimo-vl-68382ccacc7c2875500cd212" target="_blank">🤗 HuggingFace</a>
|
|
|
|
| 39 |
|
| 40 |
## I. Introduction
|
| 41 |
|
| 42 |
+
In this report, we share our efforts to build a compact yet powerful VLM, MiMo-VL-7B. MiMo-VL-7B comprises (1) a native resolution ViT encoder that preserves fine-grained visual details, (2) an MLP projector for efficient cross-modal alignment, and (3) our [MiMo-7B language model](https://github.com/XiaomiMiMo/MiMo), specifically optimized for complex reasoning tasks.
|
| 43 |
|
| 44 |
The development of MiMo-VL-7B involves two sequential training processes: (1) A four-stage pre-training phase, which includes projector warmup, vision-language alignment, general multi-modal pre-training, and long-context Supervised Fine-Tuning (SFT). This phase yields the MiMo-VL-7B-SFT model. (2) A subsequent post-training phase, where we introduce Mixed On-policy Reinforcement Learning (MORL), a novel framework that seamlessly integrates diverse reward signals spanning perception accuracy, visual grounding precision, logical reasoning capabilities, and human/AI preferences. This phase yields the MiMo-VL-7B-RL model.
|
| 45 |
|
|
|
|
| 52 |
|
| 53 |
### 🛤️ During this journey, we find
|
| 54 |
|
| 55 |
+
- **Incorporating high-quality, broad-coverage reasoning data from the pre-training stage is crucial for enhancing model performance**
|
| 56 |
+
- We curate high-quality reasoning data by identifying diverse queries, employing large reasoning models to regenerate responses with long CoT, and applying rejection sampling to ensure quality.
|
| 57 |
+
- Rather than treating this as supplementary fine-tuning data, we incorporate substantial volumes of this synthetic reasoning data directly into the later pre-training stages, where extended training yields continued performance improvements without saturation.
|
| 58 |
+
- **Mixed On-policy Reinforcement Learning further enhances model performance, while achieving stable simultaneous improvements remains challenging**
|
| 59 |
- We apply RL across diverse capabilities, including reasoning, perception, grounding, and human preference alignment, spanning modalities including text, images, and videos. While this hybrid training approach further unlock model’s potential, interference across data domains remains a challenge.
|
| 60 |
|
| 61 |
## II. Model Details
|
|
|
|
| 93 |
> Results marked with \* are obtained using our evaluation framework.
|
| 94 |
> Tasks with ${\dagger}$ are evaluated by GPT-4o.
|
| 95 |
|
| 96 |
+
### GUI Tasks
|
| 97 |
|
| 98 |
+
MiMo-VL-7B-RL possess exceptional GUI understanding and grounding capabilities. As a general-purpose VL model, MiMo-VL achieves comparable or even superior performance to GUI-specialized models.
|
| 99 |
|
| 100 |
<p align="center">
|
| 101 |
<img width="95%" src="https://github.com/XiaomiMiMo/MiMo-VL/raw/main/figures/benchmarks_gui.png?raw=true">
|
|
|
|
| 127 |
|
| 128 |
## VI. Contact
|
| 129 |
|
| 130 |
+
Please contact us at [mimo@xiaomi.com](mailto:mimo@xiaomi.com) or open an issue if you have any questions.
|