Fórmula KV Cache
1. Split Core vs Embedding/Output Tensor Quantization (GiB)
Emb_Params = 2 × vocab_size × hidden_size Core_Params = Total_Params - Emb_Params Weights_GiB = (Core_Params × (Core_BPW / 8) + Emb_Params × (Emb_BPW / 8)) / 1024³
2. GQA / MQA vs DeepSeek MLA KV-Cache Formula
GQA_KV_Bytes_Per_Token = 2 × num_hidden_layers × num_key_value_heads × head_dim × kv_bytes DeepSeek_MLA_Bytes_Per_Token = num_hidden_layers × (kv_lora_rank[512] + qk_rope_head_dim[64]) × kv_bytes