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

# DeepSeek-V3

Führe DeepSeek-V3 mit außergewöhnlichem Reasoning auf Clore.ai-GPUs aus

Führen Sie DeepSeek-V3 aus, das hochmoderne Open-Source-LLM mit außergewöhnlichen Schlussfolgerungsfähigkeiten auf CLORE.AI-GPUs.

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

{% hint style="info" %}
**Aktualisiert: DeepSeek-V3-0324 (März 2024)** — Die neueste Revision von DeepSeek-V3 bringt deutliche Verbesserungen bei der Codegenerierung, dem mathematischen Schlussfolgern und der allgemeinen Problemlösung. Siehe den [Änderungsprotokoll](#whats-new-in-deepseek-v3-0324) Abschnitt für Details.
{% endhint %}

## Warum DeepSeek-V3?

* **Auf dem neuesten Stand der Technik** - Kann mit GPT-4o und Claude 3.5 Sonnet mithalten
* **671B MoE** - 671B Gesamtparameter, 37B aktiv pro Token (effiziente Inferenz)
* **Verbessertes Schlussfolgern** - DeepSeek-V3-0324 ist bei Mathematik und Code deutlich besser
* **Effizient** - Die MoE-Architektur reduziert die Rechenkosten im Vergleich zu dichten Modellen
* **Open Source** - Vollständig offene Gewichte unter MIT-Lizenz
* **Langer Kontext** - 128K-Token-Kontextfenster

## Was ist neu in DeepSeek-V3-0324

DeepSeek-V3-0324 (Revision vom März 2024) bringt in wichtigen Bereichen spürbare Verbesserungen mit sich:

### Codegenerierung

* **+8–12 % bei HumanEval** im Vergleich zum ursprünglichen V3
* Besser bei Codebasen mit mehreren Dateien und komplexen Refactoring-Aufgaben
* Verbessertes Verständnis moderner Frameworks (FastAPI, Pydantic v2, LangChain v0.3)
* Zuverlässiger beim Generieren vollständigen, lauffähigen Codes ohne Auslassungen

### Mathematisches Schlussfolgern

* **+5 % bei MATH-500** Benchmark
* Bessere schrittweise Beweiskonstruktion
* Verbesserte numerische Genauigkeit bei mehrstufigen Problemen
* Erweiterte Fähigkeit, Fehler mitten in der Lösung zu erkennen und zu korrigieren

### Allgemeines Schlussfolgern

* Stärkere logische Deduktion und kausale Inferenz
* Besser bei mehrstufigen Planungsaufgaben
* Konsistentere Leistung bei Randfällen und mehrdeutigen Prompts
* Verbesserte Befolgung von Anweisungen bei komplexen Anfragen mit mehreren Einschränkungen

## Schnellbereitstellung auf CLORE.AI

**Docker-Image:**

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

**Ports:**

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

**Befehl (Multi-GPU erforderlich):**

```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
```

## Auf deinen Dienst zugreifen

Nach der Bereitstellung findest du deine `http_pub` URL in **Meine Bestellungen**:

1. Gehe zu **Meine Bestellungen** Seite
2. Klicke auf deine Bestellung
3. Finde die `http_pub` URL (z. B. `abc123.clorecloud.net`)

Verwende `https://YOUR_HTTP_PUB_URL` anstelle von `localhost` in den folgenden Beispielen.

### Prüfen, ob es funktioniert

```bash
# Prüfen, ob der Dienst bereit ist
curl https://your-http-pub.clorecloud.net/health

# Verfügbare Modelle auflisten
curl https://your-http-pub.clorecloud.net/v1/models

# Version abrufen
curl https://your-http-pub.clorecloud.net/version
```

{% hint style="warning" %}
**Wichtig:** DeepSeek-V3 benötigt **8x A100 80 GB** GPUs und eine erhebliche Downloadzeit. HTTP 502 kann 15–30 Minuten lang bestehen bleiben, während das Modell heruntergeladen wird.
{% endhint %}

## Modellvarianten

| Modell            | Parameter | Aktiv | Erforderlicher 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  | 16 GB               | [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) |

## Hardware-Anforderungen

{% hint style="warning" %}
**Multi-GPU-Rigs der 80GB-Klasse sind auf dem Clore.ai-Marktplatz nicht gelistet.** Die größten heute gelisteten Systeme sind 4× RTX PRO 6000 Blackwell (je 96 GB, 380 GB gesamt) und 8–11× RTX 5090 (je 32 GB). Kapazitäten für A100 / H200 / B200 werden als [Bare Metal](https://clore.ai/bare-metal) auf Anfrage verkauft. Prüfe [GPU-Preise & Verfügbarkeit](/guides/guides_v2-de/erste-schritte/pricing.md) bevor du eine Bereitstellung dimensionierst.
{% endhint %}

### Volle Präzision

| Modell           | Minimum       | Empfohlen    |
| ---------------- | ------------- | ------------ |
| DeepSeek-V3-0324 | 8x A100 80 GB | 8x H100 80GB |
| DeepSeek-V2.5    | 4x A100 80 GB | 4x H100 80GB |
| DeepSeek-V2-Lite | RTX 4090 24GB | A100 40GB    |

### Quantisiert (AWQ/GPTQ)

| Modell           | Quantisierung | VRAM   |
| ---------------- | ------------- | ------ |
| DeepSeek-V3-0324 | INT4          | 4x80GB |
| DeepSeek-V2.5    | INT4          | 2x80GB |
| DeepSeek-V2-Lite | INT4          | 8 GB   |

## Installation

### Mit vLLM (empfohlen)

```bash
pip install vllm==0.7.3

# DeepSeek-V3-0324 (neueste, 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

# Original-V3 (weiterhin verfügbar)
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
```

### Mit 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": "Erkläre Quantencomputing in einfachen Worten."}]
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))
```

### Verwendung von Ollama

```bash
# DeepSeek-V3 abrufen (erfordert erhebliche Ressourcen)
ollama pull deepseek-v3

# Oder leichtere Variante
ollama pull deepseek-coder-v2:16b

# Ausführen
ollama run deepseek-v3
```

## API-Nutzung

### OpenAI-kompatible 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": "Du bist ein hilfreicher KI-Assistent."},
        {"role": "user", "content": "Schreibe eine Python-Funktion, um Primzahlen zu finden."}
    ],
    temperature=0.7,
    max_tokens=1000
)

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

### Streaming

```python
stream = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": "Erkläre maschinelles Lernen"}],
    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": "Was ist die Hauptstadt von Frankreich?"}
        ],
        "temperature": 0.7
    }'
```

## DeepSeek-V2-Lite (Einzel-GPU)

Für Nutzer mit eingeschränkter Hardware:

```bash
# Mit vLLM
python -m vllm.entrypoints.openai.api_server \
    --model deepseek-ai/DeepSeek-V2-Lite \
    --trust-remote-code \
    --host 0.0.0.0

# Mit Ollama
ollama run deepseek-coder-v2:16b
```

```python
# Verwendung von Transformers auf einer einzelnen GPU
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)
```

## Codegenerierung

DeepSeek-V3-0324 ist erstklassig für Code:

```python
prompt = """Schreibe eine Python-Klasse für einen binären Suchbaum mit:
- Einfügen
- Suchen
- Löschen
- In-Order-Traversierung
Typannotationen und Docstrings einschließen."""

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": prompt}],
    temperature=0.2  # Niedriger für Code
)

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

Fortgeschrittene Codeaufgaben, bei denen V3-0324 glänzt:

```python
# Refactoring mehrerer Dateien
prompt = """Ich habe eine Flask-Anwendung, deren gesamter Code in app.py (500 Zeilen) liegt.
Strukturiere sie um, sodass das Application-Factory-Muster mit Blueprints für Folgendes verwendet wird:
- auth (Anmeldung, Registrierung, Abmeldung)
- api (REST-Endpunkte)
- admin (Dashboard)
Zeige die vollständige Dateistruktur und alle Dateien."""

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

## Mathematik & Schlussfolgern

```python
# Komplexes Mathematikproblem
prompt = """Beweise, dass für jede ganze Zahl n >= 1 die Summe 1^2 + 2^2 + ... + n^2 = n(n+1)(2n+1)/6.
Verwende vollständige Induktion und zeige alle Schritte klar auf."""

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V3-0324",
    messages=[{"role": "user", "content": prompt}],
    temperature=0.1  # Sehr niedrig für Mathematik
)

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

## Multi-GPU-Konfiguration

### 8x GPU (Gesamtmodell — 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
```

## Leistung

### Durchsatz (Tokens/Sek.)

| Modell                | GPUs          | Kontext | Tokens/Sek. |
| --------------------- | ------------- | ------- | ----------- |
| DeepSeek-V3-0324      | 8x H100       | 32K     | \~85        |
| DeepSeek-V3-0324      | 8x A100 80 GB | 32K     | \~52        |
| DeepSeek-V3-0324 INT4 | 4x A100 80 GB | 16K     | \~38        |
| DeepSeek-V2.5         | 4x A100 80 GB | 16K     | \~70        |
| DeepSeek-V2.5         | 2x A100 80 GB | 8K      | \~45        |
| DeepSeek-V2-Lite      | RTX 4090      | 8K      | \~40        |
| DeepSeek-V2-Lite      | RTX 3090      | 4K      | \~25        |

### Zeit bis zum ersten Token (TTFT)

| Modell           | Konfiguration | 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  |

### Speichernutzung

| Modell           | Präzision | Erforderlicher 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      | 20 GB               |
| DeepSeek-V2-Lite | INT4      | 10 GB               |

## Benchmarks

### DeepSeek-V3-0324 vs. Konkurrenz

| Benchmark         | V3-0324 | V3 (ursprünglich) | 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-Rating | 1850    | 1720              | 1780   | 1790              |

*Hinweis: Die Verbesserung von MATH-500 von V3 → V3-0324 beträgt +5,5 Prozentpunkte.*

## 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]
```

## Zusammenfassung der GPU-Anforderungen

| Anwendungsfall                 | Empfohlene Einrichtung | Kosten/Stunde |
| ------------------------------ | ---------------------- | ------------- |
| Vollständiges DeepSeek-V3-0324 | 8x A100 80 GB          | \~$2.00       |
| DeepSeek-V2.5                  | 4x A100 80 GB          | \~$1.00       |
| Entwicklung/Testen             | RTX 4090 (V2-Lite)     | \~$0.10       |
| Produktions-API                | 8x H100 80GB           | \~$3.00       |

## Kostenschätzung

Übliche CLORE.AI-Marktplatzpreise:

| GPU-Konfiguration | Stundensatz | Tagessatz |
| ----------------- | ----------- | --------- |
| RTX 4090 24GB     | \~$0.10     | \~$2.30   |
| A100 40GB         | \~$0.17     | \~$4.00   |
| A100 80GB         | \~$0.25     | \~$6.00   |
| 4x A100 80 GB     | \~$1.00     | \~$24.00  |
| 8x A100 80 GB     | \~$2.00     | \~$48.00  |

*Preise variieren je nach Anbieter. Prüfen* [*CLORE.AI-Marktplatz*](https://clore.ai/marketplace) *für aktuelle Preise.*

**Geld sparen:**

* Nutzen Sie den **Spot** Markt für Entwicklung — etwa ein Drittel der Serverpreise liegt im Spot unter dem On-Demand-Preis (Median \~13 % Rabatt), der Rest entspricht ihm
* Bezahlen Sie mit **CLORE** Tokens
* Verwenden Sie DeepSeek-V2-Lite zum Testen, bevor Sie skalieren

## Fehlerbehebung

### Speicher erschöpft

```bash
# Kontextlänge reduzieren
--max-model-len 8192

# Oder Quantisierung verwenden
--quantization awq

# Für V2-Lite auf 12-GB-GPU
--gpu-memory-utilization 0.85
--max-model-len 4096
```

### Langsamer Modell-Download

```bash
# Vorab herunterladen
huggingface-cli download deepseek-ai/DeepSeek-V3-0324

# Oder Mirror verwenden
export HF_ENDPOINT=https://hf-mirror.com
```

### Fehler bei trust\_remote\_code

```bash
# Fügen Sie dieses Flag für DeepSeek-Modelle immer hinzu
--trust-remote-code
```

### Multi-GPU funktioniert nicht

```bash
# NCCL prüfen
nvidia-smi topo -m

# NCCL-Variablen setzen
export NCCL_DEBUG=INFO
export NCCL_P2P_DISABLE=0
```

## DeepSeek vs. andere

| Funktion  | DeepSeek-V3-0324 | Llama 3.1 405B | Mixtral 8x22B    |
| --------- | ---------------- | -------------- | ---------------- |
| Parameter | 671B (37B aktiv) | 405B           | 176B (44B aktiv) |
| Kontext   | 128K             | 128K           | 64K              |
| Code      | **Hervorragend** | Großartig      | Gut              |
| Mathe     | **Hervorragend** | Gut            | Gut              |
| Min. VRAM | 8x80GB           | 8x80GB         | 2x80GB           |
| Lizenz    | MIT              | Llama 3.1      | Apache 2.0       |

**DeepSeek-V3 verwenden, wenn:**

* Beste Schlussfolgerungsleistung benötigt wird
* Codegenerierung der Hauptanwendungsfall ist
* Mathe-/Logikaufgaben wichtig sind
* Eine Multi-GPU-Einrichtung verfügbar ist
* Sie vollständig offene Open-Source-Gewichte (MIT-Lizenz) möchten

## Nächste Schritte

* [vLLM](/guides/guides_v2-de/sprachmodelle/vllm.md) - Bereitstellungsserver
* [DeepSeek-R1](/guides/guides_v2-de/sprachmodelle/deepseek-r1.md) - Auf Schlussfolgern spezialisierte Variante
* [DeepSeek Coder](/guides/guides_v2-de/sprachmodelle/deepseek-coder.md) - Code-spezifische Variante
* [Ollama](/guides/guides_v2-de/sprachmodelle/ollama.md) - Einfachere Bereitstellung
* [LLM feinabstimmen](/guides/guides_v2-de/training/finetune-llm.md) - Anpassungstraining


---

# 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/sprachmodelle/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.
