> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/de/modelle/tutorials/cogito-v2-how-to-run-locally.md).

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

Cogito v2.1 LLMs gehören zu den stärksten offenen Modellen der Welt, trainiert mit IDA. Außerdem gibt es v1 in 4 Größen: 70B, 109B, 405B und 671B, sodass du die Größe auswählen kannst, die am besten zu deiner Hardware passt.

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

Cogito v2.1 ist in der Größe 1 671B MoE erhältlich, während Cogito v2 Preview [Deep Cogito](https://www.deepcogito.com/)s Modellveröffentlichung umfasst 4 Modellgrößen, die von 70B bis 671B reichen. Durch die Verwendung von **IDA (Iterated Distillation & Amplification)** werden diese Modelle so trainiert, dass das Modell den Denkprozess durch iterative Policy-Verbesserung internalisiert, anstatt zur Laufzeit 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, quantisierte dynamische Modelle für alle 4 Modellgrößen bereitzustellen! Alle Uploads verwenden Unsloth [Dynamic 2.0](/docs/de/grundlagen/dynamic-3.0-ggufs.md) für SOTA-5-Shot-MMLU- und KL-Divergenz-Leistung, was bedeutet, dass Sie diese LLMs quantisiert mit minimalem Genauigkeitsverlust ausführen und feinabstimmen können!

**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ählen Sie die Modellgröße, die zu Ihrer 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 basierend auf Llama – 70B und 405B
2. 2 MoE-Modelle basierend auf 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>44 GB</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>50 GB</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>152 GB</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>251 GB</strong></td><td>DeepSeek R1</td></tr></tbody></table>

{% hint style="success" %}
Auch wenn es nicht notwendig ist: Für die beste Leistung sollte VRAM + RAM zusammen der Größe der Quantisierung entsprechen, die Sie herunterladen. Wenn Sie weniger VRAM + RAM haben, funktioniert die Quantisierung weiterhin, wird jedoch deutlich langsamer sein.
{% endhint %}

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

1. Holen Sie sich die neueste `llama.cpp` auf [hier auf GitHub](https://github.com/ggml-org/llama.cpp). Sie können auch die folgenden Build-Anweisungen befolgen. Ändern Sie `-DGGML_CUDA=ON` zu `-DGGML_CUDA=OFF` wenn Sie keine GPU haben oder nur CPU-Inferenz möchten. **Für Apple-Mac-/Metal-Geräte**, setzen Sie `-DGGML_CUDA=OFF` und fahren Sie 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 Sie `llama.cpp` um Modelle direkt zu laden, können Sie Folgendes tun: (:IQ1\_S) ist der Quantisierungstyp. Sie können auch über Hugging Face herunterladen (Punkt 3). Das ist ähnlich wie `ollama run` . Verwenden Sie `export LLAMA_CACHE="folder"` um zu erzwingen `llama.cpp` um an einem bestimmten Speicherort zu speichern.

{% hint style="success" %}
Bitte probieren Sie `-ot ".ffn_.*_exps.=CPU"` 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"` Dadurch werden Up- und Down-Projektions-MoE-Layer ausgelagert.

Versuchen Sie `-ot ".ffn_(up)_exps.=CPU"` wenn Sie noch mehr GPU-Speicher haben. Dadurch werden nur Up-Projektions-MoE-Layer ausgelagert.

Und schließlich alle Layer auslagern über `-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 dem 6. Layer aufwärts.
{% 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 über (nach der Installation von `pip install huggingface_hub hf_transfer` ). Sie können `UD-IQ1_S`(dynamische 1,78-Bit-Quantisierung) oder andere quantisierte Versionen wie `Q4_K_M` . Wir <mark style="background-color:green;">**empfehlen unsere dynamische 2,7-Bit-Quantisierung**</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 das Rate Limit auslösen, daher auf 0 setzen, um es 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 (168 GB) Verwenden Sie "*UD-Q2_K_XL*" für dynamische 2-Bit (251 GB)
)
```

{% endcode %}

4. Bearbeiten `--threads 32` für die Anzahl der CPU-Threads, `--ctx-size 16384` für die Kontextlänge, `--n-gpu-layers 2` für GPU-Offloading auf wie viele Layer. Versuche, ihn anzupassen, wenn deiner GPU der Speicher ausgeht. Entferne ihn auch, wenn du nur CPU-Inferenz hast.

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

1. Folgen Sie denselben Anweisungen wie beim Ausführen des [oben genannten 671B-Modells](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führen Sie 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. Folgen Sie denselben Anweisungen wie beim Ausführen des [oben genannten 671B-Modells](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führen Sie 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. Folgen Sie denselben Anweisungen wie beim Ausführen des [oben genannten 671B-Modells](#run-cogito-671b-moe-in-llama.cpp).
2. Dann führen Sie 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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/de/modelle/tutorials/cogito-v2-how-to-run-locally.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
