인공지능 공부/NLP 연구

(NLP 연구) The Long-Document Transformer 03.03

  • Transformer 공부
    • INPUT

  • Encoder, Maxlength = 6일때
    • Sent1: i am looking for happiness {x1, x2, x3, x4, x5, </s>}

  • Positional Encoding
    • Transformer에는 시간적인 정보를 담아내지 못하기때문에 Positonal Embedding

  • Multi-Head Attention
    • Query

  • Key 동일
  • Value 동일
  • Attention value

  • 값이 커지면 gradient vanishing 문제
  • 끝에 PAD가 있다면 ?

Q x K → Scaled → Pad token masking

Self-Attended 자기자신을 보고 자신이 어디가 중요한지 보게됨

Concat

  • Add & Norm
    • Layer Normalization

  • Feed Forward
    • Relu