BERT-LS icon indicating copy to clipboard operation
BERT-LS copied to clipboard

How to use other models ?

Open Skylixia opened this issue 4 years ago • 4 comments

Which files should be changed if loading another pretrained bert with pytorch and other fasttext embeddings ?

Skylixia avatar Jul 15 '20 08:07 Skylixia

Check the newest version of transformers document and you can easily solve the problem https://huggingface.co/transformers/serialization.html#from-pretrained-method and if you want to use other embeddings, you may use a package called genism https://radimrehurek.com/gensim/

luxinyu1 avatar Jul 15 '20 09:07 luxinyu1

I have already acquired the model and embeddings I'd like to use and I have read the commands to load them. My question was about the necessary substitutions in this repo to make it work when using different ressources. In other words, which files are dependent on the Bert model and should be adapted, same goes for fasttext.

Skylixia avatar Jul 15 '20 09:07 Skylixia

You could try to adapt cache_dir and wordVecPath in LSBert1.py

luxinyu1 avatar Jul 15 '20 09:07 luxinyu1

you can change the path of your file in "run_LSBert1.sh" or "run_LSBert2.sh" file.

qiang2100 avatar Jul 16 '20 12:07 qiang2100