richarddwang / electra_pytorch

Pretrain and finetune ELECTRA with fastai and huggingface. (Results of the paper replicated !)
325 stars 42 forks source link

Error: `ELECTRAModel` object has no attribute `to_native_fp16` #16

Closed PhilipMay closed 3 years ago

PhilipMay commented 3 years ago

Hi, after installing the python packages like you say I am getting this error: ELECTRAModel object has no attribute to_native_fp16

For details see screenshot below (sorry, I can not copy text - just do screenshots in that environment).

grafik

richarddwang commented 3 years ago

fastai has renamed to_native_fp16 to to_fp16. I have commited a change to requirements.txt, you can either modify the method name yourself or downgrade fastai to the version specified in requirements.txt

Feel free to tag me if you still have the same problem.