Closed aszhanghuali closed 4 years ago
Hi @aszhanghuali The training_nli_bert.py script just trains a new model. You can then use this model to generate sentence embeddings.
Training a model by yourself is not required, you can use one of the many available pre-trained models.
See this script how to generate sentence embeddings: https://github.com/UKPLab/sentence-transformers/blob/master/examples/basic_embedding.py
Best Nils
Hello,
Tried basic_embedding.py but it failed to find the model 'bert-base-nli-mean-tokens'. Details of the error are below. Could you please help in resolving this
FileNotFoundError Traceback (most recent call last)
You can find the models here: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/
Download them and unzip. Then change: model = SentenceTransformer('path/to/unzipped/model-folder')
The code is not that well tested for Windows, as a lot of frameworks have sadly only limited support for Windows.
Best Nils Reimers
Thanks for your swift response :)
Hi!I just ask how to get sentence embeddings ?I have run training_nli_bert.py, but did not generate embeddings.