Instructions to use immanuelpeter/MiniMax-M3.1-Flash-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use immanuelpeter/MiniMax-M3.1-Flash-Vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="immanuelpeter/MiniMax-M3.1-Flash-Vision")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("immanuelpeter/MiniMax-M3.1-Flash-Vision") model = AutoModel.from_pretrained("immanuelpeter/MiniMax-M3.1-Flash-Vision", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,587 Bytes
75a5fc5 b161cf1 75a5fc5 17a9a75 b161cf1 8a97b39 dbf507f 8a97b39 b161cf1 7371313 b161cf1 7371313 75a5fc5 17a9a75 7371313 75a5fc5 b161cf1 75a5fc5 17a9a75 7371313 75a5fc5 36d18d1 7371313 b161cf1 36d18d1 7371313 b161cf1 7371313 b161cf1 17a9a75 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ---
license: other
license_name: minimax-community
license_link: LICENSE
pipeline_tag: image-feature-extraction
library_name: transformers
tags:
- vision
base_model:
- MiniMaxAI/MiniMax-M3.1-Flash
---
# MiniMax-M3.1-Flash Vision
This repository packages the Tower and Projector from
[MiniMax M3.1 Flash](https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash).
## Contents
| File | Tensors | What it holds |
|---|---|---|
| `model.safetensors` | 515 | MiniMax-M3.1-Flash vision Tower |
| `projector.safetensors` | 8 | `multi_modal_projector` and remapped `patch_merge_mlp` |
| `projector_config.json`, `projector.py` | | Projector shapes and loader |
| `config.json`, `preprocessor_config.json` | | Vision-only model and image-processing configuration |
| `export_manifest.json` | | Source pin and tensor counts |
| `LICENSE`, `LICENSE-CODE`, `NOTICE` | | Weight license, code license and attribution |
## Architecture
| Component | Details |
|---|---|
| Tower | 32 layers, 1280 hidden, 16 heads, 5120 intermediate, patch size 14, 3D RoPE, image size 672 |
| Token compression | 2x2 spatial merge, temporal patch size 2 |
| Projector | `Linear(1280, 6144)`, GELU, `Linear(6144, 6144)`, flatten four 6144-wide patches, `Linear(24576, 6144)`, GELU, `Linear(6144, 6144)` |
The class is `MiniMaxM3VLVisionModel`. Still images are repeated as two frames for the
temporal patch embedding. At 448 pixels the example reports Tower `(1, 1024, 1280)`,
merged `(1, 256, 5120)` and projected `(1, 256, 6144)`.
## Usage
See [`examples/inference.py`](examples/inference.py) for image feature extraction.
Forward one image per call: the native HF attention couples images in a single call.
## Validation
The [parity check](https://github.com/immanuel-peter/vision-tower-bench/blob/main/vtb/parity/minimax_m3.py) compares all 515 Tower tensors and eight Projector tensors with the
pinned parent checkpoint using `torch.equal`. Fixed-image Tower, merged and projected
outputs also match the native parent implementation at 56 and 448 pixels.
## Reproduction
The [export script](https://github.com/immanuel-peter/vision-tower-bench/blob/main/vtb/adapters/minimax_m3.py)
reads the Tower and Projector tensors from the pinned parent and writes the original
tensors, preserving their dtypes. The script pins the parent revision.
## Credits
MiniMax released the MiniMax-M3.1-Flash weights and the native Transformers implementation.
## License
[MiniMax Community License](LICENSE), the same license as the source model. Helper code
is MIT; see [LICENSE-CODE](LICENSE-CODE) and [NOTICE](NOTICE).
|