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
Keep the house card complete and runnable
Browse files- README.md +9 -7
- export_manifest.json +1 -1
README.md
CHANGED
|
@@ -12,8 +12,7 @@ base_model:
|
|
| 12 |
|
| 13 |
# MiniMax-M3.1-Flash Vision
|
| 14 |
|
| 15 |
-
This repository packages the Tower and Projector from
|
| 16 |
-
[MiniMax M3.1 Flash](https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash).
|
| 17 |
|
| 18 |
## Contents
|
| 19 |
|
|
@@ -25,6 +24,8 @@ This repository packages the Tower and Projector from
|
|
| 25 |
| `config.json`, `preprocessor_config.json` | | Vision-only model and image-processing configuration |
|
| 26 |
| `export_manifest.json` | | Source pin, tensor counts and file hashes |
|
| 27 |
| `LICENSE`, `LICENSE-CODE`, `NOTICE` | | Weight license, code license and attribution |
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## Architecture
|
| 30 |
|
|
@@ -34,13 +35,13 @@ This repository packages the Tower and Projector from
|
|
| 34 |
| Token compression | 2x2 spatial merge, temporal patch size 2 |
|
| 35 |
| Projector | `Linear(1280, 6144)`, GELU, `Linear(6144, 6144)`, flatten four 6144-wide patches, `Linear(24576, 6144)`, GELU, `Linear(6144, 6144)` |
|
| 36 |
|
| 37 |
-
The class is `MiniMaxM3VLVisionModel`. Still images are repeated as two frames for the
|
| 38 |
-
temporal patch embedding. At 448 pixels the example reports Tower `(1, 1024, 1280)`,
|
| 39 |
merged `(1, 256, 5120)` and projected `(1, 256, 6144)`.
|
| 40 |
|
| 41 |
## Usage
|
| 42 |
|
| 43 |
-
|
|
|
|
| 44 |
Forward one image per call: the native HF attention couples images in a single call.
|
| 45 |
|
| 46 |
## Validation
|
|
@@ -49,6 +50,8 @@ The release tests compare all 515 Tower tensors and eight Projector tensors with
|
|
| 49 |
pinned parent checkpoint using `torch.equal`. Fixed-image Tower, merged and projected
|
| 50 |
outputs also match the native parent implementation at 56 and 448 pixels.
|
| 51 |
|
|
|
|
|
|
|
| 52 |
## Reproduction
|
| 53 |
|
| 54 |
The [export script](https://github.com/immanuel-peter/vision-tower-bench/blob/main/scripts/export_minimax_m3_vision.py)
|
|
@@ -61,5 +64,4 @@ MiniMax released the MiniMax-M3.1-Flash weights and the native Transformers impl
|
|
| 61 |
|
| 62 |
## License
|
| 63 |
|
| 64 |
-
[MiniMax Community License](LICENSE), the same license as the source model. Helper code
|
| 65 |
-
is MIT; see [LICENSE-CODE](LICENSE-CODE) and [NOTICE](NOTICE).
|
|
|
|
| 12 |
|
| 13 |
# MiniMax-M3.1-Flash Vision
|
| 14 |
|
| 15 |
+
This repository packages the Tower and Projector from [MiniMax M3.1 Flash](https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash).
|
|
|
|
| 16 |
|
| 17 |
## Contents
|
| 18 |
|
|
|
|
| 24 |
| `config.json`, `preprocessor_config.json` | | Vision-only model and image-processing configuration |
|
| 25 |
| `export_manifest.json` | | Source pin, tensor counts and file hashes |
|
| 26 |
| `LICENSE`, `LICENSE-CODE`, `NOTICE` | | Weight license, code license and attribution |
|
| 27 |
+
| `examples/inference.py` | | Single-image extraction example |
|
| 28 |
+
| `README.md`, `.gitattributes` | | Model card and Hub storage metadata |
|
| 29 |
|
| 30 |
## Architecture
|
| 31 |
|
|
|
|
| 35 |
| Token compression | 2x2 spatial merge, temporal patch size 2 |
|
| 36 |
| Projector | `Linear(1280, 6144)`, GELU, `Linear(6144, 6144)`, flatten four 6144-wide patches, `Linear(24576, 6144)`, GELU, `Linear(6144, 6144)` |
|
| 37 |
|
| 38 |
+
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)`,
|
|
|
|
| 39 |
merged `(1, 256, 5120)` and projected `(1, 256, 6144)`.
|
| 40 |
|
| 41 |
## Usage
|
| 42 |
|
| 43 |
+
With PyTorch, Pillow, torchvision and Transformers 5.17+, run `python examples/inference.py test-image.jpg`
|
| 44 |
+
from the downloaded snapshot; see [the example](examples/inference.py). It uses CUDA BF16 when available.
|
| 45 |
Forward one image per call: the native HF attention couples images in a single call.
|
| 46 |
|
| 47 |
## Validation
|
|
|
|
| 50 |
pinned parent checkpoint using `torch.equal`. Fixed-image Tower, merged and projected
|
| 51 |
outputs also match the native parent implementation at 56 and 448 pixels.
|
| 52 |
|
| 53 |
+
[Validation evidence](https://github.com/immanuel-peter/vision-tower-bench/tree/t3/complete-issue-21/results/diagnostics/minimax-m31-flash).
|
| 54 |
+
|
| 55 |
## Reproduction
|
| 56 |
|
| 57 |
The [export script](https://github.com/immanuel-peter/vision-tower-bench/blob/main/scripts/export_minimax_m3_vision.py)
|
|
|
|
| 64 |
|
| 65 |
## License
|
| 66 |
|
| 67 |
+
[MiniMax Community License](LICENSE), the same license as the source model. Helper code is MIT; see [LICENSE-CODE](LICENSE-CODE) and [NOTICE](NOTICE).
|
|
|
export_manifest.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
"LICENSE": "8c4978e3e0fe0349ff929cc8450463cba3039c4c9fc144d8bd5382ab00df247a",
|
| 18 |
"LICENSE-CODE": "149f05ce186198084c9abd6af8e76e108ba7e507446a19ee5a2ffd694f69f525",
|
| 19 |
"NOTICE": "19d19379d439b6dc2614476bb50b170fbe382a58f3a84ec67ff9bcd4e212d626",
|
| 20 |
-
"README.md": "
|
| 21 |
"config.json": "9c3a6dac0654055594fdde1f148400331f3e55cb72ffe1b7a6806db07ab93a79",
|
| 22 |
"examples/inference.py": "fcde5470ba4e9fce0730f544f4f3b7669bf4f9bdcaf556223cebc4ed67ef1c5a",
|
| 23 |
"model.safetensors": "95e3731e26887d066a0b2291a1574da40a36aba5ba43e476746b9c16a64bcf08",
|
|
|
|
| 17 |
"LICENSE": "8c4978e3e0fe0349ff929cc8450463cba3039c4c9fc144d8bd5382ab00df247a",
|
| 18 |
"LICENSE-CODE": "149f05ce186198084c9abd6af8e76e108ba7e507446a19ee5a2ffd694f69f525",
|
| 19 |
"NOTICE": "19d19379d439b6dc2614476bb50b170fbe382a58f3a84ec67ff9bcd4e212d626",
|
| 20 |
+
"README.md": "a246d9f3164c77d99137383e9812ee53dc87e321991d4182c2c37ff0a28bfdc0",
|
| 21 |
"config.json": "9c3a6dac0654055594fdde1f148400331f3e55cb72ffe1b7a6806db07ab93a79",
|
| 22 |
"examples/inference.py": "fcde5470ba4e9fce0730f544f4f3b7669bf4f9bdcaf556223cebc4ed67ef1c5a",
|
| 23 |
"model.safetensors": "95e3731e26887d066a0b2291a1574da40a36aba5ba43e476746b9c16a64bcf08",
|