DeepSeek-R1 (671B MoE) — Requisiti VRAM, matrice di quantizzazione e guida GPU
DeepSeek-R1 (671B MoE) (DeepSeek, MIT) adotta un’architettura Miscela di esperti (MoE) con 671B parametri residenti (37B attivi per token), 61 livelli e Attenzione latente multi-testa (MLA) con supporto fino a 163,840 token di contesto.
Simulatore interattivo di memoria e contesto per DeepSeek-R1 (671B MoE)
Matrice VRAM per precisione e quantizzazione (contesto 8K / 32K / 128K)
| Precisione / Formato | bpw effettivi | Solo pesi | Totale @ ctx 8K | Totale @ ctx 32K | Totale @ ctx 128K | Fascia consigliata (@ 32K) |
|---|---|---|---|---|---|---|
| FP16 / BF16 | 16.00 bpw | 1249.83 GB | 1289.19 GB | 1290.80 GB | 1297.24 GB | 8× NVIDIA H100 80GB |
| FP8 | 8.50 bpw | 663.97 GB | 685.76 GB | 687.37 GB | 693.80 GB | 8× NVIDIA H100 80GB |
| Q8_0 | 8.50 bpw | 663.97 GB | 685.76 GB | 687.37 GB | 693.80 GB | 8× NVIDIA H100 80GB |
| Q6_K | 6.56 bpw | 512.43 GB | 529.67 GB | 531.28 GB | 537.71 GB | 8× NVIDIA H100 80GB |
| Q5_K_M | 5.69 bpw | 444.47 GB | 459.67 GB | 461.28 GB | 467.71 GB | 8× NVIDIA H100 80GB |
| Q4_K_M | 4.85 bpw | 378.86 GB | 392.09 GB | 393.69 GB | 400.13 GB | 8× NVIDIA H100 80GB |
| AWQ INT4 | 4.50 bpw | 351.52 GB | 363.93 GB | 365.53 GB | 371.97 GB | Mac Studio 512GB |
| IQ4_XS | 4.25 bpw | 331.99 GB | 343.81 GB | 345.42 GB | 351.85 GB | Mac Studio 512GB |
Compatibilità hardware e velocità di decodifica (DeepSeek-R1 (671B MoE) @ Q4_K_M, contesto 32K)
| Fascia hardware | Memoria e banda | Richiesta (32K) | Compatibilità | Velocità decod. stimata |
|---|---|---|---|---|
| RTX 3090 24GB | 24 GB · 936 GB/s | 393.69 GB (1640%) | Memoria esaurita (OOM) | — |
| RTX 4090 24GB | 24 GB · 1008 GB/s | 393.69 GB (1640%) | Memoria esaurita (OOM) | — |
| RTX 5090 32GB | 32 GB · 1792 GB/s | 393.69 GB (1230%) | Memoria esaurita (OOM) | — |
| Apple M-Max 64GB | 64 GB · 546 GB/s | 387.67 GB (606%) | Memoria esaurita (OOM) | — |
| Mac Studio 128GB | 128 GB · 546 GB/s | 387.67 GB (303%) | Memoria esaurita (OOM) | — |
| Mac Studio 192GB | 192 GB · 800 GB/s | 387.67 GB (202%) | Memoria esaurita (OOM) | — |
| NVIDIA A100 80GB | 80 GB · 2039 GB/s | 393.69 GB (492%) | Memoria esaurita (OOM) | — |
| NVIDIA H100 80GB | 80 GB · 3350 GB/s | 393.69 GB (492%) | Memoria esaurita (OOM) | — |
Parametri verificati dell’architettura Transformer
- Checkpoint ID
- deepseek-ai/DeepSeek-R1
- Ollama Tag
- deepseek-r1:671b
- License / Release
- MIT · 2025-Q1
- Topologia e attenzione
- Miscela di esperti (MoE)
- Meccanismo di attenzione
- Attenzione latente multi-testa (MLA)
- Parametri totali (B)
- 671B
- Parametri attivi / token (B)
- 37B
- Livelli nascosti / Dimensione nascosta
- 61 / 7168
- Teste di query / Teste KV
- 128Q / 128KV (d=128)
- MLA kv_lora_rank / rope_dim
- 512 / 64
- MoE Routed Experts
- 8 active / 256 total
- Vocab / Max Position
- 129,280 / 163,840
I formati quantizzati memorizzano fattori di scala per blocco e zero-point accanto ai pesi interi compatti. Un checkpoint GGUF Q4_K_M a 4 bit richiede in media 4.85 bit effettivi per parametro (non 4.00), mentre Q8_0 si attesta a 8.50 bpw. Nei modelli Mixture-of-Experts, tutti gli esperti instradati e condivisi restano residenti in memoria per evitare il paging dall’host a ogni token.
La Grouped-Query Attention standard alloca 2 × L × H_kv × d_head × S × B × bytes_kv lungo i livelli. La Multi-head Latent Attention di DeepSeek (MLA) comprime chiavi e valori in L × (d_kv_lora + d_qk_rope) × S × B × bytes_kv, riducendo di oltre il 90% la memoria sui contesti lunghi. I modelli ibridi a finestra scorrevole limitano i livelli di attenzione locale a min(S, window_size) facendo scalare linearmente con S quelli globali.
Comandi rapidi vLLM e Ollama per DeepSeek-R1 (671B MoE)
vllm serve deepseek-ai/DeepSeek-R1 \
--tensor-parallel-size 8 \
--max-model-len 32768 \
--max-num-seqs 8 \
--gpu-memory-utilization 0.80 \
--kv-cache-dtype fp8 \
--enable-expert-parallel \
--enable-prefix-caching \
--port 8000
# Save as Modelfile, then run: ollama create deepseek-r1-671b-custom -f Modelfile
FROM deepseek-r1:671b
PARAMETER num_ctx 32768
PARAMETER num_batch 512
PARAMETER flash_attn true
# Environment variables for ollama serve:
# OLLAMA_NUM_PARALLEL=8 OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 ollama serve
Confronta modelli affini e di scala simile a pesi aperti
DeepSeek-V3-0324 (671B MoE)
DeepSeek · 671B (MLA)
DeepSeek-R1-Distill-Llama-70B
DeepSeek · 70.6B (GQA)
DeepSeek-R1-Distill-Qwen-32B
DeepSeek · 32.8B (GQA)
Llama 3.1 405B Instruct
Meta Llama · 405B (GQA)
Llama 4 Maverick (400B / 17B-128E MoE)
Meta Llama · 402B (GQA)
Qwen3-235B-A22B (MoE)
Qwen · 235B (GQA)