> 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-hi/ai-1/tabby.md).

# TabbyML कोड पूर्णता

Clore.ai पर निजी GitHub Copilot विकल्प के रूप में TabbyML स्व-होस्ट करें

TabbyML एक self-hosted AI code completion सर्वर है — GitHub Copilot का drop-in replacement, जो आपका कोड पूरी तरह आपकी अपनी infrastructure पर रखता है। Apache 2.0 के अंतर्गत लाइसेंस प्राप्त, यह Clore.ai GPUs पर चलता है और official extensions के जरिए VS Code, JetBrains, और Vim/Neovim से जुड़ता है। मॉडल StarCoder2-1B (4 GB VRAM में फिट), StarCoder2-15B, और सर्वोच्च गुणवत्ता के लिए DeepSeek-Coder तक उपलब्ध हैं।

{% hint style="success" %}
सभी उदाहरण GPU servers पर चलते हैं, जो से किराए पर लिए गए हैं [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

## मुख्य विशेषताएँ

* **Self-hosted Copilot विकल्प** — आपका कोड कभी भी आपके सर्वर से बाहर नहीं जाता
* **Apache 2.0 लाइसेंस** — व्यावसायिक उपयोग के लिए मुफ्त, कोई प्रतिबंध नहीं
* **IDE extensions** — VS Code, JetBrains (IntelliJ, PyCharm, WebStorm), Vim/Neovim
* **कई मॉडल** — StarCoder2 (1B/3B/7B/15B), DeepSeek-Coder, CodeLlama
* **Repository context** — प्रोजेक्ट-समझ वाले completions के लिए RAG-संचालित code retrieval
* **Docker deployment** — GPU support के साथ launch करने के लिए एक ही command
* **Admin dashboard** — usage analytics, model management, user management
* **Chat interface** — autocompletion से आगे बढ़कर coding questions पूछें

## आवश्यकताएँ

| घटक   | न्यूनतम        | अनुशंसित        |
| ----- | -------------- | --------------- |
| GPU   | RTX 3060 12 GB | RTX 3080 10 GB+ |
| VRAM  | 4 GB           | 10 GB           |
| RAM   | 8 GB           | 16 GB           |
| डिस्क | 20 GB          | 50 GB           |
| CUDA  | 12.8+          | 12.8+           |

**Clore.ai pricing:** RTX 3080 ≈ $0.05–0.19/घंटा · RTX 3060 ≈ $0.03–0.07/घंटा

TabbyML हल्का है — यहाँ तक कि RTX 3060 भी तेज inference के साथ StarCoder2-7B चलाता है।

## त्वरित शुरुआत

### 1. Docker के साथ deploy करें

```bash
# GPU पर StarCoder2-7B (गुणवत्ता और गति का अनुशंसित संतुलन)
docker run -d \\
  --name tabby \
  --gpus all \\
  -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby \
  serve \
  --model StarCoder2-7B \
  --device cuda

# सत्यापित करें कि यह चल रहा है
curl http://localhost:8080/v1/health
```

### 2. मॉडल चुनें

| मॉडल                | VRAM    | गति       | गुणवत्ता  | किसके लिए सर्वोत्तम    |
| ------------------- | ------- | --------- | --------- | ---------------------- |
| StarCoder2-1B       | \~3 GB  | सबसे तेज़ | बेसिक     | RTX 3060, तेज drafts   |
| StarCoder2-3B       | \~5 GB  | तेज़      | अच्छा     | सामान्य विकास          |
| StarCoder2-7B       | \~8 GB  | मध्यम     | उच्च      | अनुशंसित डिफ़ॉल्ट      |
| StarCoder2-15B      | \~16 GB | धीमा      | सर्वोत्तम | जटिल codebases         |
| DeepSeek-Coder-6.7B | \~8 GB  | मध्यम     | उच्च      | Python, JS, TypeScript |
| CodeLlama-7B        | \~8 GB  | मध्यम     | अच्छा     | सामान्य प्रयोजन        |

मॉडल बदलने के लिए `--model` flag:

```bash
# कम VRAM के लिए हल्का मॉडल
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve --model StarCoder2-3B --device cuda

# सर्वोत्तम गुणवत्ता के लिए सबसे बड़ा मॉडल
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve --model StarCoder2-15B --device cuda
```

### 3. IDE Extensions इंस्टॉल करें

**VS Code:**

1. Extensions खोलें (Ctrl+Shift+X)
2. "Tabby" खोजें और official extension इंस्टॉल करें
3. Settings खोलें → "Tabby" खोजें
4. server endpoint सेट करें: `http://<your-clore-ip>:8080`

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

1. Settings → Plugins → Marketplace
2. "Tabby" खोजें और इंस्टॉल करें
3. Settings → Tools → Tabby → Server endpoint: `http://<your-clore-ip>:8080`

**Vim/Neovim:**

```vim
" vim-plug का उपयोग करके
Plug 'TabbyML/vim-tabby'

" init.vim / .vimrc में configuration
let g:tabby_server_url = 'http://<your-clore-ip>:8080'
```

### 4. Admin Dashboard तक पहुँचें

खोलें `http://<your-clore-ip>:8080` browser में। dashboard प्रदान करता है:

* Completion usage statistics
* Model status और performance metrics
* User और API token management
* Repository indexing configuration

## उपयोग के उदाहरण

### Repository Context (RAG) जोड़ें

Project-aware completions के लिए अपने repository को index करें:

```bash
# 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 repo को index करता है और context-aware completions के लिए इसका उपयोग करता है
```

### Chat API का उपयोग करें

```bash
curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "CSV files को error handling के साथ parse करने के लिए एक Python function लिखें"}
    ]
  }'
```

### Authentication के साथ चलाएँ

```bash
# admin dashboard के माध्यम से एक auth token जनरेट करें, फिर:
docker run -d --gpus all -p 8080:8080 \
  -v /workspace/tabby-data:/data \
  tabbyml/tabby serve \
  --model StarCoder2-7B \
  --device cuda

# token को अपनी IDE extension settings में सेट करें
# या Authorization header का उपयोग करें:
curl -H "Authorization: Bearer <token>" http://localhost:8080/v1/health
```

### Docker के बिना चलाएँ (Direct Install)

```bash
# Homebrew (Linux) के माध्यम से इंस्टॉल करें
curl -fsSL https://raw.githubusercontent.com/TabbyML/tabby/main/install.sh | bash

# या cargo install
cargo install tabby

# सीधे चलाएँ
tabby serve --model StarCoder2-7B --device cuda --port 8080
```

## लागत तुलना

| समाधान              | मासिक लागत     | Privacy | लेटेंसी  |
| ------------------- | -------------- | ------- | -------- |
| GitHub Copilot      | $19/उपयोगकर्ता | ❌ Cloud | \~200 ms |
| RTX 3060 पर TabbyML | \~$5–9/माह     | ✅ Self  | \~50 ms  |
| RTX 3080 पर TabbyML | \~$9–30/माह    | ✅ Self  | \~30 ms  |
| RTX 4090 पर TabbyML | \~$15–60/माह   | ✅ Self  | \~15 ms  |

एक छोटी टीम (3–5 developers) के लिए, Clore.ai पर एक single RTX 3080 कई Copilot subscriptions की जगह लागत के बहुत छोटे हिस्से में ले सकता है।

## सुझाव

* **StarCoder2-7B सबसे अच्छा विकल्प है** — अधिकांश teams के लिए quality-to-VRAM ratio सबसे अच्छा
* **Repository context सक्षम करें** — RAG indexing बड़े codebases के लिए completion relevance को काफी बेहतर बनाती है
* **पोर्ट 8080 को सुरक्षित रूप से expose करें** — production deployments के लिए SSH tunneling या TLS के साथ reverse proxy का उपयोग करें
* **VRAM usage की निगरानी करें** — `nvidia-smi` यह सुनिश्चित करने के लिए कि model inference batching के लिए headroom के साथ fit हो
* **Completion API का उपयोग करें** CI/CD integration के लिए — code review suggestions को automate करें
* **Tabby कई users को support करता है** — admin dashboard आपको प्रत्येक developer के लिए API tokens बनाने देता है
* **Latency मायने रखती है** — सबसे तेज completions के लिए अपनी टीम के पास भौगोलिक रूप से निकट Clore.ai server चुनें

## समस्या निवारण

| समस्या                                | समाधान                                                                                |
| ------------------------------------- | ------------------------------------------------------------------------------------- |
| Docker container तुरंत बंद हो जाता है | Logs जाँचें: `docker logs tabby`. संभवतः model के लिए VRAM अपर्याप्त है               |
| IDE extension कनेक्ट नहीं हो रही      | Endpoint URL सत्यापित करें, Clore.ai पर firewall/port forwarding जाँचें               |
| धीमी completions                      | छोटा model उपयोग करें, या सुनिश्चित करें कि GPU अन्य tasks के साथ साझा नहीं हो रहा है |
| `CUDA out of memory`                  | एक छोटे model (StarCoder2-3B या 1B) पर स्विच करें                                     |
| Repository indexing अटक गई है         | डिस्क space जाँचें और सुनिश्चित करें कि git repo accessible है                        |
| Auth token अस्वीकार किया गया          | Admin dashboard में token पुनः जनरेट करें, IDE extension अपडेट करें                   |
| दूरस्थ IDE से उच्च latency            | SSH tunnel का उपयोग करें: `ssh -L 8080:localhost:8080 root@<clore-ip>`                |

## संसाधन

* [TabbyML GitHub](https://github.com/TabbyML/tabby)
* [TabbyML Documentation](https://tabby.tabbyml.com)
* [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=TabbyML.vscode-tabby)
* [CLORE.AI मार्केटप्लेस](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-hi/ai-1/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.
