princeton-nlp / SimCSE

[EMNLP 2021] SimCSE: Simple Contrastive Learning of Sentence Embeddings https://arxiv.org/abs/2104.08821
MIT License
3.36k stars 507 forks source link

When I replace the model to Huggingface model, the speed of encode becomes too slow. #161

Closed AlfredLiu6 closed 2 years ago

AlfredLiu6 commented 2 years ago

When i replace your sup-simcse-bert-base-uncased into bert-base-uncased from huggingface.co, the speed of encode becomes too slow and keeps warning me "Some weights of the model checkpoint at .. were not used when initializing ..". Then I tried other pre-trained model in huggingface, the problem still exists. I would appreciate it a lot if you could help me solve this problem.

gaotianyu1350 commented 2 years ago

It seems to be a Huggingface package problem. Maybe refer to their issue board/manual?

AlfredLiu6 commented 2 years ago

Thanks a lot, I have solved this problem.