ImportError: cannot import name 'BERT_PRETRAINED_MODEL_ARCHIVE_MAP'
MedSao opened this issue · 5 comments
First of all, I would thank you for your work.
I have read you paper about "BERT-of-Theseus", and found it very amazing and good written.
After Fine tuning BERT on the MRPC GLUE task, I tried to compress it using 'BERT-of-Theseus' technique, But unfortunately getting the following error:
"ImportError: cannot import name 'BERT_PRETRAINED_MODEL_ARCHIVE_MAP'".
I wish if you have any idea to fix this!
thank you a lot.
Thanks for your interest in our work!
This error is caused by the API change of huggingface/transformers. Please use an earlier version like transformers==2.1.0
Please don't hesitate to ask if you have any further questions.
I believe what makes you confused there is mainly because of the mathematical equations. I think maybe reading the code is more helpful.
Thank you very much for you Answers. I will check the code.
All the best.
With transformers==2.1.0, I got ImportError: cannot import name 'get_linear_schedule_with_warmup' from 'transformers' (/home/user/.pyenv/versions/env-wbGhSO8R-py3.7/lib/python3.7/site-packages/transformers/__init__.py)
@liebkne Sorry for that. I don't actually remember which version of transformers
is compatible either. Please try 2.2.0
to 2.4.0
. If you find a compatible version, please report it here so I can put it into README. Thanks.