texttron / tevatron

Tevatron - A flexible toolkit for neural retrieval research and development.
http://tevatron.ai
Apache License 2.0
515 stars 99 forks source link

Error when training #19

Closed CuongNN218 closed 2 years ago

CuongNN218 commented 2 years ago

I'm trying to train my local checkpoint using vinai/phobert on hugging face hub but I got this problem.

image

How can I solved it?

MXueguang commented 2 years ago

Hi @CuongNN218 ,

try to remove this line and rebuild? https://github.com/texttron/tevatron/blob/8490819d6619ae61acf1542400b8ad7c5b1999e7/src/tevatron/driver/train.py#L111

CuongNN218 commented 2 years ago

@MXueguang Hi something is not correct, right ? It means that I can not load local pretrained model ?

MXueguang commented 2 years ago

you can load the local pretrained model after removing that line. or set model_path=None. The local pretrained model will be loaded already before this line This line here was for recovering a training state iirc, which is not needed. The local pretrained model (in huggingface format) should already been loaded in https://github.com/texttron/tevatron/blob/8490819d6619ae61acf1542400b8ad7c5b1999e7/src/tevatron/driver/train.py#L73

luyug commented 2 years ago

The current design is that general pre-trained models should be loaded from the hub.