허깅 페이스의 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 |
참고 자료
작업 레시피
- Masked language modeling
- Text classification
- Token classification
- Question answering
- Multiple choice
Written with StackEdit.
댓글 없음:
댓글 쓰기