Open ogencoglu opened 4 years ago
The flow is the following.
When you call:
model = SentenceTransformer('model_name')
Then it will perform the following steps: 1) Is there a folder with the name 'model_name'? Yes, then try to load the model from there. 2) If there is no folder, check if there is a pre-trained model at https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/. If no, output a warning and go to the next step 3) If there is no pre-trained model on our server, check if the model is at https://huggingface.co/models. If yes, create an AutoModel and a mean pooling layer with that model.
Step 3) was added in the latest version.
In the previous version:
model = SentenceTransformer('bert-base-uncased')
was leading to an error, as there is no bert-base-uncased model on our server.
In the new version, it will load 'bert-base-uncased' with mean pooling.
The logic behind this is:
SentenceTransformer('bert-base-uncased')
was throwing an exception and people wondered why. Now, it will load bert-base-uncased with mean pooling. They can then use SentenceTransformer('bert-base-uncased')
and fine-tune it on their data.What I could add, to avoid the points you mention, are the following:
Thanks for the swift reply. Solutions you provided sound relevant indeed.
Checking the latest (v0.3.5) release notes:
What is the logic behind this? This sounds like an unnecessary babysitting that can cause severe academic reproducibility issues, especially for programming beginners. One may be new to programming, python, etc. and may have an impression that they are using a sentence transformer model while in fact they are not. Several academic publications have been invalidated due to similar kind of behavior in other libraries and fields.