> 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/how-to-run-llms-with-docker.md).

# Wie man lokale LLMs mit Docker ausführt: Schritt-für-Schritt-Leitfaden

Erfahre, wie du Large Language Models (LLMs) mit Docker und Unsloth auf deinem lokalen Gerät ausführst.

Du kannst jetzt jedes Modell ausführen, einschließlich Unsloth [Dynamische GGUFs](/docs/de/grundlagen/dynamic-3.0-ggufs.md), auf Mac, Windows oder Linux mit nur einer Codezeile oder **gar keinem Code** überhaupt nicht. Wir haben mit Docker zusammengearbeitet, um die Bereitstellung von Modellen zu vereinfachen, und Unsloth treibt jetzt die meisten GGUF-Modelle auf Docker an.

Bevor du beginnst, sieh dir unbedingt [die Hardware-Anforderungen](#hardware-info--performance) und [unsere Tipps](#hardware-info--performance) zur Leistungsoptimierung beim Ausführen von LLMs auf deinem Gerät an.

<a href="/docs/de/modelle/tutorials/how-to-run-llms-with-docker.md#method-1-docker-terminal" class="button primary">Docker-Terminal-Tutorial</a><a href="#method-2-docker-desktop-no-code" class="button primary">Docker-No-Code-Tutorial</a>

Um loszulegen, führe OpenAI aus [gpt-oss](/docs/de/modelle/gpt-oss-how-to-run-and-fine-tune.md) mit nur einem Befehl:

```bash
docker model run ai/gpt-oss:20B
```

Oder um ein bestimmtes [Unsloth-Modell](/docs/de/loslegen/unsloth-model-catalog.md) / Quantisierung von Hugging Face auszuführen:

```bash
docker model run hf.co/unsloth/gpt-oss-20b-GGUF:F16
```

{% hint style="success" %}
Du brauchst Docker Desktop nicht, Docker CE reicht aus, um Modelle auszuführen.
{% endhint %}

#### **Warum Unsloth + Docker?**

Wir arbeiten mit Modell-Labs wie Google Gemma zusammen, um Modellfehler zu beheben und die Genauigkeit zu steigern. Unsere Dynamic-GGUFs übertreffen andere Quantisierungsverfahren konstant und liefern dir eine präzise, effiziente Inferenz.

Wenn du Docker verwendest, kannst du Modelle sofort ohne Einrichtung ausführen. Docker verwendet [Docker Model Runner](https://github.com/docker/model-runner) (DMR), mit dem du LLMs genauso einfach wie Container ohne Abhängigkeitsprobleme ausführen kannst. DMR nutzt Unsloth-Modelle und `llama.cpp` unter der Haube für eine schnelle, effiziente und aktuelle Inferenz.

## :gear: Hardware-Infos + Leistung

Für die beste Leistung sollte dein kombinierter VRAM + RAM mindestens der Größe des quantisierten Modells entsprechen, das du herunterlädst. Wenn du weniger hast, läuft das Modell trotzdem, aber deutlich langsamer.

Stelle sicher, dass dein Gerät außerdem genügend Speicherplatz hat, um das Modell zu speichern. Wenn dein Modell nur knapp in den Speicher passt, kannst du je nach Modellgröße mit etwa \~5 Tokens/s rechnen.

Zusätzlicher verfügbarer RAM/VRAM verbessert die Inferenzgeschwindigkeit, und zusätzlicher VRAM bringt den größten Leistungszuwachs (vorausgesetzt, das gesamte Modell passt hinein)

{% hint style="info" %}
**Beispiel:** Wenn du gpt-oss-20b (F16) herunterlädst und das Modell 13,8 GB groß ist, stelle sicher, dass dein Speicherplatz und RAM + VRAM > 13,8 GB sind.
{% endhint %}

**Empfehlungen zur Quantisierung:**

* Für Modelle unter 30B Parametern verwende mindestens 4-Bit (Q4).
* Für Modelle mit 70B Parametern oder mehr verwende mindestens 2-Bit-Quantisierung (z. B. UD\_Q2\_K\_XL).

## ⚡ Schritt-für-Schritt-Tutorials

Unten sind **zwei Möglichkeiten** Modelle mit Docker auszuführen: eine über das [Terminal](#method-1-docker-terminal), und die andere über [Docker Desktop](#method-2-docker-desktop-no-code) ohne Code:

### Methode #1: Docker-Terminal

{% stepper %}
{% step %}

#### Docker installieren

Docker Model Runner ist bereits verfügbar in **beide** [Docker Desktop](https://docs.docker.com/ai/model-runner/get-started/#docker-desktop) und [**Docker CE**](https://docs.docker.com/ai/model-runner/get-started/#docker-engine)**.**
{% endstep %}

{% step %}

#### Das Modell ausführen

Entscheide dich für ein Modell, das du ausführen möchtest, und führe dann den Befehl im Terminal aus.

* Durchsuche den verifizierten Katalog vertrauenswürdiger Modelle auf [Docker Hub](https://hub.docker.com/r/ai) oder [Unsloths Hugging Face](https://huggingface.co/unsloth) Seite.
* Gehe zum Terminal, um die Befehle auszuführen. Um zu überprüfen, ob du `docker` installiert hast, kannst du 'docker' eingeben und Enter drücken.
* Docker Hub verwendet standardmäßig Unsloth Dynamic 4-bit, du kannst jedoch deinen eigenen Quantisierungsgrad auswählen (siehe Schritt #3).

Zum Beispiel, um OpenAI auszuführen `gpt-oss-20b` mit nur einem Befehl:

```bash
docker model run ai/gpt-oss:20B
```

Oder um ein bestimmtes [Unsloth](/docs/de/loslegen/unsloth-model-catalog.md) gpt-oss-Quantisierung von Hugging Face:

```bash
docker model run hf.co/unsloth/gpt-oss-20b-GGUF:UD-Q8_K_XL
```

**So sollte das Ausführen von gpt-oss-20b über die CLI aussehen:**

<div><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FNQQGqQfLuX2a40i07Es1%2Funknown.png?alt=media&amp;token=6006e370-a298-4e5f-af9f-5c4e8c4a0fc8" alt="" width="563"><figcaption><p>gpt-oss-20b von Docker Hub</p></figcaption></figure> <figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FFtzowkLonKo4N2LzEnhe%2Fgptoss%20ud8kxl.png?alt=media&amp;token=08eb6244-0626-4ad8-adbe-f5c4e5aa6d72" alt="" width="563"><figcaption><p>gpt-oss-20b mit Unsloths UD-Q8_K_XL-Quantisierung</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Um einen bestimmten Quantisierungsgrad auszuführen:

Wenn du eine bestimmte Quantisierung eines Modells ausführen möchtest, hänge `:` und den Quantisierungsnamen an das Modell an (z. B. `Q4` für Docker oder `UD-Q4_K_XL`). Du kannst alle verfügbaren Quantisierungen auf der Docker-Hub-Seite jedes Modells einsehen. z. B. die aufgelisteten Quantisierungen für gpt-oss [hier](https://hub.docker.com/r/ai/gpt-oss#gptoss).

Dasselbe gilt für Unsloth-Quants auf Hugging Face: besuche die [HF-Seite des Modells](https://huggingface.co/unsloth/gpt-oss-20b-GGUF?show_file_info=gpt-oss-20b-Q2_K_L.gguf), wähle eine Quantisierung und führe dann etwas wie Folgendes aus: `docker model run hf.co/unsloth/gpt-oss-20b-GGUF:Q2_K_L`

<div><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FI7MrphUugkU8eZ1f7lJz%2FScreenshot%202025-11-16%20at%2010.52.25%E2%80%AFPM.png?alt=media&amp;token=ae777fdb-258e-46d0-b06e-b68434f7fa58" alt="" width="563"><figcaption><p>Quantisierungsstufen von gpt-oss auf <a href="https://hub.docker.com/r/ai/gpt-oss#gptoss">Docker Hub</a></p></figcaption></figure> <figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F73UWIs9VAZ6Iz1omgZSm%2FScreenshot%202025-11-16%20at%2010.54.53%E2%80%AFPM.png?alt=media&amp;token=e8dee7f3-1b8b-4dda-a455-26df58102d16" alt="" width="563"><figcaption><p>Unsloth-gpt-oss-Quantisierungsstufen auf<a href="https://huggingface.co/unsloth/gpt-oss-20b-GGUF"> Hugging Face</a></p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### Methode #2: Docker Desktop (ohne Code)

{% stepper %}
{% step %}

#### Docker Desktop installieren

Docker Model Runner ist bereits verfügbar in [Docker Desktop](https://docs.docker.com/ai/model-runner/get-started/#docker-desktop).

1. Entscheide dich für ein Modell, das du ausführen möchtest, öffne Docker Desktop und klicke dann auf den Tab „Modelle“.
2. Klicke auf „Modelle hinzufügen +“ oder Docker Hub. Suche nach dem Modell.

Durchsuche den verifizierten Modellkatalog auf [Docker Hub](https://hub.docker.com/r/ai).

<div><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F6R8uxbedMklVHsriLgpZ%2FScreenshot%202025-11-16%20at%206.36.49%E2%80%AFAM.png?alt=media&amp;token=0fb849f5-bc72-4883-9b25-1a756334ab4b" alt=""><figcaption><p>#1. Klicke auf den Tab „Modelle“ und dann auf „Modelle hinzufügen +“</p></figcaption></figure> <figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fj7I69xgxDeHXkvVbjemq%2FScreenshot%202025-11-16%20at%206.46.47%E2%80%AFAM.png?alt=media&amp;token=3e25d495-f34b-47d6-9185-f145610eed10" alt=""><figcaption><p>#2. Suche nach dem gewünschten Modell.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Das Modell herunterladen

Klicke auf das Modell, das du ausführen möchtest, um die verfügbaren Quantisierungen zu sehen.

* Quantisierungen reichen von 1–16 Bit. Für Modelle unter 30B Parametern verwende mindestens 4-Bit (`Q4`).
* Wähle eine Größe, die zu deiner Hardware passt: Idealerweise sollte dein kombinierter Unified Memory, RAM oder VRAM gleich groß oder größer als die Modellgröße sein. Ein 11-GB-Modell läuft zum Beispiel gut auf 12 GB Unified Memory.

<div><figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FdQnwVwsMhYtWTzAGFih3%2FScreenshot%202025-11-16%20at%206.47.26%E2%80%AFAM.png?alt=media&amp;token=b1f0e29a-b3de-4d96-b79a-931441744565" alt=""><figcaption><p>#3. Wähle aus, welche Quantisierung du herunterladen möchtest.</p></figcaption></figure> <figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FFGMZEXgQjBdVqP0vFTX3%2FScreenshot%202025-11-16%20at%206.54.09%E2%80%AFAM.png?alt=media&amp;token=b7f0c0d8-ebef-4e7e-99a9-c44c4c5f0844" alt=""><figcaption><p>#4. Warte, bis das Modell fertig heruntergeladen ist, und führe es dann aus.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Das Modell ausführen

Gib eine beliebige Eingabe in das Feld „Ask a question“ ein und benutze das LLM, wie du ChatGPT verwenden würdest.

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F9nVjWcVsYK9CeT8gk3nQ%2FScreenshot%202025-11-16%20at%206.54.50%E2%80%AFAM.png?alt=media&amp;token=d7e5b63d-9c3e-42b0-882c-de046bbcfc9a" alt="" width="563"><figcaption><p>Ein Beispiel für das Ausführen von Qwen3-4B <code>UD-Q8_K_XL</code></p></figcaption></figure>
{% endstep %}
{% endstepper %}

#### **Um die neuesten Modelle auszuführen:**

Du kannst jedes neue Modell auf Docker ausführen, solange es unterstützt wird von `llama.cpp` oder `vllm` und auf Docker Hub verfügbar ist.

### Was ist der Docker Model Runner?

Der Docker Model Runner (DMR) ist ein Open-Source-Tool, mit dem du KI-Modelle genauso einfach herunterladen und ausführen kannst wie Container. GitHub: <https://github.com/docker/model-runner>

Es bietet eine konsistente Laufzeitumgebung für Modelle, ähnlich wie Docker die Anwendungsbereitstellung standardisiert hat. Unter der Haube verwendet es optimierte Backends (wie `llama.cpp`) für eine reibungslose, hardwareeffiziente Inferenz auf deinem Rechner.

Egal, ob du Forscher, Entwickler oder Hobbyist bist, du kannst jetzt:

* Offene Modelle in Sekunden lokal ausführen.
* Abhängigkeitschaos vermeiden, alles wird in Docker erledigt.
* Modell-Setups mühelos teilen und reproduzieren.


---

# 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/how-to-run-llms-with-docker.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.
