Open Source

Takeaways & discussion about the DeepSeek V4 architecture

DeepSeek V4 swaps residuals for hyper-connections, uses compressed attention streams

Deep Dive

DeepSeek V4's architecture marks a significant departure from both its predecessor V3 and competing models like Qwen3.5+ and Mamba. The hybrid attention mechanism uses compressed sparse attention (CSA) combined with heavily compressed attention (HCA), performing attention on coarser-grain token streams concatenated with sliding window tokens. This keeps all layers attention-based, unlike linear attention or state-space model (SSM) alternatives. The design avoids replacing quadratic attention with linear approximations, instead compressing the token space while retaining full attention mechanics.

Another breakthrough is the replacement of standard residual connections with manifold-constrained hyper-connections, which redesign information flow between transformer blocks. DeepSeek appears to be the only lab to solve training stability issues with this approach and ship it in production. The model also employs FP4 quantization-aware training at frontier scale. For local inference, V4 requires a cluster of the discontinued M3 Ultra 512GB or high-end NVIDIA setups, making V4-Flash and community distillations the more accessible options for most users.

Key Points
  • Hybrid attention uses CSA + HCA instead of pure MLA or SSM, keeping all layers attention-based
  • Manifold-constrained hyper-connections replace standard residual connections, a first in production
  • FP4 QAT training at frontier scale; local inference needs M3 Ultra 512GB cluster or equivalent NVIDIA hardware

Why It Matters

DeepSeek's architectural innovations could redefine transformer efficiency, making frontier AI more accessible via distilled versions.