psnonis / FinBERT

BERT for Finance : UC Berkeley MIDS w266 Final Project
197 stars 62 forks source link

How to load this pretrained FinBERT model using huggingface Pytorch #3

Closed vr25 closed 4 years ago

vr25 commented 4 years ago

I am trying to load the pretrained model at pred/FinBERT-Pre2K_128MSL-500K and trying to run the basic task of SST-2 (sentiment classification) using run_glue.py (https://huggingface.co/transformers/examples.html#glue).

But I run into the following error: OSError: Model name '/data/ftm/xgb_regr/FinBERT/pred/FinBERT-Pre2K_128MSL-250K' was not found in model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased). We assumed '/data/ftm/xgb_regr/FinBERT/pred/FinBERT-Pre2K_128MSL-250K' was a path or url to a configuration file named config.json or a directory containing such a file but couldn't find any such file at this path or url.

Also, since this seems to be trained using TF, I was wondering if I can use PyTorch to load it.

Thanks.

vr25 commented 4 years ago

Also, the symbolic link points to /gold/...I was wondering if that directory can be pushed to this repo. Thanks.

nikita1412 commented 4 years ago

Hi, I am trying to do the same, any success?

vr25 commented 4 years ago

@nikita1412

You can find something similar here.