> 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/ki-coding-tools/tabby.md).

# TabbyML Code Completion

TabbyML ist ein selbstgehosteter Server für KI-Codevervollständigung — ein Drop-in-Ersatz für GitHub Copilot, der deinen Code vollständig in deiner eigenen Infrastruktur hält. Lizenziert unter Apache 2.0, läuft er auf Clore.ai-GPUs und verbindet sich über offizielle Erweiterungen mit VS Code, JetBrains und Vim/Neovim. Modelle reichen von StarCoder2-1B (passt auf 4 GB VRAM) bis StarCoder2-15B und DeepSeek-Coder für maximale Qualität.

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

## Hauptmerkmale

* **Selbstgehostete Copilot-Alternative** — dein Code verlässt nie deinen Server
* **Apache-2.0-Lizenz** — kostenlos für kommerzielle Nutzung, keine Einschränkungen
* **IDE-Erweiterungen** — VS Code, JetBrains (IntelliJ, PyCharm, WebStorm), Vim/Neovim
* **Mehrere Modelle** — StarCoder2 (1B/3B/7B/15B), DeepSeek-Coder, CodeLlama
* **Repository-Kontext** — RAG-gestützte Code-Retrieval für projektbewusste Vervollständigungen
* **Docker-Bereitstellung** — ein Befehl zum Starten mit GPU-Unterstützung
* **Admin-Dashboard** — Nutzungsanalysen, Modellverwaltung, Benutzerverwaltung
* **Chat-Oberfläche** — stelle Programmierfragen über Autovervollständigung hinaus

## Anforderungen

| Komponente | Minimum        | Empfohlen       |
| ---------- | -------------- | --------------- |
| GPU        | RTX 3060 12 GB | RTX 3080 10 GB+ |
| VRAM       | 4 GB           | 10 GB           |
| RAM        | 8 GB           | 16 GB           |
| Festplatte | 20 GB          | 50 GB           |
| CUDA       | 11.8           | 12.1+           |

**Clore.ai-Preise:** RTX 3080 ≈ $0,3–1/Tag · RTX 3060 ≈ $0,15–0,3/Tag

TabbyML ist ressourcenschonend — selbst eine RTX 3060 betreibt StarCoder2-7B mit schneller Inferenz.

## Schnellstart

### 1. Mit Docker bereitstellen

```bash
# StarCoder2-7B auf GPU (empfohlenes Gleichgewicht von Qualität und Geschwindigkeit)
docker run -d \
  --name tabby \
  --gpus all \
  -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby \
  serve \
  --model StarCoder2-7B \
  --device cuda

# Überprüfen, ob es läuft
curl http://localhost:8080/v1/health
```

### 2. Wähle ein Modell

| Modell              | VRAM    | Geschwindigkeit | Qualität  | Am besten geeignet für      |
| ------------------- | ------- | --------------- | --------- | --------------------------- |
| StarCoder2-1B       | \~3 GB  | Am schnellsten  | Basic     | RTX 3060, schnelle Entwürfe |
| StarCoder2-3B       | \~5 GB  | Schnell         | Gut       | Allgemeine Entwicklung      |
| StarCoder2-7B       | \~8 GB  | Mittel          | Hoch      | Empfohlener Standard        |
| StarCoder2-15B      | \~16 GB | Langsamer       | Am besten | Komplexe Codebasen          |
| DeepSeek-Coder-6.7B | \~8 GB  | Mittel          | Hoch      | Python, JS, TypeScript      |
| CodeLlama-7B        | \~8 GB  | Mittel          | Gut       | Allzweck                    |

Modelle wechseln, indem du das `--model` Flag:

```bash
# Leichteres Modell für weniger VRAM
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve --model StarCoder2-3B --device cuda

# Größtes Modell für beste Qualität
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve --model StarCoder2-15B --device cuda
```

### 3. IDE-Erweiterungen installieren

**VS Code:**

1. Erweiterungen öffnen (Ctrl+Shift+X)
2. Suche nach "Tabby" und installiere die offizielle Erweiterung
3. Einstellungen öffnen → nach "Tabby" suchen
4. Setze den Server-Endpunkt: `http://<deine-clore-ip>:8080`

**JetBrains (IntelliJ, PyCharm, WebStorm):**

1. Einstellungen → Plugins → Marketplace
2. Suche nach "Tabby" und installiere
3. Einstellungen → Tools → Tabby → Server-Endpunkt: `http://<deine-clore-ip>:8080`

**Vim/Neovim:**

```vim
" Mit vim-plug
Plug 'TabbyML/vim-tabby'

" Konfiguration in init.vim / .vimrc
let g:tabby_server_url = 'http://<deine-clore-ip>:8080'
```

### 4. Auf das Admin-Dashboard zugreifen

Öffnen `http://<deine-clore-ip>:8080` im Browser. Das Dashboard bietet:

* Statistiken zur Nutzung von Vervollständigungen
* Modellstatus und Leistungsmetriken
* Benutzer- und API-Token-Verwaltung
* Konfiguration der Repository-Indizierung

## Beispielanwendungen

### Repository-Kontext hinzufügen (RAG)

Indexiere dein Repository für projektbewusste Vervollständigungen:

```bash
# Über die Admin-API
curl -X POST http://localhost:8080/v1beta/repositories \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-project",
    "git_url": "file:///workspace/my-project"
  }'

# Tabby indiziert das Repo und nutzt es für kontextbewusste Vervollständigungen
```

### Die Chat-API verwenden

```bash
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Write a Python function to parse CSV files with error handling"}
    ]
  }'
```

### Mit Authentifizierung ausführen

```bash
# Erzeuge ein Auth-Token über das Admin-Dashboard, dann:
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve \
  --model StarCoder2-7B \
  --device cuda

# Setze das Token in den Einstellungen deiner IDE-Erweiterung
# oder verwende den Authorization-Header:
curl -H "Authorization: Bearer <token>" http://localhost:8080/v1/health
```

### Ohne Docker ausführen (Direktinstallation)

```bash
# Installation über Homebrew (Linux)
curl -fsSL https://raw.githubusercontent.com/TabbyML/tabby/main/install.sh | bash

# Oder cargo install
cargo install tabby

# Direkt ausführen
tabby serve --model StarCoder2-7B --device cuda --port 8080
```

## Kostenvergleich

| Lösung               | Monatliche Kosten | Datenschutz      | Latenz   |
| -------------------- | ----------------- | ---------------- | -------- |
| GitHub Copilot       | $19/Nutzer        | ❌ Cloud          | \~200 ms |
| TabbyML auf RTX 3060 | \~$5–9/Monat      | ✅ Selbstgehostet | \~50 ms  |
| TabbyML auf RTX 3080 | \~$9–30/Monat     | ✅ Selbstgehostet | \~30 ms  |
| TabbyML auf RTX 4090 | \~$15–60/Monat    | ✅ Selbstgehostet | \~15 ms  |

Für ein kleines Team (3–5 Entwickler) ersetzt eine einzelne RTX 3080 auf Clore.ai mehrere Copilot-Abonnements zu einem Bruchteil der Kosten.

## Tipps

* **StarCoder2-7B ist der Sweet Spot** — bestes Verhältnis von Qualität zu VRAM für die meisten Teams
* **Repository-Kontext aktivieren** — RAG-Indizierung verbessert die Relevanz der Vervollständigungen für große Codebasen erheblich
* **Port 8080 sicher freigeben** — verwende SSH-Tunneling oder einen Reverse-Proxy mit TLS für Produktionsbereitstellungen
* **VRAM-Nutzung überwachen** — `nvidia-smi` um sicherzustellen, dass das Modell mit Spielraum für Inferenz-Batching passt
* **Die Completion-API verwenden** für CI/CD-Integration — automatisiere Vorschläge zur Code-Überprüfung
* **Tabby unterstützt mehrere Benutzer** — das Admin-Dashboard ermöglicht das Erstellen von API-Tokens pro Entwickler
* **Latenz ist wichtig** — wähle einen Clore.ai-Server geografisch nah an deinem Team für die schnellsten Vervollständigungen

## Fehlerbehebung

| Problem                              | Lösung                                                                                                 |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| Docker-Container beendet sich sofort | Logs prüfen: `docker logs tabby`. Wahrscheinlich unzureichender VRAM für das Modell                    |
| IDE-Erweiterung verbindet sich nicht | Endpunkt-URL überprüfen, Firewall/Portweiterleitung auf Clore.ai prüfen                                |
| Langsame Vervollständigungen         | Verwende ein kleineres Modell oder stelle sicher, dass die GPU nicht mit anderen Aufgaben geteilt wird |
| `CUDA out of memory`                 | Wechsel zu einem kleineren Modell (StarCoder2-3B oder 1B)                                              |
| Repository-Indizierung hängt         | Prüfe den Festplattenspeicher und stelle sicher, dass das Git-Repo zugänglich ist                      |
| Auth-Token abgelehnt                 | Token im Admin-Dashboard neu generieren, IDE-Erweiterung aktualisieren                                 |
| Hohe Latenz vom entfernten IDE       | SSH-Tunnel verwenden: `ssh -L 8080:localhost:8080 root@<clore-ip>`                                     |

## Ressourcen

* [TabbyML GitHub](https://github.com/TabbyML/tabby)
* [TabbyML Dokumentation](https://tabby.tabbyml.com)
* [VS Code Erweiterung](https://marketplace.visualstudio.com/items?itemName=TabbyML.vscode-tabby)
* [CLORE.AI Marketplace](https://clore.ai/marketplace)


---

# 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/ki-coding-tools/tabby.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.
