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

15.7Bparameters
2.66Bactive per token
31.4 GBBF16 weights
7.9 GB4-bit weights
31.1 KBKV per token

Part of the DeepSeek family: 15.7B · 671B · 671B

Architecture · VRAM · KV cache · Tensor shapes · Parameter count · FLOPs

Architecture

ArchitectureDeepseekV2ForCausalLM
Layers (L)27
Hidden size (d)2,048
AttentionMLA (multi-head latent attention)
Heads16 (query/key 128+64, value 128); KV compressed to rank 512
Feed-forward64 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 embeddingsno: separate output head
Biasesnone
Extra normspre-norm (RMSNorm before attention and FFN)
Max context163,840 tokens
Weights in the releasebfloat16

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:

PrecisionBytes per parameterWeights
FP32462.8 GB58.51 GiB
BF16 / FP16231.4 GB29.26 GiB
INT8 / FP8115.7 GB14.63 GiB
INT40.57.9 GB7.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.

Memory calculator

On common GPUs

Whether the weights plus a 8K-token KV cache fit in 90% of the card (how this is worked out):

GPU memoryBF168-bit4-bit
8 GB–––
12 GB––✓
16 GB––✓
24 GB–✓✓
48 GB✓✓✓
80 GB✓✓✓

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.

ContextKV cache, BF168-bit KVWeights + KV, BF16
4K127 MB63.7 MB31.5 GB
32K1.0 GB510 MB32.4 GB
128K4.1 GB2.0 GB35.5 GB
160K (max)5.1 GB2.5 GB36.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).

TensorShapeParameters
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.weight64 × [1,408, 2,048]184,549,376
mlp.experts.{0…63}.up_proj.weight64 × [1,408, 2,048]184,549,376
mlp.experts.{0…63}.down_proj.weight64 × [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.

Embedding
V × d
102,400 × 2,048
= 209,715,200

2. Dense blocks (layer 0)

Attention (MLA)
H·(h_n+h_r) × d + (r_kv+h_r) × d + r_kv + H·(h_n+h_v) × r_kv + d × H·h_v
3,072 × 2,048 + 576 × 2,048 + 512 + 4,096 × 512 + 2,048 × 2,048
= 13,763,072
Feed-forward (SwiGLU)
2 × (f × d) + d × f
2 × (10,944 × 2,048) + 2,048 × 10,944
= 67,239,936
Norms
2 × d
2 × 2,048
= 4,096
One block
attention + feed-forward + norms
13,763,072 + 67,239,936 + 4,096
= 81,007,104

3. MoE blocks (layers 1–26), ×26

Attention (MLA)
H·(h_n+h_r) × d + (r_kv+h_r) × d + r_kv + H·(h_n+h_v) × r_kv + d × H·h_v
3,072 × 2,048 + 576 × 2,048 + 512 + 4,096 × 512 + 2,048 × 2,048
= 13,763,072
Mixture of experts (64 experts, 6 per token)
E × d + 2 × (E × (f_e × d)) + E × (d × f_e) + 2 × (2f_e × d) + d × 2f_e
64 × 2,048 + 2 × (64 × (1,408 × 2,048)) + 64 × (2,048 × 1,408) + 2 × (2,816 × 2,048) + 2,048 × 2,816
= 571,080,704
Norms
2 × d
2 × 2,048
= 4,096
One block
attention + mixture of experts + norms
13,763,072 + 571,080,704 + 4,096
= 584,847,872
26 blocks
26 × block
26 × 584,847,872
= 15,206,044,672

4. Final norm and output head

Final norm + head
d + V × d
2,048 + 102,400 × 2,048
= 209,717,248

5. Total

Total
embedding + blocks + final
209,715,200 + 81,007,104 + 15,206,044,672 + 209,717,248
= 15,706,484,224

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.

Active
total − MoE blocks × (E − k) × expert
15,706,484,224 − 26 × 58 × 8,650,752
= 2,661,150,208

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 T2NAttentionTotal per token
4K5.3 GFLOPs1.1 GFLOPs6.5 GFLOPs
32K5.3 GFLOPs9.1 GFLOPs14.4 GFLOPs
128K5.3 GFLOPs36.2 GFLOPs41.6 GFLOPs
160K5.3 GFLOPs45.3 GFLOPs50.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.