Image-Text-to-Text
Transformers
Safetensors
mimo_v2
text-generation
Mixture of Experts
pruned
expert-pruning
reap
hope
mxfp4
fp8
multimodal
vision
audio
video
mtp
custom_code
conversational
8-bit precision
Instructions to use patrickbdevaney/MiMo-V2.6-Flash-REAP50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use patrickbdevaney/MiMo-V2.6-Flash-REAP50 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="patrickbdevaney/MiMo-V2.6-Flash-REAP50", trust_remote_code=True) 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("patrickbdevaney/MiMo-V2.6-Flash-REAP50", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use patrickbdevaney/MiMo-V2.6-Flash-REAP50 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "patrickbdevaney/MiMo-V2.6-Flash-REAP50" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "patrickbdevaney/MiMo-V2.6-Flash-REAP50", "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/patrickbdevaney/MiMo-V2.6-Flash-REAP50
- SGLang
How to use patrickbdevaney/MiMo-V2.6-Flash-REAP50 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 "patrickbdevaney/MiMo-V2.6-Flash-REAP50" \ --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": "patrickbdevaney/MiMo-V2.6-Flash-REAP50", "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 "patrickbdevaney/MiMo-V2.6-Flash-REAP50" \ --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": "patrickbdevaney/MiMo-V2.6-Flash-REAP50", "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 patrickbdevaney/MiMo-V2.6-Flash-REAP50 with Docker Model Runner:
docker model run hf.co/patrickbdevaney/MiMo-V2.6-Flash-REAP50
docs(card): upgrade model card with SOTA HF metadata, summary tables, and sibling links
Browse files
README.md
CHANGED
|
@@ -1,75 +1,130 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
-
base_model: XiaomiMiMo/MiMo-V2.6-Flash
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
experts per layer down to **128** β so that it fits and serves on a single
|
| 18 |
-
NVIDIA Jetson AGX Thor (117 GiB unified memory). 86.1 GiB across 65 shards.
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|---|---|
|
| 31 |
-
| objective | `hope` |
|
| 32 |
-
| saliency criterion | `reap_1_1_1` |
|
| 33 |
-
| prune ratio | 0.50, uniform across layers |
|
| 34 |
-
| per-domain protection | top 8% of every domain held out of the prune set |
|
| 35 |
-
| worst domain retained | 0.9935 (audio) |
|
| 36 |
-
| mean retained | 0.9964 |
|
| 37 |
-
| HOPE objective pα΅Fp | 0.01624 |
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|---|---|
|
| 46 |
-
| audio | 0.9935 |
|
| 47 |
-
| image | 0.9937 |
|
| 48 |
-
| video | 0.9938 |
|
| 49 |
-
| science | 0.9973 |
|
| 50 |
-
| math | 0.9974 |
|
| 51 |
-
| finance | 0.9974 |
|
| 52 |
-
| ballast | 0.9976 |
|
| 53 |
-
| code | 0.9983 |
|
| 54 |
-
| agentic | 0.9983 |
|
| 55 |
|
| 56 |
-
##
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
##
|
| 65 |
|
| 66 |
-
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: XiaomiMiMo/MiMo-V2.6-Flash
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
library_name: safetensors
|
| 6 |
+
pipeline_tag: image-text-to-text
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
- zh
|
| 10 |
tags:
|
| 11 |
+
- mimo
|
| 12 |
+
- mimo-v2.6-flash
|
| 13 |
+
- xiaomi
|
| 14 |
+
- moe
|
| 15 |
+
- reap
|
| 16 |
+
- expert-pruning
|
| 17 |
+
- mxfp4
|
| 18 |
+
- fp8
|
| 19 |
+
- multimodal
|
| 20 |
+
- omni
|
| 21 |
+
- mtp
|
| 22 |
---
|
| 23 |
|
| 24 |
+
<div align="center">
|
| 25 |
|
| 26 |
+
# MiMo-V2.6-Flash β REAP-50 (MXFP4 + FP8 Master Checkpoint)
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
[](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Flash)
|
| 29 |
+
[-orange)](#pruning-method)
|
| 30 |
+
[-green)](#what-changed-vs-the-base-model)
|
| 31 |
+
[](#model-summary)
|
| 32 |
+
[](https://opensource.org/licenses/Apache-2.0)
|
| 33 |
|
| 34 |
+
**85.8 GiB bit-exact 50% REAP expert-pruned master checkpoint of `XiaomiMiMo/MiMo-V2.6-Flash` (315B β 164B total, 11B active) in native OCP MXFP4 + FP8 + BF16.**
|
| 35 |
|
| 36 |
+
| Sibling Artifact | Format | Size | Description |
|
| 37 |
+
|---|---|---|---|
|
| 38 |
+
| **[`MiMo-V2.6-Flash-REAP50`](https://huggingface.co/patrickbdevaney/MiMo-V2.6-Flash-REAP50)** *(this repo)* | Native MXFP4 + FP8 + BF16 (`safetensors`) | **85.8 GiB** | Bit-exact 128-expert master checkpoint (with vision/video/audio encoders + 3 MTP layers) |
|
| 39 |
+
| **[`MiMo-V2.6-Flash-REAP50-GGUF`](https://huggingface.co/patrickbdevaney/MiMo-V2.6-Flash-REAP50-GGUF)** | GGUF (`MXFP4_MOE`, `Q3_K_S`, `Q2_K`, `mmproj`, `mtp`) | **64.8β86.7 GiB** | Single-file GGUFs + multimodal projector + 3-layer MTP draft head |
|
| 40 |
|
| 41 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
**MiMo-V2.6-Flash-REAP50** is a **50% expert-pruned** version of [`XiaomiMiMo/MiMo-V2.6-Flash`](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Flash) (315B total / 11B active omni-modal MoE) produced using **REAP** (*Router-weighted Expert Activation Pruning*, [arXiv:2510.13999](https://arxiv.org/abs/2510.13999)), reducing each of the 59 MoE layers from **256 routed experts to 128 routed experts** while keeping **top-8 active routing unchanged**.
|
| 46 |
|
| 47 |
+
Total checkpoint size drops from **157 GiB β 85.8 GiB** (164B total parameters, **11B active parameters**), allowing the full model (including its vision/video/audio encoders and 3-layer MTP speculative decoding head) to fit comfortably in a **single 128 GB unified-memory system** (NVIDIA Jetson AGX Thor, DGX Spark, Mac Studio, or AMD Strix Halo).
|
| 48 |
|
| 49 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
## β¨ Highlights
|
| 52 |
|
| 53 |
+
- **Bit-Exact Native OCP MXFP4 Survivor Weights (`85.8 GiB`, Down from `157 GiB`):** All 128 surviving routed experts per MoE layer retain their exact upstream packed OCP MXFP4 (`weight_packed` `U8` + `weight_scale` `F8_E8M0`) bytes without re-quantization.
|
| 54 |
+
- **Unmodified Multimodal Encoders, Attention & 3-Layer MTP Head:** Keeps Layer 0 (dense MLP), all 60 hybrid MLA attention layers (full + sliding-window SWA in FP8 `E4M3` + `F32` block scales), the vision (`vision_tower`), video (`video_tower`), and audio (`audio_tower`) encoders + multi-modal aligners (BF16), and the 3-layer Multi-Token Prediction (`mtp`) head **100% bit-identical to the base checkpoint**.
|
| 55 |
+
- **6-Bucket Domain-Balanced REAP-50 Pruning:** Calibrated across 298 sequences (`610,304` tokens) spanning English general/encyclopedic, software engineering & code, competition mathematics, Chinese (`zh`), agentic tool-use, and synthetic omni-modal embeddings, with union top-16 specialist protection per domain (`35β75` specialists locked per layer).
|
| 56 |
+
- **Single-Box 128 GB Fit:** Leaves **~42 GiB of unified-memory headroom** on a 128 GB Jetson AGX Thor or DGX Spark for KV cache and multimodal activations.
|
| 57 |
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## π Model Summary
|
| 61 |
+
|
| 62 |
+
| Property | Base (`XiaomiMiMo/MiMo-V2.6-Flash`) | **This Model (`MiMo-V2.6-Flash-REAP50`)** |
|
| 63 |
+
|---|---|---|
|
| 64 |
+
| **Total Parameters** | ~315B | **~164B** |
|
| 65 |
+
| **Active Parameters / Token** | ~11B | **~11B (unchanged)** |
|
| 66 |
+
| **Decoder Layers** | 60 (Layer 0 dense + Layers 1β59 MoE) | **60 (Layer 0 dense + Layers 1β59 MoE)** |
|
| 67 |
+
| **Routed Experts per MoE Layer** | 256 (`n_group=8`, `topk_group=4`) | **128 (`n_group=8`, `topk_group=4`, 16 experts/group)** |
|
| 68 |
+
| **Active Experts per Token (`num_experts_per_tok`)** | 8 (`routed_scaling_factor=2.827`) | **8 (`routed_scaling_factor=2.827`)** |
|
| 69 |
+
| **Expert Precision** | Native MXFP4 (`E2M1` + `E8M0` scale, block=32) | **Native MXFP4 (bit-exact slice, zero re-quantization)** |
|
| 70 |
+
| **Attention Precision** | Native FP8 (`E4M3` + `F32` block scale 128Γ128) | **Native FP8 (bit-exact copy)** |
|
| 71 |
+
| **Vision / Video / Audio Encoders** | BF16 (`vision_tower`, `video_tower`, `audio_tower`) | **BF16 (bit-exact copy, unpruned)** |
|
| 72 |
+
| **MTP Draft Head (`mtp.layers.0..2`)** | 3 dense+attention layers (FP8/BF16) | **Preserved bit-exact** |
|
| 73 |
+
| **Total Checkpoint Size** | 157 GiB (73 shards) | **85.8 GiB (36 shards)** |
|
| 74 |
+
| **License** | Apache-2.0 | **Apache-2.0** |
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
|
| 78 |
+
## Evaluation Status Note (2026-10-24)
|
| 79 |
|
| 80 |
+
- **Surviving weights are 100% bit-exact slices of `XiaomiMiMo/MiMo-V2.6-Flash`.** No post-pruning router ridge-regression or weight modification was applied (`e_score_correction_bias` and `gate.weight` for the 128 kept experts are copied verbatim from the base checkpoint).
|
| 81 |
+
- **Teacher-vs-student KL / NLL benchmark status:** A paired held-out teacher-vs-student KL/NLL table (of the kind published on [`GLM-5.3-Flash-REAP50-FP8-v2`](https://huggingface.co/patrickbdevaney/GLM-5.3-Flash-REAP50-FP8-v2) and [`DeepSeek-V4.1-Flash-1017-REAP192-MXFP4`](https://huggingface.co/patrickbdevaney/DeepSeek-V4.1-Flash-1017-REAP192-MXFP4)) has **not yet been run** for `MiMo-V2.6-Flash-REAP50` because `MiMo-V2.6-Flash`'s custom `mimo_v2_flash` architecture is not yet wired into our standalone teacher-logit evaluation harness. See the companion [`MiMo-V2.6-Flash-REAP50-GGUF`](https://huggingface.co/patrickbdevaney/MiMo-V2.6-Flash-REAP50-GGUF) card for additional details on GGUF conversion and runtime support.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## What Changed vs. the Base Model
|
| 86 |
+
|
| 87 |
+
### Preserved Bit-for-Bit (Zero Re-quantization)
|
| 88 |
+
- **Layer 0 (Dense MLP + Full MLA Attention):** 100% untouched.
|
| 89 |
+
- **All 60 Attention Layers (`self_attn` + `layer_scale`):** Full MLA layers (`0, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59`) and Sliding-Window MLA layers (all others, `sliding_window_size=512`) are copied byte-for-byte in native FP8 (`F8_E4M3` + `F32` `weight_scale_inv`).
|
| 90 |
+
- **Multimodal Towers (`vision_tower`, `video_tower`, `audio_tower`, `multi_modal_projector`):** 100% untouched in `BF16`.
|
| 91 |
+
- **MTP Speculative Decoding Head (`mtp.layers.0..2`):** 100% untouched.
|
| 92 |
+
- **Surviving 128 Routed Experts per Layer:** Their MXFP4 `weight_packed` (`U8`) and `weight_scale` (`F8_E8M0`) bytes are sliced directly from the base tensors without dequantizing or re-quantizing.
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## Pruning Method
|
| 97 |
+
|
| 98 |
+
### 1. Group-Balanced REAP Saliency (`n_group = 8`, `16` experts kept per group)
|
| 99 |
+
`MiMo-V2.6-Flash` uses **grouped sigmoid top-k routing** (`n_routed_experts = 256`, `n_group = 8` groups of 32 experts, `topk_group = 4`, `num_experts_per_tok = 8`, `routed_scaling_factor = 2.827`). Because the router reshapes experts into `[n_group, n_routed_experts // n_group]`, pruning **exactly 16 of 32 experts within each of the 8 routing groups** preserves the exact group topology (`n_group = 8`, 16 experts per group) so existing inference kernels (`vLLM`, `SGLang`, `Transformers`, `llama.cpp`) work out-of-the-box with only `n_routed_experts: 128` updated in `config.json`.
|
| 100 |
+
|
| 101 |
+
For every MoE layer $l \in \{1, \dots, 59\}$ and expert $j \in \{0, \dots, 255\}$, we streamed 610,304 calibration tokens layer-by-layer on an NVIDIA Jetson AGX Thor (128 GB unified memory), executing the exact `MiMoV2FlashMoE` group-topk routing and dequantizing the selected MXFP4 experts on the fly to compute the **REAP saliency score** ([arXiv:2510.13999](https://arxiv.org/abs/2510.13999)):
|
| 102 |
+
|
| 103 |
+
$$S_j = \frac{1}{|T_j|} \sum_{t \in T_j} g_{t,j} \cdot \left\| W_{\text{down},j}\!\left(\text{SiLU}(W_{\text{gate},j} h_t) \odot (W_{\text{up},j} h_t)\right) \right\|_2$$
|
| 104 |
+
|
| 105 |
+
### 2. Six-Domain Calibration & Specialist Protection
|
| 106 |
+
Calibration data (`298 sequences Γ 2048 tokens = 610,304 tokens`) was balanced across 6 buckets:
|
| 107 |
+
1. **`general`** β English encyclopedic & long-form analytical text
|
| 108 |
+
2. **`code`** β Multi-language software engineering, algorithms, systems code
|
| 109 |
+
3. **`math`** β Olympiad & undergraduate mathematical proofs and derivations
|
| 110 |
+
4. **`zh`** β Simplified & Traditional Chinese technical and literary text
|
| 111 |
+
5. **`tool`** β Multi-turn agentic tool-calling, JSON schemas, and reasoning traces
|
| 112 |
+
6. **`multimodal`** β Text sequences interleaved with synthetic vision/audio projector embeddings matching the empirical norm/distribution of `multi_modal_projector` outputs
|
| 113 |
+
|
| 114 |
+
Within each layer:
|
| 115 |
+
- The **top-16 experts per domain** (by per-domain REAP score $S_j^{(d)}$ with $f_j^{(d)} \ge 16$) are locked as protected domain specialists (35 to 75 specialists locked per layer).
|
| 116 |
+
- Remaining slots in each of the 8 routing groups (`32 β 16` experts per group) are filled by cross-domain normalized REAP score (with a frequency floor $f_j \ge 40$).
|
| 117 |
+
- Full per-layer keep indices, pruned indices, frequencies, and REAP scores are saved in [`reap_plan.json`](reap_plan.json).
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
## Companion GGUF Repository
|
| 122 |
+
|
| 123 |
+
For `llama.cpp` inference (`MXFP4_MOE`, `Q3_K_S`, `Q2_K`, plus multimodal `mmproj-BF16.gguf` and `mtp-Q8_0.gguf`), see **[`patrickbdevaney/MiMo-V2.6-Flash-REAP50-GGUF`](https://huggingface.co/patrickbdevaney/MiMo-V2.6-Flash-REAP50-GGUF)**.
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
|
| 127 |
+
## Citation & Acknowledgments
|
| 128 |
|
| 129 |
+
- **Base Model:** [Xiaomi MiMo Team β `XiaomiMiMo/MiMo-V2.6-Flash`](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Flash) (Apache-2.0 License)
|
| 130 |
+
- **Pruning Algorithm:** [REAP: Router-weighted Expert Activation Pruning (arXiv:2510.13999)](https://arxiv.org/abs/2510.13999)
|