> 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

Erfahre, wie du dich verbindest **vLLM mit** [**Unsloth**](https://github.com/unslothai/unsloth) unter Verwendung von vLLMs **OpenAI-kompatible API** damit du Modelle bereitstellen und lokal über eine Open-Source-UI-Chatoberfläche mit ihnen chatten kannst. Diese Anleitung führt dich 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 deines gehosteten vLLM-Modells.

Am Ende werden deine von vLLM bereitgestellten Modelle neben lokalen Modellen angezeigt, sodass du auf einfache und flexible Weise externe LLM-Inferenz über eine UI-Chatoberfläche ausführen kannst.

### Einrichtung

{% stepper %}
{% step %}

#### vLLM installieren

Installiere vLLM zuerst, damit du den `vllm serve` Befehl ausführen kannst. Folge der offiziellen [vLLM-Installationsanleitung](https://docs.vllm.ai/en/stable/getting_started/installation/) für deine Plattform und Hardware.

Nachdem du es installiert hast, prüfe im Terminal, ob vLLM funktioniert: `vllm --help`
{% endstep %}

{% step %}

#### Wähle ein Modell aus

vLLM stellt Modelle von Hugging Face bereit.

Starte zum Beispiel 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üge hinzu:

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

{% endstep %}

{% step %}

#### Verbinde vLLM mit Unsloth

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

Wählen Sie **vLLM**, und gib dann deine Serverdetails ein.

<figure><img src="/files/be97d4034052a6c057d52480c52626699f1714b6" alt=""><figcaption></figcaption></figure>

Gib deine vLLM-Serverdetails ein:

* **API-Schlüssel:** leer lassen, außer du hast vLLM mit --api-key gestartet
* **Basis-URL:** zum Beispiel <http://localhost:8000/v1>
* **Reasoning-Modell:** aktiviere dies, wenn das bereitgestellte Modell Thinking unterstützt
* **Modell-IDs:** klicken Sie auf **Modelle laden**, oder gib benutzerdefinierte IDs manuell ein

Nachdem du auf **Verbindung hinzufügen**geklickt hast, werden die von dir aktivierten Modelle unter **Verbindung** im Modellauswahlmenü aus.
{% endstep %}

{% step %}

#### Bereit zum Chatten

Nachdem du die Verbindung gespeichert hast, wird dein vLLM-Modell unter **Verbunden** im Modell-Dropdown angezeigt. Wähle es aus, um das Chatten über deinen vLLM-Server zu starten.

<figure><img src="/files/a0f6e2178d1f2101b09fb3b8256215ac82318758" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Wenn dein vLLM-Server langsam reagiert (insbesondere während des Modellladens), kannst du das Timeout anpassen:

```bash
AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST=30
```

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

### Häufige vLLM-Argumente

Das obige Beispiel verwendet die grundlegenden Serving-Einstellungen. Du kannst je nach deinem Modell und deiner Hardware weitere vllm serve-Argumente 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 findest du 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://unsloth.ai/docs/de/integrationen/connections/vllm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
