Loading...
2022. 10. 25. 13:48

BERT의 Transfer learning 활용 예시 알아보기

1. BERT의 transfer learning pre-training으로 masked language modeling과 next sentence prediction을 동시에 수행한다. pre-training한 BERT는 down stream task를 위해 적절하게 초기화된 가중치를 갖고 이를 바탕으로 여러 task를 수행 2. sentence pair classification & single sentence classification sentence pair classification은 entailment prediction을 생각할 수 있을 것 같고 single sentence classification은 sentiment classification을 생각할 수 있을듯? sentence pair ..

2022. 10. 24. 17:10

현대 NLP 모델의 근간이 되는 BERT의 기본적인 특징

1. pre-trained model은 왜 의미있을까? pre-training과정에서 수행한 up-stream task의 data는 별도의 label이 필요하지 않은 데이터라는 것이 하나의 강점이다. ------------------------------------------------------------------------------------------------------------------------------- 다음 단어를 맞추는 것이 label이 없다고? GPT-1이 수행한 다음 단어를 예측하는 pre-training task는 input sequence와 output sequence가 동일한 task이다. 쉽게 말해 input sequence를 차례대로 읽어들여 input sequenc..

2022. 10. 21. 01:55

괴물 언어모델 GPT-1에서 더 강력해진 GPT-2 파헤치기

1. 기본적인 특징 GPT-1에서 발전된 형태 ‘Just a really big transformer’ 특별한 구조 변경없이 transformer self attention block을 더욱 쌓아올려 모델 크기를 키웠다 pre-train task로 주어진 text의 다음 단어를 맞추는 language modeling “language model은 model의 구조나 parameter를 변경하지 않고도 zero shot setting에서 downstream task를 수행할 수 있다.” 정확히 말하면 훈련 시 다양한 스킬이나 패턴을 인식하는 방법을 학습함으로써 추론 시 downstream task에 빠르게 적응하도록 하는 방법이다. GPT-2에서는 이러한 방법을 "in-context learning" 방식..

2022. 10. 20. 03:47

NLP의 transfer learning 기본 개념(zero shot, one shot, few shot) 익히기

1. transfer learning transfer learning은 특정한 task를 학습한 모델을 다른 원하는 task에 이용하는 모델링 방식을 말한다. 이전에 미리 학습한(pre-training) 모델이 가지고 있는 지식이 원하는 task에서 유용하게 활용될 수 있을 것이라는 기대가 있어서 그렇다. 실제로 사람도 이미 가지고 있는 지식을 바탕으로 전혀 모르는 새로운 학습에 경험이나 노하우 등을 유용하게 써먹잖아 pre-train된 모델을 그대로 사용하거나 목적 task를 위한 작은 layer를 추가하여 학습하는 방식이 바로 transfer learning이다. 2. pre-training for up-stream task pre-training 과정에서 수행하는 task를 특별히 up-stream..

2022. 6. 28. 01:58

NLP의 최신 트렌드 - GPT-1 파헤치기

1. NLP의 최신 트렌드 transformer와 self-attention block은 NLP분야에서 범용적인 encoder,decoder로 역할을 수행하며 좋은 성능을 보였다. 처음 제안된 transformer의 self-attention block은 6개였는데 이제는 12개,24개,... 그 이상으로 더욱 쌓아올려 model을 구성한다. 이렇게 쌓은 모델을 self-supervised learning라는 framework하에 대규모의 train data로 pre-train하여 다양한 NLP task등에 transfer learning로 fine-tuning하는 형태로 활용하는 거대한 모형 BERT,GPT,ELECTRA,ALBERT 등이 등장했다. 이런 거대한 모형의 self-supervised le..

2022. 5. 18. 20:03

transformer의 마지막 encoder-decoder multi head attention

1. encoder-decoder multi head attention decoder의 2번째 attention layer는 특별하게 encoder decoder multi head attention으로 불린다. decoder의 masked self attention 이후 나온 결과는 Query로 들어오고 encoder의 최종 결과로 나오는 hidden vector는 적절하게 변형?되어 key,value로 들어온다 decoder의 query는 encoder가 이해한 맥락정보로부터 받아온 key value중 어떠한 정보에 더 집중할지 attention 연산을 수행하게 된다. 그 후 residual connection, layer normalization을 거치고 나온 결과에 encoder가 그랬던 것처럼 ..