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

# Llama 3.3 70B

Führe Metas Llama-3.3-70B-Modell auf Clore.ai-GPUs aus

{% hint style="info" %}
**Neuere Version verfügbar!** Meta veröffentlicht [**Llama 4**](/guides/guides_v2-de/sprachmodelle/llama4.md) im April 2025 mit MoE-Architektur — Scout (17B aktiv, passt auf RTX 4090) liefert ähnliche Qualität bei einem Bruchteil des VRAM. Erwägen Sie ein Upgrade.
{% endhint %}

Metas neuestes und effizientestes 70B-Modell 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 %}

## Warum Llama 3.3?

* **Bestes 70B-Modell** - Erreicht die Leistung von Llama 3.1 405B zu einem Bruchteil der Kosten
* **Mehrsprachig** - Unterstützt 8 Sprachen nativ
* **128K Kontext** - Verarbeitung langer Dokumente
* **Offene Gewichte** - Kostenlos für kommerzielle Nutzung

## Modellübersicht

| Spezifikation  | Wert                           |
| -------------- | ------------------------------ |
| Parameter      | 70B                            |
| Kontextlänge   | 128K Token                     |
| Trainingsdaten | 15T+ Token                     |
| Sprachen       | EN, DE, FR, IT, PT, HI, ES, TH |
| Lizenz         | Llama 3.3 Community-Lizenz     |

### Leistung im Vergleich zu anderen Modellen

| Benchmark    | Llama 3.3 70B | Llama 3.1 405B | GPT-4o |
| ------------ | ------------- | -------------- | ------ |
| MMLU         | 86.0          | 87.3           | 88.7   |
| HumanEval    | 88.4          | 89.0           | 90.2   |
| MATH         | 77.0          | 73.8           | 76.6   |
| Mehrsprachig | 91.1          | 91.6           | -      |

## GPU-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 %}

| Einrichtung      | VRAM   | Leistung  | Kosten                                                    |
| ---------------- | ------ | --------- | --------------------------------------------------------- |
| Q4-quantisiert   | 40 GB  | Gut       | A100 40 GB ([Bare Metal](https://clore.ai/bare-metal))    |
| Q8-quantisiert   | 70GB   | Besser    | A100 80 GB ([Bare Metal](https://clore.ai/bare-metal))    |
| FP16 vollständig | 140 GB | Am besten | 2x A100 80 GB ([Bare Metal](https://clore.ai/bare-metal)) |

**Empfohlen:** A100 40 GB mit Q4-Quantisierung für bestes Preis-/Leistungsverhältnis.

## Schnellbereitstellung auf CLORE.AI

### Mit Ollama (am einfachsten)

**Docker-Image:**

```
ollama/ollama
```

**Ports:**

```
22/tcp
11434/http
```

**Nach der Bereitstellung:**

```bash
ollama pull llama3.3
ollama run llama3.3
```

### Mit vLLM (Produktion)

**Docker-Image:**

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

**Ports:**

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

**Befehl:**

```bash
python -m vllm.entrypoints.openai.api_server \
    --model meta-llama/Llama-3.3-70B-Instruct \
    --tensor-parallel-size 1 \
    --max-model-len 32768 \
    --host 0.0.0.0
```

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

## Installationsmethoden

### Methode 1: Ollama (empfohlen zum Testen)

```bash
# Ollama installieren
curl -fsSL https://ollama.com/install.sh | sh

# Llama 3.3 herunterladen (lädt automatisch die Q4-Version herunter)
ollama pull llama3.3

# Interaktiv ausführen
ollama run llama3.3

# Oder API bereitstellen
ollama serve
```

**API-Nutzung:**

```bash
curl http://localhost:11434/api/generate -d '{
  "model": "llama3.3",
  "prompt": "Erkläre Quantencomputing in einfachen Worten"
}'
```

### Methode 2: vLLM (Produktion)

```bash
pip install vllm

# Einzelne GPU (A100 40 GB mit AWQ-Quantisierung)
python -m vllm.entrypoints.openai.api_server \
    --model casperhansen/llama-3.3-70b-instruct-awq \
    --quantization awq \\
    --max-model-len 16384 \
    --host 0.0.0.0

# Mehrere GPUs (2x A100 für volle Präzision)
python -m vllm.entrypoints.openai.api_server \
    --model meta-llama/Llama-3.3-70B-Instruct \
    --tensor-parallel-size 2 \
    --max-model-len 32768 \
    --host 0.0.0.0
```

**API-Nutzung (OpenAI-kompatibel):**

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")

response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        {"role": "system", "content": "Du bist ein hilfreicher Assistent."},
        {"role": "user", "content": "Schreibe eine Python-Funktion zur Berechnung von Fibonacci-Zahlen"}
    ],
    temperature=0.7,
    max_tokens=1024
)

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

### Methode 3: Transformers + bitsandbytes

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

# 4-Bit-Quantisierungskonfiguration
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16
)

model_id = "meta-llama/Llama-3.3-70B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    quantization_config=bnb_config,
    device_map="auto"
)

# Generieren
messages = [
    {"role": "system", "content": "Du bist ein hilfreicher Coding-Assistent."},
    {"role": "user", "content": "Schreibe einen Python-Web-Scraper mit BeautifulSoup"}
]

input_ids = tokenizer.apply_chat_template(
    messages,
    return_tensors="pt"
).to("cuda")

outputs = model.generate(
    input_ids,
    max_new_tokens=512,
    temperature=0.7,
    do_sample=True
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

### Methode 4: llama.cpp (CPU+GPU-Hybrid)

```bash
# Klonen und bauen
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make LLAMA_CUDA=1

# GGUF-Modell herunterladen
wget https://huggingface.co/bartowski/Llama-3.3-70B-Instruct-GGUF/resolve/main/Llama-3.3-70B-Instruct-Q4_K_M.gguf

# Server starten
./llama-server \
    -m Llama-3.3-70B-Instruct-Q4_K_M.gguf \
    -c 8192 \
    -ngl 80 \
    --host 0.0.0.0 \
    --port 8080
```

## Benchmarks

### Durchsatz (Token/Sekunde)

| GPU           | Q4    | Q8    | FP16  |
| ------------- | ----- | ----- | ----- |
| A100 40GB     | 25-30 | -     | -     |
| A100 80GB     | 35-40 | 25-30 | -     |
| 2x A100 80 GB | 50-60 | 40-45 | 30-35 |
| H100 80 GB    | 60-70 | 45-50 | 35-40 |

### Zeit bis zum ersten Token (TTFT)

| GPU           | Q4        | FP16      |
| ------------- | --------- | --------- |
| A100 40GB     | 0,8-1,2 s | -         |
| A100 80GB     | 0,6-0,9 s | -         |
| 2x A100 80 GB | 0,4-0,6 s | 0,8-1,0 s |

### Kontextlänge vs. VRAM

| Kontext | Q4 VRAM | Q8 VRAM |
| ------- | ------- | ------- |
| 4K      | 38 GB   | 72GB    |
| 8K      | 40 GB   | 75 GB   |
| 16K     | 44 GB   | 80 GB   |
| 32K     | 52 GB   | 90 GB   |
| 64K     | 68 GB   | 110 GB  |
| 128K    | 100 GB  | 150GB   |

## Anwendungsfälle

### Codegenerierung

```python
messages = [
    {"role": "system", "content": "Du bist ein Experte für Programmierung. Schreibe sauberen, effizienten und gut dokumentierten Code."},
    {"role": "user", "content": "Erstelle eine REST-API in FastAPI mit Benutzerauthentifizierung mithilfe von JWT-Token"}
]
```

### Dokumentenanalyse (langer Kontext)

```python
# Langes Dokument laden
with open("large_document.txt") as f:
    document = f.read()

messages = [
    {"role": "system", "content": "Du bist ein Dokumentenanalyst. Liefere eine detaillierte, genaue Analyse."},
    {"role": "user", "content": f"Analysiere dieses Dokument und gib eine Zusammenfassung mit den wichtigsten Punkten:\n\n{document}"}
]
```

### Mehrsprachige Aufgaben

```python
messages = [
    {"role": "system", "content": "Du bist ein mehrsprachiger Assistent."},
    {"role": "user", "content": "Übersetze dies ins Deutsche, Französische und Spanische: 'The quick brown fox jumps over the lazy dog'"}
]
```

### Schlussfolgerung & Analyse

```python
messages = [
    {"role": "system", "content": "Denke Schritt für Schritt. Zeige deine Herleitung."},
    {"role": "user", "content": "Ein Zug verlässt Station A um 9:00 Uhr morgens mit einer Geschwindigkeit von 60 mph. Ein anderer Zug verlässt Station B (300 Meilen entfernt) um 10:00 Uhr morgens in Richtung Station A mit 90 mph. Wann und wo treffen sie sich?"}
]
```

## Optimierungstipps

### Speicheroptimierung

```python
# vLLM mit Speicheroptimierung
python -m vllm.entrypoints.openai.api_server \
    --model casperhansen/llama-3.3-70b-instruct-awq \
    --quantization awq \\
    --gpu-memory-utilization 0.95 \
    --max-model-len 8192
```

### Geschwindigkeitsoptimierung

```python
# Flash Attention aktivieren
python -m vllm.entrypoints.openai.api_server \
    --model meta-llama/Llama-3.3-70B-Instruct \
    --tensor-parallel-size 2 \
    --enable-prefix-caching
```

### Batch-Verarbeitung

```python
# Mehrere Anfragen effizient verarbeiten
responses = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=messages,
    n=4,  # 4 Antworten generieren
    temperature=0.8
)
```

## Vergleich mit anderen Modellen

| Funktion  | Llama 3.3 70B | Llama 3.1 70B | Qwen 2.5 72B | Mixtral 8x22B |
| --------- | ------------- | ------------- | ------------ | ------------- |
| MMLU      | 86.0          | 83.6          | 85.3         | 77.8          |
| Codierung | 88.4          | 80.5          | 85.4         | 75.5          |
| Mathe     | 77.0          | 68.0          | 80.0         | 60.0          |
| Kontext   | 128K          | 128K          | 128K         | 64K           |
| Sprachen  | 8             | 8             | 29           | 8             |
| Lizenz    | Öffnen        | Öffnen        | Öffnen       | Öffnen        |

**Fazit:** Llama 3.3 70B bietet die beste Gesamtleistung seiner Klasse, insbesondere für Codierungs- und Schlussfolgerungsaufgaben.

## Fehlerbehebung

### Speicher erschöpft

```bash
# AWQ-Quantisierung verwenden (am speichereffizientesten)
--model casperhansen/llama-3.3-70b-instruct-awq --quantization awq

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

# Tensorparallelismus verwenden
--tensor-parallel-size 2
```

### Langsame erste Antwort

* Die erste Anfrage lädt das Modell auf die GPU – 30–60 Sekunden warten
* Verwende `--enable-prefix-caching` für schnellere nachfolgende Anfragen
* Mit Dummy-Anfrage vorwärmen

### Hugging-Face-Zugriff

```bash
# Bei HF anmelden (erforderlich für gesperrtes Modell)
huggingface-cli login

# Oder Umgebungsvariable setzen
export HUGGING_FACE_HUB_TOKEN=hf_xxxxx
```

## Kostenschätzung

| Einrichtung | GPU             | $/hour  | Token/$ |
| ----------- | --------------- | ------- | ------- |
| Budget      | A100 40 GB (Q4) | \~$0.17 | \~530K  |
| Ausgewogen  | A100 80 GB (Q4) | \~$0.25 | \~500K  |
| Leistung    | 2x A100 80 GB   | \~$0.50 | \~360K  |
| Maximum     | H100 80 GB      | \~$0.50 | \~500K  |

## Nächste Schritte

* [vLLM-Anleitung](/guides/guides_v2-de/sprachmodelle/vllm.md) - Produktionseinsatz
* [Ollama-Anleitung](/guides/guides_v2-de/sprachmodelle/ollama.md) - Einfache lokale Einrichtung
* [Multi-GPU-Einrichtung](/guides/guides_v2-de/fortgeschritten/multi-gpu-setup.md) - Auf größere Modelle skalieren
* [API-Integration](/guides/guides_v2-de/fortgeschritten/api-integration.md) - Anwendungen erstellen


---

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