jiant NLP toolkit 을 활용하여 2021 국립국어원 인공지능언어능력평가에 맞게 수정하여 사용하였습니다.
모델은 koELECTRA 를 사용하였습니다.
jiant 를 수정한 부분은 아래와 같습니다.
-
ElectraFast 모델/토크나이저 추가 :
- 모듈 : ./jiant/shared/model_resolution.py
- 변수 : TOKENIZER_CLASS_DICT
- ElectraFastTokenizer 추가
- 변수 : TOKENIZER_CLASS_DICT
- 모듈 : ./jiant/proj/main/modeling/primary.py
- 함수 : @JiantTransformersModelFactory.register()
- 모델 등록
- 함수 : @JiantTransformersModelFactory.register()
- 모듈 : ./jiant/shared/model_resolution.py
-
task 데이터셋 로드(NIKL) :
- 모듈 : ./jiant/scripts/download_data/utils.py
- 함수 : convert_hf_dataset_to_examples()
- 데이터셋 로드 변경
- 함수 : convert_hf_dataset_to_examples()
- 모듈 : ./jiant/scripts/download_data/dl_datasets/hf_datasets_tasks.py
- 변수 : HF_DATASETS_CONVERSION_DICT
- task 데이터셋 칼럼요소 변경(cola, copa, wic, boolq)
- 변수 : HF_DATASETS_CONVERSION_DICT
- 모듈 : ./jiant/scripts/download_data/utils.py
-
평가결과 제출(JSON)
- 모듈 : ./jiant/proj/main/components/evaluate.py
- 함수 : write_preds()
- ID, 결과 포멧
- 함수 : write_preds()
- 모듈 : ./jiant/proj/main/components/evaluate.py