pydata: Huiming's learning notes

Keep Looking, Don't Settle

MHA和MLA的KV cache比较

KV cache 比较

Setup

  • Model: L layers, hidden dimension \(d\) = 7168, num_heads \(h\) = 128, head_dim \(d_h\) = 128 (so \(d = h × d_h\), for deepseek V3 like setting)
  • MLA latent dimension: \(d_c\) = 512 (compressed KV latent)
  • Sequence: tokens t₁, t₂, ..., t₁₀₀
  • Assume t₁ to t₉₉ are already cached (prefill done). Now we process t₁₀₀ (decode …

DeepSeek V3 MoE

MLA plot

1. Deepseek MoE 的结构

DeepSeek-V3 的 MoE 架构延续并优化了其特有的 DeepSeekMoE 设计,并引入了 无辅助损失的负载均衡(Auxiliary-loss-free Load Balancing 策略。

1. 整体结构公式 …

DeepSeek V3 learning notes

1. What the problem to solve?

When I went back for the Spring Festival, DeepSeek released a new model. For a while, all kinds of media discussed it a lot, almost rising to the height of national destiny. The most important points discussed should be two: the first is the …

DeepSeek V3

1. What the problem to solve?

春节回去的时候正好碰上DeepSeek发布新的模型,一时间各路媒体讨论的沸沸扬扬,几乎上升到国运的高度。讨论的最重要的应 …