> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/text-generation-webui.md).

# Text Generation WebUI

Führen Sie die beliebteste LLM-Oberfläche mit Unterstützung für alle Modellformate aus.

{% hint style="success" %}
Alle Beispiele können auf GPU-Servern ausgeführt werden, die über [CLORE.AI Marketplace](https://clore.ai/marketplace).
{% endhint %}

## Mieten auf CLORE.AI

1. Besuchen Sie [CLORE.AI Marketplace](https://clore.ai/marketplace)
2. Nach GPU-Typ, VRAM und Preis filtern
3. Wählen **On-Demand** (Festpreis) oder **Spot** (Gebotspreis)
4. Konfigurieren Sie Ihre Bestellung:
   * Docker-Image auswählen
   * Ports festlegen (TCP für SSH, HTTP für Web-UIs)
   * Umgebungsvariablen bei Bedarf hinzufügen
   * Startbefehl eingeben
5. Zahlung auswählen: **CLORE**, **BTC**, oder **USDT/USDC**
6. Bestellung erstellen und auf Bereitstellung warten

### Zugriff auf Ihren Server

* Verbindungsdetails finden Sie in **Meine Bestellungen**
* Webschnittstellen: Verwenden Sie die HTTP-Port-URL
* SSH: `ssh -p <port> root@<proxy-address>`

## Warum Text Generation WebUI?

* Unterstützt GGUF, GPTQ, AWQ, EXL2, HF-Formate
* Eingebaute Chat-, Notebook- und API-Modi
* Erweiterungen: Stimme, Charaktere, multimodal
* Unterstützung für Fine-Tuning
* Modellwechsel unterwegs

## Anforderungen

| Modellgröße | Min. VRAM | Empfohlen |
| ----------- | --------- | --------- |
| 7B (Q4)     | 6GB       | RTX 3060  |
| 13B (Q4)    | 10GB      | RTX 3080  |
| 30B (Q4)    | 20GB      | RTX 4090  |
| 70B (Q4)    | 40GB      | A100      |

## Schnelle Bereitstellung

**Docker-Image:**

```
atinoda/text-generation-webui:default-nvidia
```

**Ports:**

```
22/tcp
7860/http
5000/http
5005/http
```

**Umgebung:**

```
EXTRA_LAUNCH_ARGS=--listen --api
```

## Manuelle Installation

**Image:**

```
nvidia/cuda:12.1.0-devel-ubuntu22.04
```

**Ports:**

```
22/tcp
7860/http
5000/http
```

**Befehl:**

```bash
apt-get update && apt-get install -y git python3 python3-pip && \
cd /workspace && \
git clone https://github.com/oobabooga/text-generation-webui.git && \
cd text-generation-webui && \
pip install -r requirements.txt && \
python server.py --listen --api
```

## Zugriff auf Ihren Dienst

Nach der Bereitstellung finden Sie Ihre `http_pub` URL in **Meine Bestellungen**:

1. Gehen Sie zur **Meine Bestellungen** Seite
2. Klicken Sie auf Ihre Bestellung
3. Finden Sie die `http_pub` URL (z. B., `abc123.clorecloud.net`)

Verwenden Sie `https://IHRE_HTTP_PUB_URL` anstelle von `localhost` in den Beispielen unten.

## WebUI aufrufen

1. Warten Sie auf die Bereitstellung
2. Finden Sie die Port-7860-Zuordnung in **Meine Bestellungen**
3. Öffnen: `http://<proxy>:<port>`

## Modelle herunterladen

### Von HuggingFace (im WebUI)

1. Gehen Sie zur **Modell** Tab
2. Modellname eingeben: `bartowski/Meta-Llama-3.1-8B-Instruct-GGUF`
3. Klicken **Herunterladen**

### Über die Befehlszeile

```bash
cd /workspace/text-generation-webui

# GGUF-Modell herunterladen
python download-model.py bartowski/Meta-Llama-3.1-8B-Instruct-GGUF

# Bestimmte Datei herunterladen
python download-model.py bartowski/Meta-Llama-3.1-8B-Instruct-GGUF --specific-file Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf
```

### Empfohlene Modelle

**Für Chat:**

```bash

# Llama 2 Chat (7B, schnell)
python download-model.py bartowski/Meta-Llama-3.1-8B-Instruct-GGUF

# Mistral Instruct (ausgezeichnet)
python download-model.py bartowski/Mistral-7B-Instruct-v0.3-GGUF

# OpenHermes (toller Allrounder)
python download-model.py bartowski/OpenHermes-2.5-Mistral-7B-GGUF
```

**Für Coding:**

```bash

# CodeLlama
python download-model.py bartowski/CodeLlama-13B-Instruct-GGUF

# DeepSeek Coder
python download-model.py bartowski/DeepSeek-Coder-V2-Lite-Instruct-GGUF
```

**Für Rollenspiel:**

```bash

# MythoMax
python download-model.py bartowski/MythoMax-L2-13B-GGUF
```

## Modelle laden

### GGUF (Empfohlen für die meisten Benutzer)

1. **Modell** Tab → Modellordner auswählen
2. **Modell-Loader:** llama.cpp
3. Setze **n-gpu-layers:**
   * RTX 3090: 35-40
   * RTX 4090: 45-50
   * A100: 80+
4. Klicken **Laden**

### GPTQ (Schnell, quantisiert)

1. GPTQ-Modell herunterladen
2. **Modell-Loader:** ExLlama\_HF oder AutoGPTQ
3. Modell laden

### EXL2 (Beste Geschwindigkeit)

```bash

# exllamav2 installieren
pip install exllamav2
```

1. EXL2-Modell herunterladen
2. **Modell-Loader:** ExLlamav2\_HF
3. Laden

## Chat-Konfiguration

### Charaktereinrichtung

1. Gehen Sie zur **Parameter** → **Charakter**
2. Charakterkarte erstellen oder laden
3. Festlegen:
   * Name
   * Kontext/Persona
   * Beispieldialog

### Instruct-Modus

Für instruction-tuned Modelle:

1. **Parameter** → **Instruktionsvorlage**
2. Vorlage auswählen, die zu Ihrem Modell passt:
   * Llama-2-chat
   * Mistral
   * ChatML
   * Alpaca

## API-Nutzung

### API aktivieren

Beginnen Sie mit `--api` flag (Standardport 5000)

### OpenAI-kompatible API

```python
import openai

openai.api_base = "http://localhost:5000/v1"
openai.api_key = "not-needed"

response = openai.ChatCompletion.create(
    model="any",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
```

### Native API

```python
import requests

response = requests.post(
    "http://localhost:5000/api/v1/generate",
    json={
        "prompt": "Schreibe eine Geschichte über",
        "max_new_tokens": 200,
        "temperature": 0.7
    }
)
print(response.json()["results"][0]["text"])
```

## Erweiterungen

### Erweiterungen installieren

```bash
cd /workspace/text-generation-webui/extensions

# Silero TTS (Stimme)
git clone https://github.com/oobabooga/text-generation-webui-extensions

# SuperBoogav2 (RAG/langfristiger Speicher)

# Bereits enthalten, in der UI aktivieren
```

### Erweiterungen aktivieren

1. **Sitzung** Tab → **Erweiterungen**
2. Kontrollkästchen für gewünschte Erweiterungen markieren
3. Klicken **Anwenden und neu starten**

### Beliebte Erweiterungen

| Erweiterung       | Zweck           |
| ----------------- | --------------- |
| silero\_tts       | Sprachausgabe   |
| whisper\_stt      | Spracheingabe   |
| superbooga        | Dokumenten-Q\&A |
| sd\_api\_pictures | Bildgenerierung |
| multimodal        | Bildverständnis |

## Performance-Tuning

### GGUF-Einstellungen

```
n_gpu_layers: 35    # GPU-Schichten (mehr = schneller)
n_ctx: 4096         # Kontextlänge
n_batch: 512        # Batchgröße
threads: 8          # CPU-Threads
```

### Speicheroptimierung

Bei begrenztem VRAM:

```bash
python server.py --listen --n-gpu-layers 20 --no-mmap
```

### Geschwindigkeitsoptimierung

```bash

# Verwenden Sie llama.cpp mit cuBLAS
python server.py --listen --loader llama.cpp --n-gpu-layers 50 --threads 8
```

## Feinabstimmung (LoRA)

### Training-Tab

1. Gehen Sie zur **Training** Tab
2. Basis-Modell laden
3. Datensatz hochladen (JSON-Format)
4. Konfigurieren:
   * LoRA-Rang: 8-32
   * Lernrate: 1e-4
   * Epochen: 3-5
5. Training starten

### Datensatzformat

```json
[
  {"instruction": "Fasse das zusammen:", "input": "Langer Text...", "output": "Zusammenfassung..."},
  {"instruction": "Ins Französische übersetzen:", "input": "Hello", "output": "Bonjour"}
]
```

## Ihre Arbeit speichern

```bash

# Modelle speichern
rsync -avz /workspace/text-generation-webui/models/ backup-server:/models/

# Charaktere speichern
rsync -avz /workspace/text-generation-webui/characters/ backup-server:/characters/

# LoRAs speichern
rsync -avz /workspace/text-generation-webui/loras/ backup-server:/loras/
```

## Fehlerbehebung

### Modell lädt nicht

* VRAM-Auslastung prüfen: `nvidia-smi`
* Reduzieren `n_gpu_layers`
* Verwenden Sie kleinere Quantisierung (Q4\_K\_M → Q4\_K\_S)

### Langsame Generierung

* Erhöhen Sie `n_gpu_layers`
* Verwenden Sie EXL2 statt GGUF
* Aktivieren Sie `--no-mmap`

{% hint style="danger" %}
**Kein Speicher mehr**
{% endhint %}

Während der Generierung - Reduzieren Sie \`n\_ctx\` (Kontextlänge) - Verwenden Sie \`--n-gpu-layers 0\` für CPU-only - Versuchen Sie ein kleineres Modell

## Kostenabschätzung

Typische CLORE.AI-Marktplatztarife (Stand 2024):

| GPU       | Stundensatz | Tagessatz | 4-Stunden-Sitzung |
| --------- | ----------- | --------- | ----------------- |
| RTX 3060  | \~$0.03     | \~$0.70   | \~$0.12           |
| RTX 3090  | \~$0.06     | \~$1.50   | \~$0.25           |
| RTX 4090  | \~$0.10     | \~$2.30   | \~$0.40           |
| A100 40GB | \~$0.17     | \~$4.00   | \~$0.70           |
| A100 80GB | \~$0.25     | \~$6.00   | \~$1.00           |

*Preise variieren je nach Anbieter und Nachfrage. Prüfen Sie* [*CLORE.AI Marketplace*](https://clore.ai/marketplace) *auf aktuelle Preise.*

**Geld sparen:**

* Verwenden Sie **Spot** Markt für flexible Workloads (oft 30–50% günstiger)
* Bezahlen mit **CLORE** Token
* Preise bei verschiedenen Anbietern vergleichen


---

# 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:

```
GET https://docs.clore.ai/guides/guides_v2-de/sprachmodelle/text-generation-webui.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.
