Overview 이번 포스트에서는 Position encoding에 대해 정리합니다. 'Attention is all you need'에서 제시한 모델인 Transformer에서 사용된 Position encoding은 self-attention이 order independent하기 때문에 모델에게 input token간의 순서를 알려주기 위해 사용되었습니다. 이후 많은 연구에서 기존 position encoding과는 약간 다른 관점에서의 position encoding이 제안되었습니다. 우선, 기존 Transformer 모델에서 활용된 positional encoding의 필요성과 그 개념에 대해 간단히 살펴본 후, T5 저자들이 활용한 relative position encoding에 대해 정리하고..
Positional encoding과 Relative position representation은 어떻게 동작하는가
Overview 이번 포스트에서는 Position encoding에 대해 정리합니다. 'Attention is all you need'에서 제시한 모델인 Transformer에서 사용된 Position encoding은 self-attention이 order independent하기 때문에 모델에게 input token간의 순서를 알려주기 위해 사용되었습니다. 이후 많은 연구에서 기존 position encoding과는 약간 다른 관점에서의 position encoding이 제안되었습니다. 우선, 기존 Transformer 모델에서 활용된 positional encoding의 필요성과 그 개념에 대해 간단히 살펴본 후, T5 저자들이 활용한 relative position encoding에 대해 정리하고..
2023.10.11