Workspace IndexKnowledge Notes › Attention — the mechanism, and why context costs quadratically

#252PoC

Attention — the mechanism, and why context costs quadratically

Self-attention lets every token weigh every other, which is the transformer's power and its cost — compute grows with the square of context length, the reason long context is expensive.

Not yet scoped.

Why

The PoC visualizes attention on a short sequence and the O(n^2) scaling, connecting the mechanism to why context windows and caching matter downstream.

How it works

Not yet built.

Where it lands in Jayverse

  • Auditor/Number: budget context length instead of "just pass more." Any LLM-based feature (a research assistant, an auditor summarizer) needs an explicit context-length budget and caching strategy documented, since attention cost grows quadratically with context.
  • Number: prefer retrieval/chunking over long-context dumps. When building research tooling around Number's readings, chunk and retrieve relevant history rather than passing full history into one long-context call, given the O(n^2) cost this page names.

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
weigh (every token weigh every other)(모든 토큰이 서로) 비중을 두고 고려하다 · self-attention의 핵심 동작을 설명할 때. "every token weigh every other"
grow with the square of~의 제곱에 비례해 커지다 · 연산량이 문맥 길이의 제곱으로 늘어난다는 뜻. "compute grows with the square of context length"
quadratically제곱(2차)으로, 기하급수적으로 · 문맥이 길어질수록 비용이 비싸지는 이유. "why context costs quadratically"
downstream(이후 단계에) 영향을 미치는, 하류의 · 이 메커니즘이 문맥 창·캐싱 설계에 미치는 영향. "why context windows and caching matter downstream"
visualize(개념·데이터를) 시각화하다 · 짧은 시퀀스에서 attention을 눈으로 보여주는 실습. "visualizes attention on a short sequence"

← All Knowledge Notes · Workspace Index · Top ↑

어텐션 — 그 메커니즘, 그리고 컨텍스트가 제곱으로 비싼 이유

셀프 어텐션은 모든 토큰이 다른 모든 토큰을 저울질하게 하며, 이는 트랜스포머의 힘이자 비용입니다 — 계산이 컨텍스트 길이의 제곱으로 커지고, 긴 컨텍스트가 비싼 이유입니다.

아직 범위 미정.

이 PoC는 짧은 시퀀스에서 어텐션과 O(n^2) 스케일링을 시각화하여, 이 메커니즘을 컨텍스트 창과 캐싱이 하류에서 중요한 이유로 연결합니다.

동작 방식

아직 만들지 않음.

Jayverse에서의 위치

  • Auditor/Number: "그냥 더 넣기"가 아니라 컨텍스트 길이 예산을 정한다. 리서치 어시스턴트, Auditor 요약기 같은 LLM 기반 기능은 어텐션 비용이 컨텍스트 길이에 제곱으로 커지므로 명시적인 컨텍스트 길이 예산과 캐싱 전략을 문서화해야 한다.
  • Number: 롱 컨텍스트 통째 전달 대신 검색/청킹을 쓴다. Number 읽기 자료를 다루는 리서치 툴을 만들 때, 이 페이지가 말하는 O(n²) 비용을 감안해 전체 히스토리를 하나의 롱 컨텍스트 호출에 넣는 대신 관련 부분을 청크로 나눠 검색한다.

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
weigh (every token weigh every other)(모든 토큰이 서로) 비중을 두고 고려하다 · self-attention의 핵심 동작을 설명할 때. "every token weigh every other"
grow with the square of~의 제곱에 비례해 커지다 · 연산량이 문맥 길이의 제곱으로 늘어난다는 뜻. "compute grows with the square of context length"
quadratically제곱(2차)으로, 기하급수적으로 · 문맥이 길어질수록 비용이 비싸지는 이유. "why context costs quadratically"
downstream(이후 단계에) 영향을 미치는, 하류의 · 이 메커니즘이 문맥 창·캐싱 설계에 미치는 영향. "why context windows and caching matter downstream"
visualize(개념·데이터를) 시각화하다 · 짧은 시퀀스에서 attention을 눈으로 보여주는 실습. "visualizes attention on a short sequence"

← 전체 기술 노트 · 워크스페이스 인덱스 · 맨 위 ↑