Over the past few weeks, Hugging Face has built collaborations with many open-source frameworks in the machine learning ecosystem. One that stands out is Sentence Transformers, a framework for generating sentence, paragraph, and image embeddings that capture semantic meaning.
With the release of Sentence Transformers v2, users can now access over 90 pre-trained models for more than 100 languages directly from the Hugging Face Hub. Loading and using these models requires just a few lines of code.
Two new widgets have been introduced to the Hub. The first is a feature-extraction widget that displays sentence embeddings. The second, more practical widget computes sentence similarity, a common use case. Additionally, API endpoints are available for programmatic access.
A key feature is the ability to share trained models with the community. Using model.save_to_hub("my_new_model"), a repository is created with an automatically generated model card describing architecture and usage. Models are easily discoverable via filtering for Sentence Transformers.
Future plans include including training and evaluation data in model cards. Users can enable widgets for existing models by updating metadata tags to sentence-transformers and either sentence-similarity or feature-extraction.
For more information, visit www.SBERT.net.