DeepSeek · DeepSeek
DeepSeek-V2-Lite
DeepSeek-V2-Lite from DeepSeek has 15,706,484,224 parameters, of which about 2.66B are used for each token (a mixture of experts). Its weights take 31.4 GB in BF16 and about 7.9 GB at 4-bit, and each token of context adds 31.1 KB of KV cache (1.0 GB at 32K tokens).
Part of the DeepSeek family: 15.7B · 671B · 671B
Architecture · VRAM · KV cache · Tensor shapes · Parameter count · FLOPs
Architecture
| Architecture | DeepseekV2ForCausalLM |
|---|---|
| Layers (L) | 27 |
| Hidden size (d) | 2,048 |
| Attention | MLA (multi-head latent attention) |
| Heads | 16 (query/key 128+64, value 128); KV compressed to rank 512 |
| Feed-forward | 64 experts of 1,408, 6 per token, plus 2 shared (SwiGLU); 1 dense layer (layer 0) with FFN 10,944 |
| Vocabulary (V) | 102,400 |
| Tied embeddings | no: separate output head |
| Biases | none |
| Extra norms | pre-norm (RMSNorm before attention and FFN) |
| Max context | 163,840 tokens |
| Weights in the release | bfloat16 |
How much memory the weights need
Each parameter takes 4 bytes in FP32, 2 in BF16, 1 at 8 bits and half a byte at 4 bits, so the weights alone need:
| Precision | Bytes per parameter | Weights | |
|---|---|---|---|
| FP32 | 4 | 62.8 GB | 58.51 GiB |
| BF16 / FP16 | 2 | 31.4 GB | 29.26 GiB |
| INT8 / FP8 | 1 | 15.7 GB | 14.63 GiB |
| INT4 | 0.5 | 7.9 GB | 7.31 GiB |
GB here is 109 bytes; GiB (230) is what tools like nvidia-smi show. Real 4-bit files are a little larger: they also store scales, and some layers are often kept at higher precision. Every expert has to be in memory, not just the active ones: the router picks different experts for each token. A running model also needs its KV cache, activations and the runtime's own buffers.
On common GPUs
Whether the weights plus a 8K-token KV cache fit in 90% of the card (how this is worked out):
KV cache
MLA caches one compressed latent of r_kv = 512 numbers plus a shared RoPE key of h_r = 64 per layer, instead of full keys and values for every head:
L × (r_kv + h_r) × 2 bytes = 27 × (512 + 64) × 2 = 31,104 bytes per token
That is the figure for runtimes that cache the latent (vLLM, SGLang, DeepSeek's own). Code that expands it back to per-head keys and values caches 27 × 16 × (192 + 128) × 2 = 276.5 KB per token.
| Context | KV cache, BF16 | 8-bit KV | Weights + KV, BF16 |
|---|---|---|---|
| 4K | 127 MB | 63.7 MB | 31.5 GB |
| 32K | 1.0 GB | 510 MB | 32.4 GB |
| 128K | 4.1 GB | 2.0 GB | 35.5 GB |
| 160K (max) | 5.1 GB | 2.5 GB | 36.5 GB |
For one sequence. Batching multiplies the KV cache by the number of sequences, not the weights.
Every tensor shape
The names are those in the Hugging Face checkpoint; shapes are [out, in] for weight matrices, as PyTorch stores them. One block is shown: the model repeats it 27 times (in two kinds).
| Tensor | Shape | Parameters |
|---|---|---|
| Embedding | ||
model.embed_tokens.weight | [102,400, 2,048] | 209,715,200 |
| Dense blocks (layer 0): model.layers.N.… | ||
self_attn.q_proj.weight | [3,072, 2,048] | 6,291,456 |
self_attn.kv_a_proj_with_mqa.weightthe latent that is cached, plus one shared RoPE key | [576, 2,048] | 1,179,648 |
self_attn.kv_a_layernorm.weight | [512] | 512 |
self_attn.kv_b_proj.weightexpand the latent to keys and values | [4,096, 512] | 2,097,152 |
self_attn.o_proj.weight | [2,048, 2,048] | 4,194,304 |
mlp.gate_proj.weight | [10,944, 2,048] | 22,413,312 |
mlp.up_proj.weight | [10,944, 2,048] | 22,413,312 |
mlp.down_proj.weight | [2,048, 10,944] | 22,413,312 |
input_layernorm.weight | [2,048] | 2,048 |
post_attention_layernorm.weight | [2,048] | 2,048 |
| MoE blocks (layers 1–26): model.layers.N.… | ||
self_attn.q_proj.weight | [3,072, 2,048] | 6,291,456 |
self_attn.kv_a_proj_with_mqa.weightthe latent that is cached, plus one shared RoPE key | [576, 2,048] | 1,179,648 |
self_attn.kv_a_layernorm.weight | [512] | 512 |
self_attn.kv_b_proj.weightexpand the latent to keys and values | [4,096, 512] | 2,097,152 |
self_attn.o_proj.weight | [2,048, 2,048] | 4,194,304 |
mlp.gate.weightthe router: one score per expert | [64, 2,048] | 131,072 |
mlp.experts.{0…63}.gate_proj.weight | 64 × [1,408, 2,048] | 184,549,376 |
mlp.experts.{0…63}.up_proj.weight | 64 × [1,408, 2,048] | 184,549,376 |
mlp.experts.{0…63}.down_proj.weight | 64 × [2,048, 1,408] | 184,549,376 |
mlp.shared_experts.gate_proj.weightshared expert: runs for every token | [2,816, 2,048] | 5,767,168 |
mlp.shared_experts.up_proj.weightshared expert: runs for every token | [2,816, 2,048] | 5,767,168 |
mlp.shared_experts.down_proj.weightshared expert: runs for every token | [2,048, 2,816] | 5,767,168 |
input_layernorm.weight | [2,048] | 2,048 |
post_attention_layernorm.weight | [2,048] | 2,048 |
| After the last block | ||
model.norm.weightfinal norm | [2,048] | 2,048 |
lm_head.weightscores every token in the vocabulary | [102,400, 2,048] | 209,715,200 |
The parameter count, step by step
Each line gives the formula, the numbers from config.json, and the subtotal. The symbols:
- V
- vocabulary 102,400
- d
- hidden size 2,048
- L
- layers 27
- H
- attention heads 16
- h_n
- query/key size without RoPE 128
- h_r
- RoPE part of query/key 64
- h_v
- value size per head 128
- r_kv
- KV latent rank 512
- f
- FFN hidden size 10,944
- E
- routed experts 64
- k
- experts per token 6
- f_e
- expert FFN size 1,408
1. Embedding
One row of d numbers for each of the V tokens in the vocabulary.
2. Dense blocks (layer 0)
3. MoE blocks (layers 1–26), ×26
4. Final norm and output head
5. Total
6. Active parameters per token
The router sends each token to 6 of the 64 experts in each MoE block, so only those experts' weights are used, plus the shared expert, which every token uses. One routed expert is 8,650,752 parameters.
Hugging Face counts 15,706,484,224 parameters in the deepseek-ai/DeepSeek-V2-Lite safetensors files. The arithmetic above matches exactly.
FLOPs per token
A forward pass costs about two floating-point operations (a multiply and an add) for every weight a token passes through: 2 × N, with N the active weights used in matrix multiplies (the embedding lookup is a read, not a multiply; the output head is a multiply). Here that is 2 × 2,661,150,208 = 5.3 GFLOPs per token.
Attention adds the work of comparing the token with every earlier one: 2 × L × T × H × (hqk + hv) for T tokens of context, which grows with the context while 2N does not.
That is for one new token at position T, as when generating. Averaged over a whole training sequence of length T, each token sees T/2 earlier ones on average, which halves it.
| Context T | 2N | Attention | Total per token |
|---|---|---|---|
| 4K | 5.3 GFLOPs | 1.1 GFLOPs | 6.5 GFLOPs |
| 32K | 5.3 GFLOPs | 9.1 GFLOPs | 14.4 GFLOPs |
| 128K | 5.3 GFLOPs | 36.2 GFLOPs | 41.6 GFLOPs |
| 160K | 5.3 GFLOPs | 45.3 GFLOPs | 50.6 GFLOPs |
Training costs about three times the forward pass per token (6N): the backward pass does roughly twice the forward work.
Compare
DeepSeek-V2-Lite vs Qwen3 30B-A3B · Compare with any model →
Close in size: Qwen2.5 14B 14.8B · DeepSeek-R1-Distill-Qwen-14B 14.8B · Qwen3 14B 14.8B · Phi-4 14.7B · OLMo 2 13B 13.7B
Source
Read from deepseek-ai/DeepSeek-V2-Lite, fetched 2026-12-02.