> 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/integrationen/connections/vllm.md).

# vLLM mit Unsloth für lokale Chat-Inferenz verbinden

Erfahren Sie, wie Sie eine Verbindung herstellen **vLLM mit** [**Unsloth**](https://github.com/unslothai/unsloth) mithilfe von vLLMs **OpenAI-kompatible API** damit Sie Modelle bereitstellen und lokal in einer Open-Source-Chat-UI mit ihnen chatten können. Diese Anleitung führt Sie durch die Installation von vLLM, das Starten eines lokalen vLLM-Servers, das Konfigurieren der API-Basis-URL, das Laden verfügbarer Modell-IDs und das Auswählen Ihres gehosteten vLLM-Modells.

Am Ende werden Ihre von vLLM bereitgestellten Modelle zusammen mit lokalen Modellen angezeigt, wodurch Sie eine schnelle und flexible Möglichkeit erhalten, externe LLM-Inferenz über eine UI-Chat-Oberfläche auszuführen.

### Einrichtung

{% stepper %}
{% step %}

#### vLLM installieren

Installieren Sie vLLM zuerst, damit Sie den `vllm serve` Befehl ausführen können. Folgen Sie der offiziellen [Installationsanleitung für vLLM](https://docs.vllm.ai/en/stable/getting_started/installation/) für Ihre Plattform und Hardware.

Überprüfen Sie nach der Installation, ob vLLM in Ihrem Terminal funktioniert: `vllm --help`
{% endstep %}

{% step %}

#### Wähle ein Modell

vLLM stellt Modelle von Hugging Face bereit.

Starten Sie beispielsweise einen vLLM-Server mit einem Unsloth-Modell:

```bash
vllm serve unsloth/gemma-4-26B-A4B-it 
\ --dtype auto
```

Dies stellt einen API-Endpunkt bereit unter:

`http://localhost:8000/v1`

Um einen API-Schlüssel zu verlangen, fügen Sie hinzu:

```bash
--api-key token-abc123
```

{% endstep %}

{% step %}

#### vLLM mit Unsloth verbinden

Öffnen **Einstellungen → Verbindungen**, dann klicken Sie auf **Verbindung hinzufügen**.

Wählen Sie **vLLM**, und geben Sie dann Ihre Serverdetails ein.

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FN80ObNBvpN7hDypheYkt%2Fimage.png?alt=media&amp;token=481f4c1f-afb6-438d-ae35-85566f15e414" alt=""><figcaption></figcaption></figure>

Geben Sie Ihre vLLM-Serverdetails ein:

* **API-Schlüssel:** leer lassen, es sei denn, Sie haben vLLM mit --api-key gestartet
* **Basis-URL:** z. B. <http://localhost:8000/v1>
* **Reasoning-Modell:** aktivieren Sie dies, wenn das bereitgestellte Modell Denken unterstützt
* **Modell-IDs:** klicken Sie auf **Modelle laden**, oder geben Sie benutzerdefinierte IDs manuell ein

Nachdem Sie auf **Verbindung hinzufügen**, werden die von Ihnen aktivierten Modelle unter **Verbindung** im Modell-Dropdown angezeigt.
{% endstep %}

{% step %}

#### Bereit zum Chatten

Nachdem Sie die Verbindung gespeichert haben, wird Ihr vLLM-Modell unter **Verbunden** im Modell-Dropdown angezeigt. Wählen Sie es aus, um über Ihren vLLM-Server zu chatten.

<figure><img src="https://797013937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FpoXSmL3PcpprEy8CIT7S%2Fexport-1779046578662.gif?alt=media&amp;token=acf1de86-6fa4-466f-97f7-2d91662a124e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Wenn Ihr vLLM-Server langsam reagiert (insbesondere während des Modellladens), können Sie das Timeout anpassen:

```bash
AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST=30
```

{% endhint %}
{% endstep %}
{% endstepper %}

### Häufige vLLM-Argumente

Das obige Beispiel verwendet die grundlegenden Bereitstellungseinstellungen. Sie können je nach Ihrem Modell und Ihrer Hardware weitere Argumente für vllm serve hinzufügen.

Zu den häufigen Optionen gehören:

```bash
vllm serve unsloth/gemma-4-26B-A4B-it \
  --dtype auto \
  --host 0.0.0.0 \
  --port 8000 \
  --api-key token-abc123 \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.9
```

Die vollständige Liste der vLLM-Serverargumente finden Sie in der offiziellen vLLM [OpenAI-kompatiblen Server](https://docs.vllm.ai/en/stable/serving/openai_compatible_server/) Dokumentation.


---

# 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/integrationen/connections/vllm.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.
