# Cogito v2.1: Wie man lokal ausführt

{% hint style="success" %}
Deep Cogito v2.1 ist ein aktualisiertes 671B MoE und das leistungsstärkste Open-Weights-Modell mit Stand vom 19. November 2025.
{% endhint %}

Cogito v2.1 gibt es in einer 671B-MoE-Größe, während Cogito v2 Preview [Deep Cogito](https://www.deepcogito.com/)s Veröffentlichung von Modellen umfasst 4 Modellgrößen von 70B bis 671B. Durch die Verwendung von **IDA (Iterated Distillation & Amplification)** werden diese Modelle so trainiert, dass das Modell den Denkprozess durch iterative Policy-Verbesserung verinnerlicht, anstatt bei der Inferenzzeit einfach länger zu suchen (wie DeepSeek R1).

Deep Cogito hat seinen Sitz in [San Fransisco, USA](https://techcrunch.com/2025/04/08/deep-cogito-emerges-from-stealth-with-hybrid-ai-reasoning-models/) (wie Unsloth :flag\_us:) und wir freuen uns, für alle 4 Modellgrößen quantisierte dynamische Modelle bereitzustellen! Alle Uploads verwenden Unsloth [Dynamic 2.0](/docs/de/grundlagen/unsloth-dynamic-2.0-ggufs.md) für SOTA 5-Shot-MMLU- und KL-Divergenz-Performance, was bedeutet, dass du diese LLMs mit minimalem Genauigkeitsverlust quantisiert ausführen und feinabstimmen kannst!

**Tutorial-Navigation:**

<a href="https://docs.unsloth.ai/basics/tutorials-how-to-fine-tune-and-run-llms/cogito-v2-how-to-run-locally#run-cogito-671b-moe-in-llama.cpp" class="button secondary">671B MoE ausführen</a><a href="https://docs.unsloth.ai/basics/tutorials-how-to-fine-tune-and-run-llms/cogito-v2-how-to-run-locally#run-cogito-109b-moe-in-llama.cpp" class="button secondary">109B MoE ausführen</a><a href="https://docs.unsloth.ai/basics/tutorials-how-to-fine-tune-and-run-llms/cogito-v2-how-to-run-locally#run-cogito-405b-dense-in-llama.cpp" class="button secondary">405B Dense ausführen</a><a href="https://docs.unsloth.ai/basics/tutorials-how-to-fine-tune-and-run-llms/cogito-v2-how-to-run-locally#run-cogito-70b-dense-in-llama.cpp" class="button secondary">70B Dense ausführen</a>

{% hint style="success" %}
Wähle aus, welche Modellgröße zu deiner Hardware passt! Wir laden für alle 4 Modellgrößen Varianten von 1,58 Bit bis 16 Bit hoch!
{% endhint %}

## :gem: Modellgrößen und Uploads

Es gibt 4 Modellgrößen:

1. 2 Dense-Modelle auf Basis von Llama - 70B und 405B
2. 2 MoE-Modelle auf Basis von Llama 4 Scout (109B) und DeepSeek R1 (671B)

<table data-full-width="false"><thead><tr><th>Modellgrößen</th><th width="256.9999694824219">Empfohlene Quantisierung &#x26; Link</th><th>Festplattengröße</th><th>Architektur</th></tr></thead><tbody><tr><td>70B Dense</td><td><a href="https://huggingface.co/unsloth/cogito-v2-preview-llama-70B-GGUF">UD-Q4_K_XL</a></td><td><strong>44GB</strong></td><td>Llama 3 70B</td></tr><tr><td>109B MoE</td><td><a href="https://huggingface.co/unsloth/cogito-v2-preview-llama-109B-MoE-GGUF">UD-Q3_K_XL</a></td><td><strong>50GB</strong></td><td>Llama 4 Scout</td></tr><tr><td>405B Dense</td><td><a href="https://huggingface.co/unsloth/cogito-v2-preview-llama-405B-GGUF">UD-Q2_K_XL</a></td><td><strong>152GB</strong></td><td>Llama 3 405B</td></tr><tr><td>671B MoE</td><td><a href="https://huggingface.co/unsloth/cogito-v2-preview-deepseek-671B-MoE-GGUF">UD-Q2_K_XL</a></td><td><strong>251GB</strong></td><td>DeepSeek R1</td></tr></tbody></table>

{% hint style="success" %}
Obwohl nicht notwendig, gilt für die beste Leistung: VRAM + RAM zusammen sollten der Größe der heruntergeladenen Quantisierung entsprechen. Wenn du weniger VRAM + RAM hast, funktioniert die Quantisierung trotzdem, aber deutlich langsamer.
{% endhint %}

## 🐳 Cogito 671B MoE in llama.cpp ausführen

1. Hole dir die neueste `llama.cpp` auf [GitHub hier](https://github.com/ggml-org/llama.cpp). Du kannst auch den untenstehenden Build-Anweisungen folgen. Ändere `-DGGML_CUDA=ON` zu `-DGGML_CUDA=OFF` wenn du keine GPU hast oder nur CPU-Inferenz möchtest. **Für Apple Mac / Metal-Geräte**, setze `-DGGML_CUDA=OFF` und fahre dann wie gewohnt fort - Metal-Unterstützung ist standardmäßig aktiviert.

{% code overflow="wrap" %}

```shellscript
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
git clone https://github.com/ggml-org/llama.cpp
cmake llama.cpp -B llama.cpp/build \
    -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-quantize llama-cli llama-gguf-split llama-mtmd-cli
cp llama.cpp/build/bin/llama-* llama.cpp
```

{% endcode %}

2. Wenn du `llama.cpp` um Modelle direkt zu laden, kannst du Folgendes verwenden: (:IQ1\_S) ist der Quantisierungstyp. Du kannst auch über Hugging Face herunterladen (Punkt 3). Das ist ähnlich wie `ollama run` . Verwenden Sie `export LLAMA_CACHE="folder"` um zu erzwingen, dass `llama.cpp` um an einem bestimmten Speicherort zu speichern.

{% hint style="success" %}
Bitte probiere `-ot ".ffn_.*_exps.=CPU"` verwenden, um alle MoE-Layer auf die CPU auszulagern! Dadurch können Sie effektiv alle Nicht-MoE-Layer auf 1 GPU unterbringen, was die Generierungsgeschwindigkeit verbessert. Sie können den Regex-Ausdruck anpassen, um mehr Layer unterzubringen, wenn Sie mehr GPU-Kapazität haben.

Wenn Sie etwas mehr GPU-Speicher haben, versuchen Sie `-ot ".ffn_(up|down)_exps.=CPU"` Dies lagert die MoE-Layer für Up- und Down-Projektionen aus.

Versuchen Sie `-ot ".ffn_(up)_exps.=CPU"` wenn Sie noch mehr GPU-Speicher haben. Dies lagert nur die MoE-Layer für Up-Projektionen aus.

Und schließlich lagern Sie alle Layer aus via `-ot ".ffn_.*_exps.=CPU"` Dies verwendet am wenigsten VRAM.

Sie können den Regex auch anpassen, zum Beispiel `-ot "\.(6|7|8|9|[0-9][0-9]|[0-9][0-9][0-9])\.ffn_(gate|up|down)_exps.=CPU"` bedeutet, Gate-, Up- und Down-MoE-Layer auszulagern, aber nur ab der 6. Schicht.
{% endhint %}

```shellscript
export LLAMA_CACHE="unsloth/cogito-671b-v2.1-GGUF"
./llama.cpp/llama-cli \
    -hf unsloth/cogito-671b-v2.1-GGUF:UD-Q2_K_XL \
    --n-gpu-layers 99 \
    --temp 0.6 \\
    --top-p 0.95 \
    --min-p 0,01 \
    --ctx-size 16384 \
    --seed 3407 \\
    --jinja \
    -ot ".ffn_.*_exps.=CPU"
```

3. Lade das Modell herunter über (nach der Installation von `pip install huggingface_hub hf_transfer` ). Du kannst `UD-IQ1_S`(dynamische 1,78-Bit-Quantisierung) oder andere quantisierte Versionen wie `Q4_K_M` . Wir <mark style="background-color:green;">**empfehlen unser dynamisches 2,7-Bit-Quant**</mark><mark style="background-color:green;">**&#x20;**</mark><mark style="background-color:green;">**`UD-Q2_K_XL`**</mark><mark style="background-color:green;">**&#x20;**</mark><mark style="background-color:green;">**zu verwenden, um Größe und Genauigkeit auszubalancieren**</mark>. Weitere Versionen unter: <https://huggingface.co/unsloth/cogito-671b-v2.1-GGUF>

{% code overflow="wrap" %}

```python
# !pip install huggingface_hub hf_transfer
import os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "0" # Kann manchmal Ratenbegrenzungen auslösen, daher auf 0 setzen, um zu deaktivieren
from huggingface_hub import snapshot_download
snapshot_download(
    repo_id = "unsloth/cogito-671b-v2.1-GGUF",
    local_dir = "unsloth/cogito-671b-v2.1-GGUF",
    allow_patterns = ["*UD-IQ1_S*"], # Dynamische 1-Bit (168GB) Verwende "*UD-Q2_K_XL*" für dynamische 2-Bit (251GB)
)
```

{% endcode %}

4. Bearbeiten `--threads 32` für die Anzahl der CPU-Threads bearbeiten, `--ctx-size 16384` für die Kontextlänge, `--n-gpu-layers 2` für GPU-Offloading, also für wie viele Layer. Versuchen Sie, dies anzupassen, wenn Ihrem GPU-Speicher der Platz ausgeht. Entfernen Sie es auch, wenn Sie nur CPU-Inferenz haben.

## :mouse\_three\_button:Cogito 109B MoE in llama.cpp ausführen

1. Befolge dieselben Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führe Folgendes aus:

```shellscript
export LLAMA_CACHE="unsloth/cogito-v2-preview-llama-109B-MoE-GGUF"
./llama.cpp/llama-cli \
    -hf unsloth/cogito-v2-preview-llama-109B-MoE-GGUF:Q3_K_XL \
    --n-gpu-layers 99 \
    --temp 0.6 \\
    --min-p 0,01 \
    --top-p 0.9 \
    --ctx-size 16384 \
    --jinja \
    -ot ".ffn_.*_exps.=CPU"
```

## :deciduous\_tree:Cogito 405B Dense in llama.cpp ausführen

1. Befolge dieselben Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führe Folgendes aus:

```shellscript
export LLAMA_CACHE="unsloth/cogito-v2-preview-llama-405B-GGUF"
./llama.cpp/llama-cli \
    -hf unsloth/cogito-v2-preview-llama-405B-GGUF:Q2_K_XL \
    --n-gpu-layers 99 \
    --temp 0.6 \\
    --min-p 0,01 \
    --top-p 0.9 \
    --jinja \
    --ctx-size 16384
```

## :sunglasses: Cogito 70B Dense in llama.cpp ausführen

1. Befolge dieselben Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führe Folgendes aus:

```shellscript
export LLAMA_CACHE="unsloth/cogito-v2-preview-llama-70B-GGUF"
./llama.cpp/llama-cli \
    -hf unsloth/cogito-v2-preview-llama-70B-GGUF:Q4_K_XL \
    --n-gpu-layers 99 \
    --temp 0.6 \\
    --min-p 0,01 \
    --top-p 0.9 \
    --jinja \
    --ctx-size 16384
```

Siehe <https://www.deepcogito.com/research/cogito-v2-1> für weitere Details


---

# Agent Instructions: 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://unsloth.ai/docs/de/modelle/tutorials/cogito-v2-how-to-run-locally.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.
