Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

koelectra-base-finetuned-nsmc 미작동 이슈 #1

Closed
monologg opened this issue May 14, 2020 · 3 comments
Closed

koelectra-base-finetuned-nsmc 미작동 이슈 #1

monologg opened this issue May 14, 2020 · 3 comments

Comments

@monologg
Copy link
Owner

현재 monologg/koelectra-base-finetuned-nsmc 사용시 해당 에러 발생

RuntimeError: storage has wrong size: expected 0 got 768

local에 저장된 모델로 사용 시 이슈 발생하지 않음. Huggingface s3에서 이슈가 발생한 것으로 예상함.

@monologg
Copy link
Owner Author

s3쪽 이슈를 직접 해결할 수 없어 koelectra-base-finetuned-nsmckoelectra-base-finetuned-sentiment로 이름을 변경하여 재업로드함

@Irenejy93
Copy link

s3쪽 이슈를 직접 해결할 수 없어 koelectra-base-finetuned-nsmckoelectra-base-finetuned-sentiment로 이름을 변경하여 재업로드함
안녕하세요.. koelectra-base-finetuned-nsmc대신, koelectra-base-finetuned-sentiment를 사용해봤는데, nsmc와 다르게 결과가 계속 0.5에 가까운값만 나오는데.. 확인해주실수있나요?

@monologg
Copy link
Owner Author

@Irenejy93

3달 전에 이 모델을 처음 만들 때는 transformers==2.9.0 이었고, ElectraForSequenceClassification이 공식적으로 지원되지 않았습니다.

이에 제가 직접 ElectraForSequenceClassification을 만들어서 사용하였습니다. (code) 그리고 이를 이용하여 학습한 모델이 koelectra-base-finetuned-sentiment 입니다

그러다가 transformers==2.11.0 으로 가면서 ElectraForSequenceClassification 이 공식적으로 라이브러리에서 지원되었는데, 제가 model.py에서 구현한 것과는 형태가 좀 다릅니다 (code)

  • dropout이 2개로 추가됨
  • gelu가 중간중간 사용됨

그럼에도 model.py라는 파일없이 transformers만 있으면 pipeline을 사용할 수 있게 코드를 만들고 싶었고, 이에 transformers에서 구현된 ElectraForSequenceClassification를 이용하여 다시 학습했고, 그 모델이 koelectra-base-finetuned-nsmc 입니다. (때마침 이전에 있던 s3 이슈도 해결되었고요)

결론은 koelectra-base-finetuned-sentimentmodel.py와 같이 쓰셔야 합니다. 현 레포에서는 deprecated입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants