> 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-Vervollständigung

Hoste TabbyML selbst als private GitHub-Copilot-Alternative auf Clore.ai

TabbyML ist ein selbst gehosteter KI-Code-Vervollständigungsserver — ein 1:1-Ersatz für GitHub Copilot, der Ihren Code vollständig auf Ihrer eigenen Infrastruktur belässt. Unter Apache 2.0 lizenziert, läuft er auf Clore.ai-GPUs und verbindet sich über offizielle Erweiterungen mit VS Code, JetBrains und Vim/Neovim. Die 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-Marktplatz](https://clore.ai/marketplace).
{% endhint %}

## Hauptfunktionen

* **Selbst gehostete Copilot-Alternative** — Ihr Code verlässt niemals Ihren Server
* **Apache-2.0-Lizenz** — frei für die kommerzielle Nutzung, ohne 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-Suche für projektbewusste Vervollständigungen
* **Docker-Bereitstellung** — ein einziger Befehl zum Starten mit GPU-Unterstützung
* **Admin-Dashboard** — Nutzungsanalysen, Modellverwaltung, Benutzerverwaltung
* **Chat-Oberfläche** — stellen Sie Programmierfragen über die 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       | 12.8+          | 12.8+           |

**Clore.ai-Preise:** RTX 3080 ≈ $0.05–0.19/Std. · RTX 3060 ≈ $0.03–0.07/Std.

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

## Schnellstart

### 1. Mit Docker bereitstellen

```bash
# StarCoder2-7B auf GPU (empfohlener Kompromiss zwischen 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

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

### 2. Ein Modell auswählen

| Modell              | VRAM    | Geschwindigkeit | Qualität  | Am besten geeignet für      |
| ------------------- | ------- | --------------- | --------- | --------------------------- |
| StarCoder2-1B       | \~3 GB  | Am schnellsten  | Einfach   | 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       | Allgemeiner Zweck           |

Modelle wechseln durch Ändern des `--model` Schalters:

```bash
# Leichteres Modell für geringeren 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. Suchen Sie nach „Tabby“ und installieren Sie die offizielle Erweiterung
3. Einstellungen öffnen → nach „Tabby“ suchen
4. Server-Endpunkt festlegen: `http://<your-clore-ip>:8080`

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

1. Einstellungen → Plugins → Marketplace
2. Nach „Tabby“ suchen und installieren
3. Einstellungen → Tools → Tabby → Server-Endpunkt: `http://<your-clore-ip>:8080`

**Vim/Neovim:**

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

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

### 4. Auf das Admin-Dashboard zugreifen

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

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

## Anwendungsbeispiele

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

Indizieren Sie Ihr 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 verwendet es für kontextbewusste Vervollständigungen
```

### Verwenden Sie die Chat-API

```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
# Generieren Sie 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

# Setzen Sie das Token in den Einstellungen Ihrer IDE-Erweiterung
# oder verwenden Sie den Authorization-Header:
curl -H "Authorization: Bearer <token>" http://localhost:8080/v1/health
```

### Ohne Docker ausführen (Direktinstallation)

```bash
# Über Homebrew installieren (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/Benutzer      | ❌ Cloud     | \~200 ms |
| TabbyML auf RTX 3060 | \~$5–9/Mon.       | ✅ Selbst    | \~50 ms  |
| TabbyML auf RTX 3080 | \~$9–30/Mon.      | ✅ Selbst    | \~30 ms  |
| TabbyML auf RTX 4090 | \~$15–60/Mon.     | ✅ Selbst    | \~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 goldene Mittelweg** — 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** — verwenden Sie 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 hineinpasst
* **Verwenden Sie die Completion-API** für die CI/CD-Integration — automatisieren Sie Vorschläge für Code-Reviews
* **Tabby unterstützt mehrere Benutzer** — im Admin-Dashboard können Sie API-Tokens pro Entwickler erstellen
* **Latenz ist wichtig** — wählen Sie einen geografisch nah an Ihrem Team gelegenen Clore.ai-Server für die schnellsten Vervollständigungen

## Fehlerbehebung

| Problem                              | Lösung                                                                                                           |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| Docker-Container beendet sich sofort | Logs prüfen: `docker logs tabby`. Wahrscheinlich reicht der VRAM für das Modell nicht aus                        |
| IDE-Erweiterung verbindet sich nicht | Prüfen Sie die Endpunkt-URL, überprüfen Sie Firewall-/Portweiterleitung auf Clore.ai                             |
| Langsame Vervollständigungen         | Verwenden Sie ein kleineres Modell oder stellen Sie sicher, dass die GPU nicht mit anderen Aufgaben geteilt wird |
| `CUDA-Speicher erschöpft`            | Wechseln Sie zu einem kleineren Modell (StarCoder2-3B oder 1B)                                                   |
| Repository-Indizierung hängt fest    | Prüfen Sie den Speicherplatz und stellen Sie sicher, dass auf das Git-Repository zugegriffen werden kann         |
| 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-Marktplatz](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, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/ki-coding-tools/tabby.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.
