정의
질의(Q)와 키(K)의 유사도를 점곱으로 구하고, 그 점수를 키 벡터 차원 수의 제곱근으로 나눈 뒤 값(V)에 가중치를 주어 섞는 주의집중 연산이다. 문장이나 이미지의 각 위치가 다른 위치의 정보를 얼마나 참고할지 계산할 때 쓴다.
English · 편집 요약Scaled dot-product attention divides query-key dot-product scores by the square root of the key dimension, then uses the resulting weights to combine values. This is an editorial summary.
사용 예
번역 모델이 현재 단어를 처리하면서 입력 문장의 여러 단어에 서로 다른 가중치를 주어 정보를 모은다.
구별할 점
SDPA는 연산 방식이며 특정 고속 커널이나 전체 트랜스포머 모델의 이름이 아니다. 실제 속도와 메모리 사용량은 구현·입력 크기·장치에 따라 달라진다.
관련 용어
참고 출처
- Ma et al. / arXiv · DIFFLET: A Fast Inference Engine for Diffusion Transformer Models on AWS Trainium (새 창) 확인 2026.10.24
- PyTorch · torch.nn.functional.scaled_dot_product_attention (새 창) 확인 2026.10.24
편집 검수 2026.10.24편집자 확인