11 분 소요

0. Introduction

Paper link

Model collection

DeepSeek-V4를 “그냥 context를 1M까지 늘린 모델”로만 읽으면 핵심을 놓치기 쉽다. 이 기술 보고서의 진짜 흥미로운 지점은 더 긴 context 자체보다, long-context LLM을 architecture, training infra, post-training, serving design까지 한 번에 다시 짰다는 데 있다.

보고서가 다루는 대상도 꽤 크다. DeepSeek-V4-Pro는 1.6T total params, 49B activated params이고, DeepSeek-V4-Flash는 284B total params, 13B activated params이다. 두 모델 모두 1M token context를 지원한다. 하지만 이 보고서를 leaderboard 문서로만 읽으면 아깝다. 오히려 이 문서는 long-horizon task와 test-time scaling을 현실적인 비용으로 다루기 위해 어떤 stack이 필요한가를 설명하는 system report에 더 가깝다.

한 줄 요약: DeepSeek-V4는 CSA + HCA hybrid attention, mHC, Muon, FP4-aware infra, specialist training + OPD를 묶어 1M token context를 실제 product surface로 끌어오려는 long-context LLM system report다.

이 논문을 지금 볼 가치가 있는 이유는 다음과 같음.

  • long-context를 단순히 RoPE scale이나 context length 숫자 문제가 아니라, attention cost + KV cache + serving interface 문제로 같이 푼다.
  • architecture novelty 하나보다, hybrid attention, training infra, post-training, thinking interface를 함께 설계한 점이 인상적이다.
  • benchmark 결과도 흥미롭지만, 중국어 writing, search, white-collar task, code agent처럼 실사용 시나리오까지 같이 보여준다.

DeepSeek-V4의 핵심 가치는 “더 좋은 long-context benchmark 숫자”보다, million-token context를 실제로 굴리려면 어떤 구조와 운영 디테일이 필요한지 보여준다는 데 있다.

1. Problem Setting

1-1. Problem definition

  • 이 보고서가 겨냥하는 핵심 문제는 vanilla attention의 quadratic cost가 ultra-long context와 long reasoning을 가로막는다는 점이다.
  • 최근 LLM은 reasoning token을 더 많이 쓰고, agent workflow는 더 긴 multi-round context와 더 많은 tool interaction을 요구한다.
  • 이런 상황에서는 prompt length만 길어지는 것이 아니라, decoding 중 누적되는 single-token inference FLOPsaccumulated KV cache가 동시에 병목이 된다.
  • 그래서 문제는 1M token을 넣을 수 있는가가 아니라, 1M token을 감당할 수 있는 architecture와 system을 만들 수 있는가에 가깝다.

1-2. Why previous approaches are insufficient

Bottleneck 왜 문제인가 기존 방식의 한계
Dense attention cost sequence가 길어질수록 compute가 빠르게 커진다 model quality는 좋아도 ultra-long context에서 token당 비용이 너무 크다
KV cache growth long prompt와 long reasoning이 겹치면 memory와 bandwidth가 같이 무거워진다 context length 숫자만 키우면 실제 serving cost는 더 나빠질 수 있다
Long-horizon task retrieval, cross-document analysis, agentic workflow는 짧은 window로는 부족하다 short-context strong model이 바로 long-horizon strong model이 되지 않는다
Product overhead auxiliary task, search trigger, title generation 같은 작은 task도 prefill cost를 만든다 model 본체만 좋아도 product path에서 TTFT와 orchestration cost가 남는다
  • 보고서는 바로 이 점 때문에 long-context를 attention trick 하나로 해결하지 않는다.
  • DeepSeek-V3 계열도 이미 강한 open model이었지만, ultra-long sequence를 다루는 핵심 비효율은 여전히 남아 있었다.
  • 결국 기존 접근의 한계는 성능이 아니라 cost structureproduct surface를 같이 다루지 않았다는 데 있다.

2. Core Idea

2-1. Main contribution

  • 첫째, hybrid attention을 도입한다. CSA는 sequence dimension을 압축한 뒤 sparse attention을 적용하고, HCA는 훨씬 더 aggressive한 compression을 적용한 뒤 dense attention을 유지한다.
  • 둘째, mHC로 residual path를 강화한다. 이건 단순 residual tweak가 아니라, deep stack에서 signal propagation stability를 더 잘 유지하려는 선택이다.
  • 셋째, Muon과 FP4-aware infra를 묶어 training efficiency와 stability를 함께 잡는다.
  • 넷째, post-training을 specialist training과 OPD로 나눠 설계한다. domain별 expert를 따로 키운 뒤, 하나의 unified model로 distill한다.
  • 다섯째, thinking mode, Quick Instruction, thinking-with-tools memory management처럼 사용자 체감 interface까지 논문 안에 포함한다.

2-2. Design intuition

  • 이 보고서의 설계 직관은 꽤 분명하다. long-context는 model 내부 block 하나가 아니라, representation, optimizer, kernel, cache layout, product orchestration가 같이 맞물려야 해결된다는 판단이다.
  • CSA와 HCA는 attention 비용을 줄이는 수단이고, mHC와 Muon은 그렇게 바뀐 architecture를 안정적으로 학습시키는 수단이다.
  • specialist training과 OPD는 broad capability를 한 번에 RL로 밀어붙이기보다, domain specialization과 reunification을 나눠서 푸는 post-training 직관에 가깝다.
  • Quick Instruction과 interleaved thinking은 model benchmark가 아니라 실제 chatbot latency와 tool orchestration 비용을 줄이기 위한 설계다.

DeepSeek-V4의 진짜 기여는 long-context를 architecture paper에서 system paper로 끌어올린 데 있다.

3. Architecture / Method

3-1. Overview

Item Description
Goal 1M token context를 현실적인 FLOPs와 KV cost로 지원하면서 reasoning, code, agent 성능을 유지하거나 끌어올리는 것
Backbone Transformer + DeepSeekMoE + MTP
Key attention CSA + HCA hybrid attention
Stability block mHC
Optimizer Muon for most weights, AdamW for selected modules
Post-training specialist SFT + GRPO, then multi-teacher OPD
Difference from prior work long-context attention, training infra, KV cache design, thinking interface를 한 stack으로 묶는다

3-2. Module breakdown

1) Backbone inherited from DeepSeek-V3

  • 기본 뼈대는 Transformer다.
  • FFN은 DeepSeekMoE를 사용하고, MTP configuration도 유지한다.
  • 다만 DeepSeek-V4에서는 routing score activation을 Sigmoid에서 Sqrt(Softplus)로 바꾸고, 초기 몇 개 block의 dense FFN을 hash-routed MoE로 대체한다.
  • auxiliary-loss-free load balancing을 유지하되, sequence-wise balance loss를 추가해 extreme imbalance를 막는다.

2) Hybrid attention with CSA and HCA

DeepSeek-V4의 핵심은 CSA와 HCA를 interleaved하게 섞는 hybrid attention이다.

  • CSA는 KV cache를 sequence direction으로 압축한 뒤 sparse selection을 수행한다.
  • HCA는 더 큰 compression ratio를 사용하지만 sparse selection 없이 dense attention을 유지한다.
  • 둘 다 sliding window branch를 추가해 local dependency를 보강한다.
  • partial RoPE, attention sink, mixed KV storage까지 같이 들어간다.

아래 정도로 이해하면 구조가 가장 빠르다.

Component Main idea Why it matters
CSA every 4 tokens를 1 compressed entry로 줄이고 sparse top-k selection 수행 long-context에서 compute를 직접 줄인다
HCA every 128 tokens를 1 compressed entry로 줄이고 dense attention 수행 훨씬 강한 compression으로 KV footprint를 더 줄인다
Sliding window branch 최근 token은 uncompressed branch로 따로 본다 local dependency가 무너지지 않게 한다
Mixed KV storage RoPE dims는 BF16, 나머지는 FP8 KV cache 크기를 줄인다

보고서 기준 주요 config는 아래와 같다.

Model Layers Hidden dim CSA top-k HCA compression Window Activated params
V4-Flash 43 4096 512 128 128 13B
V4-Pro 61 7168 1024 128 128 49B
  • Flash와 Pro 모두 CSA compression rate는 4이고, HCA compression rate는 128이다.
  • Pro는 query heads, output groups, expert count가 더 크고, 그만큼 higher-capacity long-context model로 설정된다.

3) mHC and Muon

  • mHC는 기존 residual connection을 강화한 구조다.
  • 보고서는 mHC를 통해 deep stack에서 signal propagation stability를 높인다고 설명한다.
  • 구현 쪽에서는 mHC 때문에 activation memory와 pipeline communication이 늘어나는데, fused kernel과 recomputation으로 wall-time overhead를 1F1B pipeline stage의 6.7 percent 수준으로 묶었다고 설명한다.
  • Optimizer는 Muon을 majority parameters에 적용하고, embedding, prediction head, RMSNorm에는 AdamW를 유지한다.
  • Muon에는 Nesterov trick, hybrid Newton-Schulz iteration, update RMS rescaling을 사용한다.

이 조합의 포인트는 분명하다. attention을 더 복잡하게 만들었으니, 그걸 버티는 residual path와 optimizer를 같이 넣은 것이다.

4) Training and inference infrastructure

이 보고서가 system paper처럼 느껴지는 이유는 architecture block 밖의 내용이 많기 때문이다.

  • fine-grained expert parallel kernel로 communication과 computation을 wave 단위로 overlap한다.
  • TileLang을 써서 빠른 kernel iteration과 runtime efficiency를 같이 가져간다.
  • batch-invariant and deterministic kernel library를 구축해 training과 inference의 bitwise reproducibility를 맞춘다.
  • FP4 quantization-aware training을 expert weights와 CSA indexer QK path에 넣는다.
  • contextual parallelism, tensor-level activation checkpointing, on-disk KV cache storage까지 같이 설계한다.

특히 inference 쪽 KV cache layout이 흥미롭다.

  • CSA/HCA용 classical KV cache와
  • SWA 및 아직 compression-ready가 아닌 tail state를 담는 state cache를 분리한다.

즉 이 논문은 long-context attention block만 설명하는 것이 아니라, compressed attention이 실제 serving cache manager 안에서 어떻게 살아야 하는가까지 보여준다.

5) Post-training, reasoning modes, and product interface

Post-training은 두 단계로 나뉜다.

  1. domain specialist training
  2. multi-teacher OPD
  • specialist stage에서는 SFT 후 GRPO를 적용해 math, coding, agent, instruction following 같은 영역의 expert를 각각 키운다.
  • 이후 OPD에서 student가 teacher distribution을 reverse KL로 distill하면서 하나의 unified policy로 합친다.
  • hard-to-verify task에는 scalar reward model 대신 GRM을 사용하고, actor 자체가 judging capability도 함께 학습하는 방향을 택한다.

또 product-facing 설계도 같이 들어간다.

Feature Main idea Why it matters
Non-think / Think High / Think Max reasoning effort를 mode로 나눈다 task difficulty와 latency budget에 맞춰 모드를 선택할 수 있다
Thinking with tools tool-result round 사이 reasoning trace를 유지한다 long-horizon agent task에서 state reconstruction 비용을 줄인다
Quick Instruction small auxiliary model 대신 special token으로 parallel task를 실행한다 TTFT와 engineering overhead를 줄인다

이 부분은 꽤 중요하다. DeepSeek-V4는 생각을 더 오래 하는 모델이기도 하지만, 동시에 생각 budget을 product interface로 노출한 모델이기도 하다.

4. Training / Data / Recipe

4-1. Data

  • pretraining corpus는 32T tokens 이상이다.
  • 수학, 코드, 웹, long document, multilingual data를 포함한다.
  • long-document data curation을 특히 강조하며, scientific paper와 technical report 같은 academic value가 큰 문서를 우선한다.
  • tokenizer는 DeepSeek-V3 tokenizer를 기반으로 하되, context construction용 special token 몇 개를 추가하고 vocabulary size는 128K를 유지한다.
  • token-splitting과 FIM 전략을 유지하고, sample-level attention masking을 새로 적용한다.

4-2. Training strategy

Flash

Item Value
Training tokens 32T
Peak batch size 75.5M tokens
Peak LR 2.7e-4
End LR 2.7e-5
Sequence schedule 4K -> 16K -> 64K -> 1M
Sparse attention schedule first 1T tokens는 dense attention, 64K부터 sparse attention
MTP loss weight 0.3 for most training, 0.1 near LR decay

Pro

Item Value
Training tokens 33T
Peak batch size 94.4M tokens
Peak LR 2.0e-4
End LR 2.0e-5
Sequence schedule 4K -> 16K -> 64K -> 1M
Sparse attention schedule Flash보다 dense stage를 더 길게 유지한 뒤 two-stage sparse introduction
MTP loss weight Flash와 동일한 schedule

Common recipe

  • AdamW hyper-parameters는 beta1=0.9, beta2=0.95, eps=1e-20, weight_decay=0.1이다.
  • Muon은 momentum 0.95, weight decay 0.1을 사용한다.
  • load balancing bias update speed는 0.001이고, balance loss weight는 0.0001이다.
  • mHC expansion factor는 4, Sinkhorn-Knopp iteration은 20이다.

4-3. Engineering notes

  • Anticipatory Routing은 routing network와 backbone의 synchronous update를 부분적으로 끊어 loss spike를 막는 방법이다. loss spike가 감지되면 short rollback 후 이 mode를 잠깐 켠다.
  • SwiGLU Clamping은 linear component를 [-10, 10], gate component upper bound를 10으로 제한해 outlier를 줄인다.
  • Quick Instruction은 auxiliary task를 위해 별도 small model을 prefill하지 않고, special token을 기존 KV cache 뒤에 붙여 병렬로 처리한다.
  • On-disk KV cache storage는 shared prefix 재사용을 위해 compressed KV를 disk에 저장한다. SWA KV는 full caching, periodic checkpointing, zero SWA caching 중 deployment scenario에 맞는 trade-off를 택한다.
  • full-vocabulary OPD를 위해 teacher logits를 그대로 저장하지 않고 last-layer hidden state를 centralized buffer에 캐시한 뒤 prediction head로 복원한다.

DeepSeek-V4의 인상적인 점은 algorithm보다 이런 infra detail이다. 실제로 million-token context를 서비스하려면 이런 부분이 빠질 수 없다.

5. Evaluation

5-1. Main results

먼저 base model comparison만 봐도 방향이 분명하다.

Benchmark V3.2-Base V4-Flash-Base V4-Pro-Base
MMLU-Pro 65.5 68.3 73.5
Simple-QA verified 28.3 30.1 55.2
HumanEval 62.8 69.5 76.8
LongBench-V2 40.2 44.7 51.5
  • Flash는 activated params가 더 작음에도 V3.2-Base를 여러 benchmark에서 넘는다.
  • Pro는 거의 전 영역에서 더 강한 base model로 올라간다.
  • 즉 이 보고서는 post-training 이전 단계에서도 architecture + data + infra 변경의 효과가 있다는 것을 보여준다.

Frontier model comparison에서 눈에 띄는 selected number는 아래 정도다.

Metric Opus-4.6 Max GPT-5.4 xHigh Gemini-3.1-Pro High V4-Pro Max
SimpleQA-Verified 46.2 45.3 75.6 57.9
GPQA Diamond 91.3 93.0 94.3 90.1
LiveCodeBench 88.8 - 91.7 93.5
Codeforces - 3168 3052 3206
MRCR 1M 92.9 - 76.3 83.5
Terminal Bench 2.0 65.4 75.1 68.5 67.9
SWE Verified 80.8 - 80.6 80.6
Toolathlon 47.2 54.6 48.8 51.8

이 표를 너무 공격적으로 읽으면 안 된다.

  • knowledge benchmark에서는 Gemini-3.1-Pro가 여전히 더 강한 항목이 많다.
  • reasoning과 code에서는 gap이 꽤 줄었고, 일부는 open model 기준으로 매우 강하다.
  • long-context academic task는 강하지만, MRCR 1M 기준으로는 Opus-4.6이 더 높다.
  • agent task는 strong open model 수준이지만 frontier closed model을 전부 넘는 것은 아니다.

실사용 지표도 흥미롭다.

  • Chinese functional writing에서 DeepSeek-V4-Pro는 Gemini-3.1-Pro 대비 62.7 대 34.1 win rate를 기록한다.
  • creative writing에서는 instruction following 60.0, writing quality 77.5 win rate를 기록한다.
  • Chinese white-collar task에서는 Opus-4.6-Max 대비 non-loss rate 63 percent를 보고한다.
  • code agent internal benchmark에서는 Claude Sonnet 4.5를 넘고 Opus 4.5에 근접한다고 보고한다.

5-2. What really matters in the experiments

1) 이 보고서의 핵심 성과는 efficiency curve다

가장 중요한 headline은 benchmark table보다 Figure 1에 더 가깝다.

  • 1M token context에서 V4-Pro는 V3.2 대비 single-token FLOPs 27 percent, KV cache 10 percent 수준이라고 보고한다.
  • V4-Flash는 같은 setting에서 single-token FLOPs 10 percent, KV cache 7 percent 수준이라고 보고한다.

즉 DeepSeek-V4의 main story는 1M context 지원 자체가 아니라, 1M context를 굴릴 때 token cost가 어느 정도까지 내려왔는가다.

2) Knowledge는 아직 frontier closed model과 차이가 남는다

SimpleQA-Verified에서는 57.9로 open model 기준 강하지만, Gemini-3.1-Pro의 75.6과는 차이가 있다. GPQA와 HLE도 마찬가지다. 따라서 DeepSeek-V4를 “모든 영역에서 closed model을 넘은 open model”로 읽으면 과장이다.

3) Code, formal math, and long-horizon usage는 인상적이다

  • LiveCodeBench 93.5
  • Codeforces 3206
  • Putnam-2025 frontier regime 120/120
  • SWE Verified 80.6

이 수치 조합은 단순 chat model보다 reasoning and code system 쪽에 더 큰 무게가 실려 있다는 것을 보여준다.

4) Product surface 평가가 같이 들어간 점이 중요하다

중국어 writing, search, white-collar task, code agent, tool use까지 포함한 것은 이 보고서의 장점이다. 특히 white-collar task에서 task completion과 content quality가 강점으로 나온다는 점은, DeepSeek-V4가 단순 benchmark model이 아니라 실제 문서 작업과 지식 작업을 염두에 둔 모델이라는 신호다.

6. Limitations

  1. architecture가 꽤 복잡하다.
    • 저자들도 스스로 인정하듯, preliminarily validated components와 tricks를 많이 유지한 상태라 구조가 우아하게 정리된 느낌은 아니다.
  2. stability fix의 원리가 아직 충분히 설명되지 않았다.
    • Anticipatory Routing과 SwiGLU Clamping은 효과적이지만, 왜 잘 먹히는지에 대한 원리는 아직 open question에 가깝다.
  3. internal evaluation 비중이 적지 않다.
    • Chinese writing, white-collar task, internal code agent benchmark는 실무적으로 유용하지만, 외부 재현성과 동일 조건 비교는 제한적이다.
  4. long-context와 agent에서 absolute frontier leader는 아니다.
    • MRCR 1M은 Opus-4.6보다 낮고, agent benchmark 일부는 GPT-5.4나 Gemini-3.1-Pro보다 낮다.
  5. paper preview와 current release surface를 조심해서 구분해야 한다.
    • 보고서는 preview version을 설명하고, model collection은 현재 공개된 download surface를 보여준다. 블로그에서 둘을 섞어 쓰면 parameter나 model naming을 혼동하기 쉽다.
  6. 제 관점에서의 추가 caution도 있다.
    • 이 보고서는 너무 많은 moving parts를 한 번에 바꾼다. 그래서 성능 향상이 정확히 어느 모듈에서 얼마나 왔는지 깔끔하게 분해하기는 어렵다.

7. My Take

7-1. Why this matters for my work

  • DeepSeek-V4는 long-context를 다루는 좋은 reference report다.
  • 이유는 간단하다. 보통 long-context 논문은 attention block이나 cache compression trick에 집중하는데, 실제 서비스에서는 kernel, KV layout, tool memory management, search trigger, thinking budget까지 같이 풀어야 한다.
  • DeepSeek-V4는 바로 그 full-stack 문제를 보여준다.
  • document AI, long-horizon agent, large codebase analysis, cross-document RAG를 보는 입장에서는 이 보고서가 benchmark score보다 훨씬 많은 힌트를 준다.

7-2. Reuse potential

  • heterogeneous KV cache design: compressed KV와 state cache를 분리해서 관리하는 발상은 다른 hybrid attention system에도 재사용 가치가 있다.
  • specialist -> distill post-training: broad assistant를 한 번에 RL로 밀지 않고, domain expert를 먼저 만들고 다시 하나로 합치는 구조는 다른 application model에도 그대로 응용 가능하다.
  • Quick Instruction: auxiliary task를 위한 small side model을 따로 두기보다, 기존 KV cache 뒤에 special token을 붙여 처리하는 방식은 product latency 측면에서 꽤 실용적이다.
  • thinking-with-tools context policy: tool call이 있는 대화에서는 reasoning trace를 유지하고, 일반 대화에서는 버리는 policy는 agent system memory design에 참고할 가치가 있다.
  • batch-invariant deterministic kernel: 대규모 training과 post-training에서 reproducibility를 높이려는 태도 자체가 중요하다.

7-3. Follow-up papers

  • DeepSeek-V3 Technical Report
  • DeepSeek-R1
  • mHC: Manifold-Constrained Hyper-Connections
  • Muon 관련 optimizer 논문
  • Jenga, Hymba 같은 hybrid KV cache / hybrid attention serving 논문

8. Summary

  • DeepSeek-V4는 CSA + HCA hybrid attention, mHC, Muon, FP4-aware infra를 묶어 1M token context를 실제로 돌리기 위한 stack을 제시한다.
  • 핵심은 더 긴 context 숫자보다, ultra-long sequence의 FLOPs와 KV cache cost를 실제로 줄인다는 점이다.
  • post-training은 specialist SFT + GRPO 후 OPD로 expert를 다시 합치는 구조를 취한다.
  • benchmark 결과는 strong open model 수준을 넘어서지만, knowledge와 일부 long-context, agent task에서는 frontier closed model과 차이가 남는다.
  • 이 보고서의 가장 큰 가치는 long-context LLM을 architecture paper가 아니라 system paper로 읽게 만든다는 데 있다.

댓글남기기