v2.0.0 - Integration into Huggingface Model Hub
Models hosted on the hub
All pre-trained models are now hosted on the Huggingface Models hub.
Our pre-trained models can be found here: https://huggingface.co/sentence-transformers
But you can easily share your own sentence-transformer model on the hub and have other people easily access it. Simple upload the folder and have people load it via:
model = SentenceTransformer('[your_username]/[model_name]')
For more information, see: Sentence Transformers in the Hugging Face Hub
Breaking changes
There should be no breaking changes. Old models can still be loaded from disc. However, if you use one of the provided pre-trained models, it will be downloaded again in version 2 of sentence transformers as the cache path has slightly changed.
Find sentence-transformer models on the Hub
You can filter the hub for sentence-transformers models: https://huggingface.co/models?filter=sentence-transformers
Add the sentence-transformers
tag to you model card so that others can find your model.
Widget & Inference API
A widget was added to sentence-transformers models on the hub that lets you interact directly on the models website:
https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2
Further, models can now be used with the Accelerated Inference API: Send you sentences to the API and get back the embeddings from the respective model.
Save Model to Hub
A new method was added to the SentenceTransformer
class: save_to_hub
.
Provide the model name and the model is saved on the hub.
Here you find the explanation from transformers how the hub works: Model sharing and uploading
Automatic Model Card
When you save a model with save
or save_to_hub
, a README.md
(also known as model card) is automatically generated with basic information about the respective SentenceTransformer model.
New Models
- Several new sentence embedding models have been added, which are much better than the previous model: Sentence Embedding Models
- Some new models for semantic search based on MS MARCO have been added: MSMARCO Models
- The training script for these MS MARCO models have been released as well: Train MS MARCO Bi-Encoder v3