C.W.K.
Stream
Lesson 05 of 05 · published

Efficient Attention 으로 충분할 때

~12 min · decision-guide, production

Level 0Observer
0 XP0/50 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

실용적 가이드라인

2025 research 와 production 경험 기반, efficient attention 이 옳은 답일 때:

  • 32K 토큰 미만 일반 NLP, quality priority: 표준 Transformer + FlashAttention-3 + GQA. 최적화된 baseline 이 너무 강해서 다른 거로 switch 가 절약하는 것보다 더 cost.
  • Enterprise long-context (legal, medical, code) 32–128K: best cost-quality balance 위한 SSM-attention hybrid (Jamba, Nemotron-H, Granite 4.0). Sparse attention 만으로 cost gap 못 cover 할 수 있어.
  • Edge / on-device serving 가변 context: constant-memory 추론 위한 pure SSM 또는 RWKV.
  • Frontier reasoning 워크로드 (복잡한 수학, multi-step logic, tool 사용): cost 에도 불구하고 recall quality 가 non-negotiable 인 pure Transformer.
  • 매우 긴 문서에 대한 long-context summarization 또는 retrieval quality near-parity 수용 가능: Kimi Linear-class linear attention, 또는 maturity 원하면 sliding window.

Crossover point

SSM/hybrid 가 paper-FLOP 아닌 real wall-clock latency 에서 Transformer 이기기 시작하는 crossover 가 약 20–30K 토큰. 그 미만, 최적화된 Transformer (FA3 + GQA + sliding window) 가 실제 더 빨라 — 더 좋은 constant factor, 더 mature kernel 구현, 더 battle-tested tooling. 32K 위에서, alternative 가 빠르게 ground 얻어. 128K 면 차이가 결정적.

결정 전 sequence length distribution 알아

Architecture-shopping 전 single 가장 중요한 측정은 워크로드의 sequence length distribution. P95 input length 가 4K 토큰이면, alternative 가 중요한 regime 에 절대 안 hit — efficiency 원하면 Transformer + sparse attention 골라, 단순함 원하면 그냥 default Transformer. P95 가 64K 면, 선택이 중요한 regime 에 있고 벤치마크 해야.

대부분 팀이 워크로드가 실제 필요로 하는 게 아닌 literature 에서 exciting 한 거 기준으로 architecture 선택. 그 팀 되지 마. boring "우리 request 의 99% 가 8K 미만" 이 이 quest 분량 alternative 전부 무시하고 영원히 FA3+GQA 머무르는 totally legitimate 한 이유.

External links

Exercise

팀의 실제 prompt (또는 어떤 LLM API 의 본인 사용) 의 representative sample 가져와서 tokenize. 토큰 length 의 P50, P90, P95, P99 계산. 이제 위 추천 표 보고 distribution 이 어떤 architecture lane 에 두는지 결정. P99 가 6K 면, post-Transformer architecture 완전 worry 멈춰도 OK. P99 가 200K 면, 진짜 결정해야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.