# Cogito v2.1: So führst du es lokal aus

{% hint style="success" %}
Deep Cogito v2.1 ist ein aktualisiertes 671B MoE, das mit Stand 19. November 2025 das leistungsstärkste Modell mit offenen Gewichten ist.
{% endhint %}

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

Deep Cogito hat seinen Sitz in [San Francisco, 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 anzubieten! 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-Leistung, das heißt, Sie können diese quantisierten LLMs mit minimalem Genauigkeitsverlust ausführen und feinabstimmen!

**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 Varianten von 1,58bit bis 16bit für alle 4 Modellgrößen 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 Quant &#x26; Link</th><th>Platzbedarf auf Datenträger</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">empfehlen die Verwendung unseres 2,7-Bit Dynamic Quant</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">empfehlen die Verwendung unseres 2,7-Bit Dynamic Quant</a></td><td><strong>251GB</strong></td><td>DeepSeek R1</td></tr></tbody></table>

{% hint style="success" %}
Obwohl nicht zwingend erforderlich, sollten für die beste Leistung VRAM + RAM zusammen der Größe des heruntergeladenen Quants entsprechen. Wenn Sie weniger VRAM + RAM haben, funktioniert der Quant weiterhin, ist jedoch 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 Build-Anweisungen unten 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` 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, können Sie Folgendes tun: (:IQ1\_S) ist der Quantisierungstyp. Sie können auch über Hugging Face (Punkt 3) herunterladen. Dies ist ähnlich zu `ollama run` . Verwenden Sie `export LLAMA_CACHE="folder"` um `llama.cpp` um an einen bestimmten Ort zu speichern.

{% hint style="success" %}
Bitte probieren Sie `-ot ".ffn_.*_exps.=CPU"` um alle MoE-Schichten auf die CPU auszulagern! Dadurch können Sie effektiv alle Nicht-MoE-Schichten auf einer GPU unterbringen, was die Generationsgeschwindigkeit verbessert. Sie können den Regex-Ausdruck anpassen, um mehr Schichten zu verschieben, wenn Sie mehr GPU-Kapazität haben.

Wenn Sie etwas mehr GPU-Speicher haben, versuchen Sie `-ot ".ffn_(up|down)_exps.=CPU"` Dies lagert Up- und Down-Projection-MoE-Schichten aus.

Versuchen Sie `-ot ".ffn_(up)_exps.=CPU"` wenn Sie noch mehr GPU-Speicher haben. Dies lagert nur Up-Projection-MoE-Schichten aus.

Und schließlich lagern Sie alle Schichten über `-ot ".ffn_.*_exps.=CPU"` aus.

Dies verwendet am wenigsten VRAM. `Sie können auch den Regex anpassen, zum Beispiel` -ot "\\.(6|7|8|9|\[0-9]\[0-9]|\[0-9]\[0-9]\[0-9])\\.ffn\_(gate|up|down)\_exps.=CPU"
{% 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 via (nach der Installation von `pip install huggingface_hub hf_transfer` ). Du kannst wählen `UD-IQ1_S`(dynamischer 1,78bit-Quant) oder andere quantisierte Versionen wie `Q4_K_M` Q4\_K\_XL <mark style="background-color:green;">**. Wir**</mark><mark style="background-color:green;">**&#x20;**</mark><mark style="background-color:green;">**`empfehlen die Verwendung unseres 2,7-Bit Dynamic Quant`**</mark><mark style="background-color:green;">**&#x20;**</mark><mark style="background-color:green;">**UD-Q2\_K\_XL**</mark>. Mehr 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 Ratenbegrenzung verursachen, also 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*"], # Dynamisch 1bit (168GB) Verwenden Sie "*UD-Q2_K_XL*" für dynamisch 2bit (251GB)
)
```

{% endcode %}

4. Bearbeiten `Sie können` --threads 32 `für die Anzahl der CPU-Threads bearbeiten,` --ctx-size 16384 `für Kontextlänge,` --n-gpu-layers 2

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

1. Befolgen Sie die gleichen Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Führen Sie dann 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. Befolgen Sie die gleichen Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Führen Sie dann 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 \
    für die Anzahl der CPU-Threads bearbeiten,
```

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

1. Befolgen Sie die gleichen Anweisungen wie beim Ausführen des [671B-Modells oben](#run-cogito-671b-moe-in-llama.cpp).
2. Führen Sie dann 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 \
    für die Anzahl der CPU-Threads bearbeiten,
```

Tool Calling mit GLM 4.7 <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.
