페이지

2025년 5월 2일 금요일

DistilBERT 기반 클래스들의 작업 유형 정리

DistilBERT 기반 클래스들의 작업 유형 정리

허깅 페이스의 Transformers 라이브러리는 DistilBERT 모델을 기반으로 구체적인 작업을 수행하도록 구현한 클래스들을 제공합니다. 이 문서에서는 이들의 작업 유형, 출력층, 그리고 손실함수들을 표로 정리하였습니다.

작업 구현 클래스

1. DistilBertForMaskedLM

작업 유형 출력층 손실함수
빈 칸의 단어 맞추기 vocab_transform
activation
vocab_layer_norm
vocab_projector
nn.CrossEntropyLoss

2. DistilBertForSequenceClassification

작업 유형 출력층 손실함수
점수 매기기 (예: 호감도) pre_classifer
dropout
classifer
nn.MSELoss
한 개의 라벨 할당 (예: 감정 분석) pre_classifer
dropout
classifer
nn.CrossEntropyLoss
여러 개의 라벨 할당 (예: 문서 태깅) pre_classifer
dropout
classifer
nn.BCEWithLogitsLoss

3. DistilBertForTokenClassification

작업 유형 출력층 손실함수
토큰 분류 (예: 품사 태깅) dropout
classifier
nn.CrossEntropyLoss

4. DistilBertForQuestionAnswering

작업 유형 출력층 손실함수
추출적 질의응답 (지문에서 답 찾기) dropout
qa_outputs
nn.CrossEntropyLoss

5. DistilBertForMultipleChoice

작업 유형 출력층 손실함수
객관식 문제 풀이 pre_classifer
dropout
classifer
nn.CrossEntropyLoss

참고 자료

작업 레시피

Written with StackEdit.

댓글 없음:

댓글 쓰기

잠들기 전의 나와 잠에서 깬 나는 이어지는 나인가?

잠들기 전의 나와 잠에서 깬 나는 이어지는 나인가? 이 글에서, 개체-A: 잠들기 전의 나 개체-B: 잠에서 깬 나 (개체-A의 일부 세포 변화) 의식 이전(transfer) t2 시점에 개체-A의 의식...