> 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/language-models/deepseek-v3.md).

# DeepSeek-V3

Clore.ai GPUs पर असाधारण रीजनिंग के साथ DeepSeek-V3 चलाएँ

CLORE.AI GPUs पर असाधारण तर्क क्षमताओं वाले अत्याधुनिक ओपन-सोर्स LLM DeepSeek-V3 को चलाएँ।

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

{% hint style="info" %}
**अपडेट किया गया: DeepSeek-V3-0324 (मार्च 2024)** — DeepSeek-V3 का नवीनतम संशोधन कोड जनरेशन, गणितीय तर्क, और सामान्य समस्या-समाधान में महत्वपूर्ण सुधार लाता है। विवरण के लिए [चेंजलॉग](#whats-new-in-deepseek-v3-0324) अनुभाग देखें।
{% endhint %}

## DeepSeek-V3 क्यों?

* **अत्याधुनिक** - GPT-4o और Claude 3.5 Sonnet से प्रतिस्पर्धा करता है
* **671B MoE** - 671B कुल पैरामीटर, प्रति टोकन 37B सक्रिय (कुशल इन्फरेंस)
* **बेहतर तर्क** - DeepSeek-V3-0324 गणित और कोड में काफी बेहतर है
* **कुशल** - MoE आर्किटेक्चर डेंस मॉडल्स की तुलना में कंप्यूट लागत घटाता है
* **ओपन सोर्स** - MIT लाइसेंस के तहत पूरी तरह खुले वज़न
* **लंबा संदर्भ** - 128K टोकन कॉन्टेक्स्ट विंडो

## DeepSeek-V3-0324 में नया क्या है

DeepSeek-V3-0324 (मार्च 2024 संशोधन) प्रमुख क्षेत्रों में महत्वपूर्ण सुधार लाता है:

### कोड जनरेशन

* **HumanEval पर +8-12%** मूल V3 की तुलना में
* मल्टी-फाइल कोडबेस और जटिल रिफैक्टरिंग कार्यों में बेहतर
* आधुनिक फ्रेमवर्क्स (FastAPI, Pydantic v2, LangChain v0.3) की बेहतर समझ
* छूटे बिना पूर्ण, चलाने योग्य कोड जनरेट करने में अधिक विश्वसनीय

### गणितीय तर्क

* **MATH-500 पर +5%** बेंचमार्क
* चरण-दर-चरण प्रमाण निर्माण में बेहतर
* बहु-चरणीय समस्याओं के लिए बेहतर संख्यात्मक सटीकता
* समाधान के बीच में गलतियों की पहचान और सुधार करने की बेहतर क्षमता

### सामान्य तर्क

* मजबूत तार्किक निष्कर्ष और कारणात्मक अनुमान
* बहु-चरणीय योजना कार्यों में बेहतर
* एज केस और अस्पष्ट प्रॉम्प्ट्स पर अधिक सुसंगत प्रदर्शन
* जटिल, बहु-सीमा वाली रिक्वेस्ट्स पर निर्देशों का पालन करने में सुधार

## CLORE.AI पर त्वरित परिनियोजन

**Docker इमेज:**

```
vllm/vllm-openai:latest
```

**पोर्ट:**

```
22/tcp
8000/http
```

**कमांड (मल्टी-GPU आवश्यक):**

```bash
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V3-0324 \\
    --host 0.0.0.0 \\
    --port 8000 \
    --tensor-parallel-size 8 \\
    --trust-remote-code
```

## अपनी सेवा तक पहुँचना

डिप्लॉयमेंट के बाद, अपना `http_pub` URL यहाँ **मेरे ऑर्डर**:

1. पर जाएँ **मेरे ऑर्डर** पेज
2. अपने ऑर्डर पर क्लिक करें
3. खोजें `http_pub` URL (उदा., `abc123.clorecloud.net`)

उपयोग करें `https://YOUR_HTTP_PUB_URL` की बजाय `localhost` नीचे दिए गए उदाहरणों में।

### सत्यापित करें कि यह काम कर रहा है

```bash
# जाँचें कि सेवा तैयार है या नहीं
curl https://your-http-pub.clorecloud.net/health

# उपलब्ध मॉडल सूचीबद्ध करें
curl https://your-http-pub.clorecloud.net/v1/models

# संस्करण प्राप्त करें
curl https://your-http-pub.clorecloud.net/version
```

{% hint style="warning" %}
**महत्वपूर्ण:** DeepSeek-V3 को आवश्यक है **8x A100 80GB** GPUs और पर्याप्त डाउनलोड समय। मॉडल डाउनलोड होने के दौरान HTTP 502 15-30 मिनट तक बना रह सकता है।
{% endhint %}

## मॉडल वेरिएंट

| मॉडल              | पैरामीटर | सक्रिय | आवश्यक VRAM | HuggingFace                                                                                             |
| ----------------- | -------- | ------ | ----------- | ------------------------------------------------------------------------------------------------------- |
| DeepSeek-V3-0324  | 671B     | 37B    | 8x80GB      | [deepseek-ai/DeepSeek-V3-0324](https://huggingface.co/deepseek-ai/DeepSeek-V3-0324)                     |
| DeepSeek-V3       | 671B     | 37B    | 8x80GB      | [deepseek-ai/DeepSeek-V3](https://huggingface.co/deepseek-ai/DeepSeek-V3)                               |
| DeepSeek-V3-Base  | 671B     | 37B    | 8x80GB      | [deepseek-ai/DeepSeek-V3-Base](https://huggingface.co/deepseek-ai/DeepSeek-V3-Base)                     |
| DeepSeek-V2.5     | 236B     | 21B    | 4x80GB      | [deepseek-ai/DeepSeek-V2.5](https://huggingface.co/deepseek-ai/DeepSeek-V2.5)                           |
| DeepSeek-V2-Lite  | 16B      | 2.4B   | 16GB        | [deepseek-ai/DeepSeek-V2-Lite](https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite)                     |
| DeepSeek-Coder-V2 | 236B     | 21B    | 4x80GB      | [deepseek-ai/DeepSeek-Coder-V2-Instruct](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct) |

## हार्डवेयर आवश्यकताएँ

{% hint style="warning" %}
**Clore.ai marketplace पर multi-GPU 80GB-class rigs सूचीबद्ध नहीं हैं।** आज सूचीबद्ध सबसे बड़े boxes 4× RTX PRO 6000 Blackwell (प्रत्येक 96GB, कुल 380GB) और 8–11× RTX 5090 (प्रत्येक 32GB) हैं। A100 / H200 / B200 क्षमता [bare metal](https://clore.ai/bare-metal) के रूप में अनुरोध पर बेची जाती है। देखें [GPU मूल्य और उपलब्धता](/guides/guides_v2-hi/getting-started/pricing.md) किसी deployment का आकार तय करने से पहले।
{% endhint %}

### पूर्ण परिशुद्धता

| मॉडल             | न्यूनतम       | अनुशंसित     |
| ---------------- | ------------- | ------------ |
| DeepSeek-V3-0324 | 8x A100 80GB  | 8x H100 80GB |
| DeepSeek-V2.5    | 4x A100 80GB  | 4x H100 80GB |
| DeepSeek-V2-Lite | RTX 4090 24GB | A100 40GB    |

### क्वांटाइज़्ड (AWQ/GPTQ)

| मॉडल             | क्वांटाइज़ेशन | VRAM   |
| ---------------- | ------------- | ------ |
| DeepSeek-V3-0324 | INT4          | 4x80GB |
| DeepSeek-V2.5    | INT4          | 2x80GB |
| DeepSeek-V2-Lite | INT4          | 8GB    |

## इंस्टॉलेशन

### vLLM का उपयोग (अनुशंसित)

```bash
pip install vllm==0.7.3

# DeepSeek-V3-0324 (नवीनतम, 8 GPUs)
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V3-0324 \\
    --tensor-parallel-size 8 \\
    --trust-remote-code \
    --host 0.0.0.0 \\
    --port 8000

# मूल V3 (अभी भी उपलब्ध)
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V3 \
    --tensor-parallel-size 8 \\
    --trust-remote-code \
    --host 0.0.0.0 \\
    --port 8000
```

### Transformers का उपयोग

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "deepseek-ai/DeepSeek-V3-0324"

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)

messages = [{"role": "user", "content": "क्वांटम कंप्यूटिंग को सरल शब्दों में समझाएँ."}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)

outputs = model.generate(inputs, max_new_tokens=512, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

### Ollama का उपयोग

```bash
# DeepSeek-V3 खींचें (काफी संसाधन आवश्यक)
ollama pull deepseek-v3

# या हल्का संस्करण
ollama pull deepseek-coder-v2:16b

# चलाएँ
ollama run deepseek-v3
```

## API उपयोग

### OpenAI-संगत API (vLLM)

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="not-needed"
)

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[
        {"role": "system", "content": "आप एक सहायक AI सहायक हैं."},
        {"role": "user", "content": "प्राइम संख्याएँ खोजने के लिए एक Python फ़ंक्शन लिखें."}
    ],
    temperature=0.7,
    max_tokens=1000
)

print(response.choices[0].message.content)
```

### स्ट्रीमिंग

```python
stream = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": "मशीन लर्निंग समझाएँ"}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
```

### cURL

```bash
curl http://localhost:8000/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "deepseek-ai/DeepSeek-V3-0324",
        "messages": [
            {"role": "user", "content": "फ्रांस की राजधानी क्या है?"}
        ],
        "temperature": 0.7
    }'
```

## DeepSeek-V2-Lite (सिंगल GPU)

सीमित हार्डवेयर वाले उपयोगकर्ताओं के लिए:

```bash
# vLLM का उपयोग
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V2-Lite \\
    --trust-remote-code \
    --host 0.0.0.0

# Ollama का उपयोग
ollama run deepseek-coder-v2:16b
```

```python
# सिंगल GPU पर Transformers का उपयोग
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "deepseek-ai/DeepSeek-V2-Lite",
    torch_dtype=torch.float16,
    device_map="cuda",
    trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V2-Lite", trust_remote_code=True)
```

## कोड जनरेशन

DeepSeek-V3-0324 कोड के लिए सर्वोत्तम-श्रेणी का है:

```python
prompt = """एक बाइनरी सर्च ट्री के लिए Python क्लास लिखें, जिसमें:
- insert
- search
- delete
- in-order traversal
टाइप हिंट्स और docstrings शामिल करें."""

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": prompt}],
    temperature=0.2  # कोड के लिए कम
)

print(response.choices[0].message.content)
```

उन्नत कोड कार्य जिनमें V3-0324 उत्कृष्ट है:

```python
# मल्टी-फाइल रिफैक्टरिंग
prompt = """मेरे पास app.py (500 पंक्तियाँ) में सारा कोड वाली एक Flask एप्लिकेशन है।
इसे application factory pattern के साथ blueprints का उपयोग करते हुए रिफैक्टर करें:
- auth (लॉगिन, रजिस्टर, लॉगआउट)
- api (REST endpoints)
- admin (डैशबोर्ड)
पूरा फ़ाइल स्ट्रक्चर और सभी फ़ाइलें दिखाएँ।"""

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": prompt}],
    temperature=0.1,
    max_tokens=4000
)
```

## गणित और तर्क

```python
# जटिल गणितीय समस्या
prompt = """साबित करें कि किसी भी पूर्णांक n >= 1 के लिए, योग 1^2 + 2^2 + ... + n^2 = n(n+1)(2n+1)/6।
गणितीय आगमन का उपयोग करें और सभी चरण स्पष्ट रूप से दिखाएँ।"""

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": prompt}],
    temperature=0.1  # गणित के लिए बहुत कम
)

print(response.choices[0].message.content)
```

## मल्टी-GPU कॉन्फ़िगरेशन

### 8x GPU (पूर्ण मॉडल — V3-0324)

```bash
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V3-0324 \\
    --tensor-parallel-size 8 \\
    --max-model-len 32768 \\
    --gpu-memory-utilization 0.9 \\
    --trust-remote-code
```

### 4x GPU (V2.5)

```bash
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V2.5 \\
    --tensor-parallel-size 4 \
    --max-model-len 16384 \
    --trust-remote-code
```

## प्रदर्शन

### थ्रूपुट (टोकन/सेकंड)

| मॉडल                  | GPU          | संदर्भ | टोकन/सेकंड |
| --------------------- | ------------ | ------ | ---------- |
| DeepSeek-V3-0324      | 8x H100      | 32K    | \~85       |
| DeepSeek-V3-0324      | 8x A100 80GB | 32K    | \~52       |
| DeepSeek-V3-0324 INT4 | 4x A100 80GB | 16K    | \~38       |
| DeepSeek-V2.5         | 4x A100 80GB | 16K    | \~70       |
| DeepSeek-V2.5         | 2x A100 80GB | 8K     | \~45       |
| DeepSeek-V2-Lite      | RTX 4090     | 8K     | \~40       |
| DeepSeek-V2-Lite      | RTX 3090     | 4K     | \~25       |

### पहले टोकन तक का समय (TTFT)

| मॉडल             | कॉन्फ़िगरेशन | TTFT     |
| ---------------- | ------------ | -------- |
| DeepSeek-V3-0324 | 8x H100      | \~750ms  |
| DeepSeek-V3-0324 | 8x A100      | \~1100ms |
| DeepSeek-V2.5    | 4x A100      | \~500ms  |
| DeepSeek-V2-Lite | RTX 4090     | \~150ms  |

### मेमोरी उपयोग

| मॉडल             | सटीकता | आवश्यक VRAM |
| ---------------- | ------ | ----------- |
| DeepSeek-V3-0324 | FP16   | 8x 80GB     |
| DeepSeek-V3-0324 | INT4   | 4x 80GB     |
| DeepSeek-V2.5    | FP16   | 4x 80GB     |
| DeepSeek-V2.5    | INT4   | 2x 80GB     |
| DeepSeek-V2-Lite | FP16   | 20GB        |
| DeepSeek-V2-Lite | INT4   | 10GB        |

## बेंचमार्क

### DeepSeek-V3-0324 बनाम प्रतिस्पर्धा

| Benchmark         | V3-0324 | V3 (मूल) | GPT-4o | Claude 3.5 Sonnet |
| ----------------- | ------- | -------- | ------ | ----------------- |
| MMLU              | 88.5%   | 87.1%    | 88.7%  | 88.3%             |
| HumanEval         | 90.2%   | 82.6%    | 90.2%  | 92.0%             |
| MATH-500          | 67.1%   | 61.6%    | 76.6%  | 71.1%             |
| GSM8K             | 92.1%   | 89.3%    | 95.8%  | 96.4%             |
| LiveCodeBench     | 72.4%   | 65.9%    | 71.3%  | 73.8%             |
| Codeforces रेटिंग | 1850    | 1720     | 1780   | 1790              |

*नोट: V3 → V3-0324 से MATH-500 में सुधार +5.5 प्रतिशत अंक है।*

## Docker Compose

```yaml
version: '3.8'

services:
  deepseek:
    image: vllm/vllm-openai:latest
    ports:
      - "8000:8000"
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    environment:
      - HUGGING_FACE_HUB_TOKEN=${HF_TOKEN}
    command: >
      --model deepseek-ai/DeepSeek-V2-Lite
      --host 0.0.0.0
      --port 8000
      --trust-remote-code
      --gpu-memory-utilization 0.9
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
```

## GPU आवश्यकताओं का सारांश

| उपयोग-प्रकरण           | अनुशंसित सेटअप     | लागत/घंटा |
| ---------------------- | ------------------ | --------- |
| पूर्ण DeepSeek-V3-0324 | 8x A100 80GB       | \~$2.00   |
| DeepSeek-V2.5          | 4x A100 80GB       | \~$1.00   |
| विकास/परीक्षण          | RTX 4090 (V2-Lite) | \~$0.10   |
| प्रोडक्शन API          | 8x H100 80GB       | \~$3.00   |

## लागत का अनुमान

CLORE.AI मार्केटप्लेस की सामान्य दरें:

| GPU कॉन्फ़िगरेशन | प्रति घंटा दर | प्रति दिन दर |
| ---------------- | ------------- | ------------ |
| RTX 4090 24GB    | \~$0.10       | \~$2.30      |
| A100 40GB        | \~$0.17       | \~$4.00      |
| A100 80GB        | \~$0.25       | \~$6.00      |
| 4x A100 80GB     | \~$1.00       | \~$24.00     |
| 8x A100 80GB     | \~$2.00       | \~$48.00     |

*कीमतें प्रदाता के अनुसार बदलती हैं। देखें* [*CLORE.AI मार्केटप्लेस*](https://clore.ai/marketplace) *वर्तमान दरों के लिए।*

**पैसे बचाएँ:**

* का उपयोग करें **स्पॉट** डेवलपमेंट के लिए बाज़ार — लगभग एक-तिहाई सर्वरों की स्पॉट कीमत ऑन-डिमांड से कम होती है (मध्य \~13% छूट), बाकी उसके बराबर हैं
* से भुगतान करें **CLORE** टोकन
* स्केल अप करने से पहले परीक्षण के लिए DeepSeek-V2-Lite का उपयोग करें

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

### मेमोरी समाप्त

```bash
# संदर्भ लंबाई घटाएँ
--max-model-len 8192

# या क्वांटाइज़ेशन का उपयोग करें
--quantization awq

# 12GB GPU पर V2-Lite के लिए
--gpu-memory-utilization 0.85
--max-model-len 4096
```

### मॉडल डाउनलोड धीमा है

```bash
# पहले से डाउनलोड करें
huggingface-cli download deepseek-ai/DeepSeek-V3-0324

# या मिरर का उपयोग करें
export HF_ENDPOINT=https://hf-mirror.com
```

### trust\_remote\_code त्रुटि

```bash
# DeepSeek मॉडलों के लिए हमेशा यह फ़्लैग शामिल करें
--trust-remote-code
```

### मल्टी-GPU काम नहीं कर रहा

```bash
# NCCL जाँचें
nvidia-smi topo -m

# NCCL वेरिएबल्स सेट करें
export NCCL_DEBUG=INFO
export NCCL_P2P_DISABLE=0
```

## DeepSeek बनाम अन्य

| विशेषता      | DeepSeek-V3-0324  | Llama 3.1 405B | Mixtral 8x22B     |
| ------------ | ----------------- | -------------- | ----------------- |
| पैरामीटर     | 671B (37B सक्रिय) | 405B           | 176B (44B सक्रिय) |
| संदर्भ       | 128K              | 128K           | 64K               |
| कोड          | **उत्कृष्ट**      | उत्कृष्ट       | अच्छा             |
| गणित         | **उत्कृष्ट**      | अच्छा          | अच्छा             |
| न्यूनतम VRAM | 8x80GB            | 8x80GB         | 2x80GB            |
| लाइसेंस      | MIT               | Llama 3.1      | Apache 2.0        |

**DeepSeek-V3 का उपयोग करें जब:**

* सर्वश्रेष्ठ तर्क प्रदर्शन की आवश्यकता हो
* कोड जनरेशन मुख्य उपयोग हो
* गणित/तर्क कार्य महत्वपूर्ण हों
* मल्टी-GPU सेटअप उपलब्ध हो
* पूरी तरह ओपन-सोर्स वज़न चाहिए (MIT लाइसेंस)

## अगले चरण

* [vLLM](/guides/guides_v2-hi/language-models/vllm.md) - डिप्लॉयमेंट सर्वर
* [DeepSeek-R1](/guides/guides_v2-hi/language-models/deepseek-r1.md) - तर्क-विशेषीकृत संस्करण
* [DeepSeek Coder](/guides/guides_v2-hi/language-models/deepseek-coder.md) - कोड-विशिष्ट संस्करण
* [Ollama](/guides/guides_v2-hi/language-models/ollama.md) - सरल डिप्लॉयमेंट
* [LLM को फाइन-ट्यून करें](/guides/guides_v2-hi/training/finetune-llm.md) - कस्टम प्रशिक्षण


---

# 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/language-models/deepseek-v3.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.
