> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/mimo-v2-flash.md).

# MiMo-V2-Flash

> MiMo-V2-Flash ist ein **309-Milliarden-Parameter Mixture-of-Experts** Sprachmodell, das pro Token 15B Parameter aktiviert. Entwickelt mit fortschrittlichem spekulativem Decoding (EAGLE/MTP) liefert es **150+ Token/Sekunde** auf 8×H100 bei gleichzeitiger Aufrechterhaltung leistungsführender Performance. Veröffentlicht unter **MIT-Lizenz**, repräsentiert es die Spitze effizienter großskaliger Inferenz.

## Auf einen Blick

* **Modellgröße**: 309B insgesamt / 15B aktive Parameter (MoE)
* **Lizenz**: MIT (vollständig kommerziell)
* **Kontext**: 32K Token
* **Leistung**: Stand der Technik bei Reasoning-Benchmarks
* **VRAM**: \~320GB FP16 (mindestens 4×A100 80GB)
* **Geschwindigkeit**: 150+ tok/s auf 8×H100 mit spekulativem Decoding

## Warum MiMo-V2-Flash?

**Durchbruch in der Geschwindigkeit**: MiMo-V2-Flash erreicht beispiellose Inferenzgeschwindigkeiten durch EAGLE (Extrapolation Algorithm for Greater Language model Efficiency) und MTP (Multi-Token Prediction). Während traditionelle Modelle ein Token nach dem anderen erzeugen, sagt MiMo-V2 mehrere Tokens voraus und validiert sie parallel.

**Produktionsreife Skalierung**: Mit 309B Parametern konkurriert MiMo-V2-Flash mit den größten Spitzenmodellen und bleibt gleichzeitig auf realistischen Hardware-Konfigurationen einsetzbar. Die 15B aktiven Parameter gewährleisten effiziente Inferenz trotz der enormen Parameteranzahl.

**Fortschrittliche Architektur**: Über standardmäßige MoE hinaus integriert MiMo-V2-Flash spekulatives Decoding nativ in die Modellarchitektur. Dies ist keine Nachtrainingsoptimierung — es ist in die Basis eingebaut und ermöglicht garantierte Beschleunigungen.

**Enterprise-Qualität**: MIT-Lizenzierung ohne Nutzungsbeschränkungen. Im großen Maßstab deployen, feinabstimmen oder in kommerzielle Produkte integrieren ohne Lizenzbedenken.

## GPU-Empfehlungen

| Setup           | VRAM  | Leistung       | Tägliche Kosten\* |
| --------------- | ----- | -------------- | ----------------- |
| **4×A100 80GB** | 320GB | \~80 tok/s     | \~$16.00          |
| **8×A100 40GB** | 320GB | \~70 tok/s     | \~$28.00          |
| **2×H100**      | 160GB | \~90 tok/s     | \~$12.00          |
| **8×H100**      | 640GB | **150+ tok/s** | \~$48.00          |
| 4×H200          | 564GB | \~120 tok/s    | \~$32.00          |

**Bestes Preis-Leistungs-Verhältnis**: 4×A100 80GB bietet hervorragende Leistung pro Dollar. **Maximale Leistung**: 8×H100 entfesselt das volle Potenzial des spekulativen Decodings.

\*Geschätzte Preise des Clore.ai-Marktplatzes

## Deployment mit SGLang (Empfohlen)

SGLang bietet die beste Unterstützung für die spekulativen Decoding-Funktionen von MiMo-V2-Flash:

### SGLang installieren

```bash
pip install "sglang[all]>=0.3.0"
# oder aktuellste Version
pip install git+https://github.com/sgl-project/sglang.git
```

### Multi-GPU-Setup mit MTP

```bash
python -m sglang.launch_server \
  --model-path mimo-ai/MiMo-V2-Flash \
  --tp-size 8 \
  --enable-mtp \
  --mtp-max-draft-tokens 8 \
  --mtp-acceptance-rate 0.8 \
  --mem-fraction-static 0.85 \
  --dtype float16 \
  --context-length 32768 \
  --served-model-name mimo-v2-flash
```

### Abfragen mit der OpenAI API

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:30000/v1", 
    api_key="EMPTY"
)

response = client.chat.completions.create(
    model="mimo-v2-flash",
    messages=[
        {"role": "system", "content": "You are an expert AI researcher."},
        {"role": "user", "content": "Explain the EAGLE speculative decoding algorithm and why it enables faster inference"}
    ],
    max_tokens=1024,
    temperature=0.7,
    stream=True  # Empfohlen für beste Latenz
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end='', flush=True)
```

## Deployment mit vLLM

vLLM unterstützt MiMo-V2-Flash ebenfalls mit spekulativem Decoding:

```bash
pip install vllm>=0.6.0

vllm serve mimo-ai/MiMo-V2-Flash \
  --tensor-parallel-size 8 \
  --speculative-model mimo-ai/MiMo-V2-Flash-Draft \
  --speculative-max-model-len 32768 \
  --speculative-draft-tensor-parallel-size 2 \
  --use-v2-block-manager \
  --dtype float16 \
  --served-model-name mimo-v2-flash \
  --trust-remote-code
```

## Docker-Vorlage

```dockerfile
FROM nvidia/cuda:12.1-devel-ubuntu22.04

# Abhängigkeiten installieren
RUN apt-get update && \
    apt-get install -y python3.10 python3-pip git && \
    rm -rf /var/lib/apt/lists/*

# SGLang mit MTP-Unterstützung installieren
RUN pip install "sglang[all]>=0.3.0" transformers

# Umgebungsvariablen setzen
ENV PYTHONUNBUFFERED=1
ENV CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

# Modell vorab herunterladen (optional, spart Startzeit)
# RUN python3 -c "from transformers import AutoModel; AutoModel.from_pretrained('mimo-ai/MiMo-V2-Flash', trust_remote_code=True)"

EXPOSE 30000

CMD ["python", "-m", "sglang.launch_server", \
     "--model-path", "mimo-ai/MiMo-V2-Flash", \
     "--host", "0.0.0.0", \
     "--port", "30000", \
     "--tp-size", "8", \
     "--enable-mtp", \
     "--mtp-max-draft-tokens", "8", \
     "--dtype", "float16"]
```

Mit allen GPUs ausführen:

```bash
docker build -t mimo-v2-flash .
docker run --gpus all -p 30000:30000 \
  --shm-size=64g \
  --ulimit memlock=-1 \
  --ulimit stack=67108864 \
  mimo-v2-flash
```

## Erweiterte Konfiguration

### Optimierung des spekulativen Decodings

Feinabstimmung spekulativer Parameter basierend auf Ihrer Arbeitslast:

```bash
# Für Code-Generierung (höhere Akzeptanzrate)
python -m sglang.launch_server \
  --model-path mimo-ai/MiMo-V2-Flash \
  --tp-size 8 \
  --enable-mtp \
  --mtp-max-draft-tokens 12 \
  --mtp-acceptance-rate 0.9 \
  --temperature 0.1

# Für kreatives Schreiben (niedrigere Akzeptanzrate)
python -m sglang.launch_server \
  --model-path mimo-ai/MiMo-V2-Flash \
  --tp-size 8 \
  --enable-mtp \
  --mtp-max-draft-tokens 6 \
  --mtp-acceptance-rate 0.7 \
  --temperature 0.8
```

### Speicheroptimierung

Für speicherbeschränkte Setups:

```bash
# Speicherverbrauch reduzieren (langsamer, passt aber auf 4×A100)
python -m sglang.launch_server \
  --model-path mimo-ai/MiMo-V2-Flash \
  --tp-size 4 \
  --mem-fraction-static 0.75 \
  --context-length 16384 \
  --dtype float16 \
  --disable-cuda-graph  # Spart VRAM
```

## Benchmark-Beispiel

Testen Sie den Geschwindigkeitsvorteil von MiMo-V2-Flash:

```python
import time
from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")

def benchmark_generation():
    start_time = time.time()
    
    response = client.chat.completions.create(
        model="mimo-v2-flash",
        messages=[
            {"role": "user", "content": "Write a detailed explanation of quantum computing in exactly 500 words"}
        ],
        max_tokens=600,
        temperature=0.1,
        stream=False
    )
    
    end_time = time.time()
    content = response.choices[0].message.content
    
    tokens = len(content.split())  # Grobe Token-Schätzung
    duration = end_time - start_time
    tokens_per_second = tokens / duration
    
    print(f"Generated {tokens} tokens in {duration:.2f}s")
    print(f"Speed: {tokens_per_second:.1f} tokens/second")
    
    return tokens_per_second

# Benchmark ausführen
speed = benchmark_generation()
print(f"\nMiMo-V2-Flash achieved {speed:.1f} tok/s")
```

## Tipps für Clore.ai-Nutzer

* **Multi-GPU unerlässlich**: MiMo-V2-Flash erfordert mindestens 4×A100 80GB. Ein Single-GPU-Deployment ist nicht praktikabel.
* **NVLink-Vorteil**: Wählen Sie Clore.ai-Hosts mit NVLink zwischen GPUs für optimale Multi-GPU-Kommunikation.
* **RAM-Anforderungen**: Sorgen Sie für 256GB+ System-RAM für einen reibungslosen Betrieb mit 8 GPUs.
* **Spekulative Feinabstimmung**: Passen Sie `mtp-max-draft-tokens` an Ihren Anwendungsfall an — höher bei repetitiven Aufgaben, niedriger bei kreativem Arbeiten.
* **Kontextlänge**: 32K Kontext ist optimal. Längere Kontexte reduzieren die Wirksamkeit des spekulativen Decodings.

## Fehlerbehebung

| Problem                          | Lösung                                                                                                |
| -------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `OutOfMemoryError` beim Start    | Reduzieren Sie `mem-fraction-static` oder `tp-size`                                                   |
| Langsame inter-GPU-Kommunikation | Überprüfen Sie NVLink: `nvidia-ml-py3` oder `nvidia-smi topo -m`                                      |
| MTP beschleunigt nicht           | Prüfen Sie `mtp-acceptance-rate` — zu hohe Werte deaktivieren die Spekulation                         |
| Timeout beim Laden des Modells   | Vorab herunterladen: `huggingface-cli download mimo-ai/MiMo-V2-Flash`                                 |
| Schlechte Token-Akzeptanz        | Überprüfen Sie die Temperatureinstellungen — sehr niedrige/hohe Temperaturen reduzieren die Akzeptanz |

## Leistungsvergleich

| Modell            | Größe    | Geschwindigkeit (8×H100) | Qualität |
| ----------------- | -------- | ------------------------ | -------- |
| GPT-4 Turbo       | \~1,7T   | \~15-25 tok/s            | ★★★★★    |
| Claude Sonnet 3.5 | \~200B   | \~25-35 tok/s            | ★★★★★    |
| **MiMo-V2-Flash** | **309B** | **150+ tok/s**           | ★★★★☆    |
| Llama 3.1 405B    | 405B     | \~30-45 tok/s            | ★★★★☆    |

MiMo-V2-Flash erzielt eine 3–5× Beschleunigung gegenüber vergleichbaren Modellen bei gleichbleibend wettbewerbsfähiger Qualität.

## Ressourcen

* [MiMo-V2-Flash auf Hugging Face](https://huggingface.co/mimo-ai/MiMo-V2-Flash)
* [EAGLE-Papier](https://arxiv.org/abs/2401.15077)
* [SGLang-Dokumentation](https://sgl-project.github.io/start/install.html)
* [Multi-Token-Vorhersage](https://arxiv.org/abs/2404.19737)
* [Leitfaden zum spekulativen Decoding](https://huggingface.co/blog/assisted-generation)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/mimo-v2-flash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
