카테고리 없음

끄적끄적(트랜스포머 분류기, 나이브베이즈 분류기, 허깅페이스 바이트 토크나이저)

에멜라 2023. 3. 21. 02:55

https://hipster4020.tistory.com/157

 

Transformer Encoder 카테고리 분류 개발 후기 - 1. Tokenizer

그동안 회사에서 작업했던 30개 카테고리 class 분류 모델 개발 과정 및 삽질 과정을 기록하려고 한다. 전체 프로세스에 대한 공유 목적이자 다시 공부하려는 목적이기도 하다. https://github.com/hipste

hipster4020.tistory.com

트랜스포머 인코더 분류기

 

 

트랜스포머 인코딩에 사용되는 대부분의  input들은 대부분 hugging face 라는데서 사전 학습된 말뭉치들을 받아옴

언어를 ascii  코드 단위로 다 끊고(알파벳) two gram과 유사하게 두 캐릭터씩 뭉쳐서 이를 비트화 해서 토크나이징(빈도 수 체크 후 고빈도 단어들에 대한 원핫 인코딩) 하는 방식인듯 함.

https://huggingface.co/course/chapter6/5?fw=pt 

 

Byte-Pair Encoding tokenization - Hugging Face Course

Byte-Pair Encoding (BPE) was initially developed as an algorithm to compress texts, and then used by OpenAI for tokenization when pretraining the GPT model. It’s used by a lot of Transformer models, including GPT, GPT-2, RoBERTa, BART, and DeBERTa. 💡

huggingface.co