# xiaomimimo/mimo-v2-flash architecture

> Architecture diagram of the GitHub repository xiaomimimo/mimo-v2-flash, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xiaomimimo/mimo-v2-flash
- Repository: https://github.com/xiaomimimo/mimo-v2-flash

## Overview

1. **Repository role**
   This repo is not a full implementation codebase; it is a **model release and technical-report hub** for MiMo-V2-Flash. The main artifacts are the README, the PDF report, and figures that document architecture, benchmarks, and deployment guidance.

2. **Primary product**
   The released model family is **MiMo-V2-Flash** and **MiMo-V2-Flash-Base**. Both are **309B-parameter MoE language models** with **15B active parameters** and a **256k context window**. The README positions them as high-speed reasoning/agentic models rather than general-purpose application code.

3. **Model architecture boundary**
   The model itself is described as having two major internal subsystems:
   - **Hybrid attention**: interleaved sliding-window attention and global attention for long-context efficiency.
   - **Multi-Token Prediction (MTP)**: a lightweight prediction head used to accelerate generation.
   These are model-level components, not separate services in this repo, but they define the core inference behavior.

4. **Long-context design**
   The architecture emphasizes long-context throughput by reducing KV-cache pressure through aggressive sliding-window attention, with periodic global attention to preserve quality. The diagram in the README should reflect this as an internal model boundary that trades memory for context scale.

5. **Post-training pipeline**
   The report describes a post-training stack centered on:
   - **MOPD (Multi-Teacher On-Policy Distillation)**
   - **agentic RL**
   These are training-time subsystems that likely sit upstream of the released checkpoints. They explain how the base model becomes the instruction-tuned/agentic model.

6. **Training and RL infrastructure**
   The technical report references a sizable reinforcement-learning infrastructure built on **SGLang**, **Megatron-LM**, **Kubernetes**, and **Ray**. Important architectural pieces include rollout routing replay, request-level prefix caching, fine-grained scheduling, and tool management. In an architecture diagram, these belong to an offline training/rollout plane, separate from end-user inference.

7. **Agent/tool execution loop**
   The README highlights multi-turn tool use, tool-call parsing, and the need to persist `reasoning_content` across turns. This indicates a conversational loop where the model may emit both natural language and structured tool calls, then continue with tool results as additional context.

8. **Inference and serving path**
   The published serving stack is **SGLang**. The example launch config shows an inference server with:
   - tensor/pipeline/data parallelism
   - FP8 mixed precision
   - speculative decoding
   - MTP enabled
   - tool-call and reasoning parsers
   The external interface is an OpenAI-style `/v1/chat/completions` endpoint.

9. **Public access and distribution**
   The repo links to **Hugging Face** model downloads, a **MiMo Studio** interactive playground, and a **MiMo API Platform**. These are the main outward-facing distribution and demo surfaces; the repo itself is the documentation source of truth.

10. **Artifacts in this repository**
   The non-text assets are only supporting visuals:
   - architecture/performance figures under `figures/`
   - WeChat contact images under `figures/wechat_group/`
   - the technical report in `paper.pdf`
   There is no source tree for training, serving, or evaluation code here.

11. **Evaluation/reporting layer**
   The README contains extensive benchmark tables for base and post-trained models across reasoning, math, code, Chinese, multilingual, and long-context tasks. This is documentation-only evaluation output, not a runnable benchmarking subsystem inside the repo.

12. **Diagramming takeaway**
   For an architecture diagram, treat this repo as a **model release package** with three main planes:
   - **training/post-training pipeline** upstream,
   - **model inference/serving stack** in the middle,
   - **external clients/platforms** downstream.
   The repository itself anchors the public documentation, model weights distribution links, and deployment contract.

Main entry points: [`README.md`](https://github.com/xiaomimimo/mimo-v2-flash/blob/main/README.md) (README), [`paper.pdf`](https://github.com/xiaomimimo/mimo-v2-flash/blob/main/paper.pdf) (Report), [`figures`](https://github.com/xiaomimimo/mimo-v2-flash/tree/main/figures) (Figures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs["Repo docs"]
  node_readme["README<br/>docs<br/>[README.md]"]
  node_paper["Report<br/>paper<br/>[paper.pdf]"]
  node_figures["Figures<br/>assets"]
  node_wechat["WeChat images<br/>assets"]
end

subgraph group_model["Model core"]
  node_mimo_flash{{"MiMo-V2-Flash<br/>moe lm"}}
  node_mimo_base{{"Flash-Base<br/>moe lm"}}
  node_hybrid_attn["Hybrid attn<br/>long-context"]
  node_mtp_head["MTP head<br/>generation"]
end

subgraph group_training["Training stack"]
  node_mopd["MOPD<br/>post-training"]
  node_agentic_rl["Agentic RL"]
  node_rollout_plane["Rollout plane<br/>rl infra"]
  node_infra_stack["Infra stack<br/>runtime"]
end

subgraph group_serving["Serving and access"]
  node_reasoning_loop(("Tool loop<br/>agentic loop"))
  node_sglang_server["SGLang server<br/>serving"]
  node_openai_api["Chat API<br/>endpoint"]
  node_studio["MiMo Studio<br/>playground"]
  node_api_platform["MiMo API<br/>platform"]
  node_hf["Hugging Face<br/>distribution"]
end

node_readme -->|"describes"| node_mimo_flash
node_readme -->|"describes"| node_mimo_base
node_readme -->|"documents"| node_hybrid_attn
node_readme -->|"documents"| node_mtp_head
node_readme -->|"deployment"| node_sglang_server
node_readme -->|"links"| node_hf
node_readme -->|"links"| node_studio
node_readme -->|"links"| node_api_platform
node_paper -->|"details"| node_mopd
node_paper -->|"details"| node_agentic_rl
node_paper -->|"details"| node_rollout_plane
node_paper -->|"details"| node_infra_stack
node_mimo_flash -->|"uses"| node_hybrid_attn
node_mimo_flash -->|"uses"| node_mtp_head
node_mimo_base -->|"uses"| node_hybrid_attn
node_mimo_base -->|"uses"| node_mtp_head
node_mopd -->|"feeds"| node_agentic_rl
node_agentic_rl -->|"runs on"| node_rollout_plane
node_rollout_plane -->|"built on"| node_infra_stack
node_infra_stack -.->|"shares runtime"| node_sglang_server
node_sglang_server -->|"exposes"| node_openai_api
node_sglang_server -->|"supports"| node_reasoning_loop
node_reasoning_loop -->|"interacts through"| node_openai_api
node_openai_api -.->|"powers"| node_studio
node_openai_api -.->|"powers"| node_api_platform
node_hf -->|"distributes"| node_mimo_flash
node_figures -.->|"supports"| node_paper

click node_readme "https://github.com/xiaomimimo/mimo-v2-flash/blob/main/README.md"
click node_paper "https://github.com/xiaomimimo/mimo-v2-flash/blob/main/paper.pdf"
click node_figures "https://github.com/xiaomimimo/mimo-v2-flash/tree/main/figures"
click node_wechat "https://github.com/xiaomimimo/mimo-v2-flash/tree/main/figures/wechat_group"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme,node_paper,node_figures,node_wechat toneBlue
class node_mimo_flash,node_mimo_base,node_hybrid_attn,node_mtp_head toneAmber
class node_mopd,node_agentic_rl,node_rollout_plane,node_infra_stack toneMint
class node_reasoning_loop,node_sglang_server,node_openai_api,node_studio,node_api_platform,node_hf toneRose
```

## Components

### Repo docs

Public documentation, report, and figures that describe the release.

- [README](https://github.com/xiaomimimo/mimo-v2-flash/blob/main/README.md): docs · Primary release summary, architecture overview, benchmarks, and deployment notes. · `README.md`
- [Report](https://github.com/xiaomimimo/mimo-v2-flash/blob/main/paper.pdf): paper · Technical report with model design, training, and evaluation details. · `paper.pdf`
- [Figures](https://github.com/xiaomimimo/mimo-v2-flash/tree/main/figures): assets · Supporting architecture and performance visuals. · `figures`
- [WeChat images](https://github.com/xiaomimimo/mimo-v2-flash/tree/main/figures/wechat_group): assets · Contact and group images bundled under figures/wechat_group. · `figures/wechat_group`

### Model core

Released checkpoint family and its internal inference behaviors.

- **MiMo-V2-Flash**: moe lm · Released 309B MoE model with 15B active parameters and 256k context.
- **Flash-Base**: moe lm · Base checkpoint variant of the released model family.
- **Hybrid attn**: long-context · Interleaved sliding-window and global attention for efficient long-context inference.
- **MTP head**: generation · Lightweight multi-token prediction head to accelerate decoding.

### Training stack

Upstream post-training and RL infrastructure described by the report.

- **MOPD**: post-training · Multi-Teacher On-Policy Distillation used in post-training.
- **Agentic RL**: rl · Reinforcement learning stage for tool use and reasoning behavior.
- **Rollout plane**: rl infra · Rollout routing replay, prefix caching, fine-grained scheduling, and tool management.
- **Infra stack**: runtime · SGLang, Megatron-LM, Kubernetes, and Ray infrastructure for training and rollout.

### Serving and access

Inference serving path and downstream access surfaces.

- **Tool loop**: agentic loop · Multi-turn reasoning, tool-call parsing, and reasoning-content persistence across turns.
- **SGLang server**: serving · Inference server with parallelism, FP8, speculative decoding, and MTP enabled.
- **Chat API**: endpoint · OpenAI-style /v1/chat/completions interface.
- **MiMo Studio**: playground · Interactive public playground for model demos.
- **MiMo API**: platform · Hosted API access surface for external users.
- **Hugging Face**: distribution · Model weight download and distribution surface.

## Connections

- README → MiMo-V2-Flash: describes · The README introduces the released flagship model.
- README → Flash-Base: describes · The README also documents the base checkpoint.
- README → Hybrid attn: documents · Architecture notes explain the long-context attention pattern.
- README → MTP head: documents · The release explains MTP as a decoding accelerator.
- README → SGLang server: deployment · Launch guidance centers on SGLang serving.
- README → Hugging Face: links · Model downloads are distributed via Hugging Face.
- README → MiMo Studio: links · Interactive demo access is exposed through MiMo Studio.
- README → MiMo API: links · Hosted API access is presented as a downstream surface.
- Report → MOPD: details · The report describes the MOPD post-training stage.
- Report → Agentic RL: details · The report describes the agentic RL stage.
- Report → Rollout plane: details · The report references the rollout and scheduling infrastructure.
- Report → Infra stack: details · The report names the RL and training runtime stack.
- MiMo-V2-Flash → Hybrid attn: uses · Hybrid attention is a core inference mechanism.
- MiMo-V2-Flash → MTP head: uses · MTP accelerates generation for the released model.
- Flash-Base → Hybrid attn: uses · The base model shares the long-context attention design.
- Flash-Base → MTP head: uses · The base model also includes the MTP pathway.
- MOPD → Agentic RL: feeds · Distillation precedes or supports the RL refinement stage.
- Agentic RL → Rollout plane: runs on · RL depends on rollout orchestration and caching.
- Rollout plane → Infra stack: built on · Rollout orchestration is implemented on the infra stack.
- Infra stack → SGLang server: shares runtime · Serving and rollout both rely on SGLang-derived execution.
- SGLang server → Chat API: exposes · The server publishes an OpenAI-style chat endpoint.
- SGLang server → Tool loop: supports · The serving stack parses tools and preserves reasoning state.
- Tool loop → Chat API: interacts through · Tool and reasoning turns are exchanged via chat completions.
- Chat API → MiMo Studio: powers · The API can back the public playground experience.
- Chat API → MiMo API: powers · The API is the contract for the hosted platform.
- Hugging Face → MiMo-V2-Flash: distributes · Weights for the released model family are published for download.
- Figures → Report: supports · Figures accompany the technical narrative in the report.
