# Sentence Transformers in the Hugging Face Hub

huggingface.co · Omar Sanseviero, Nils Reimers · Jun 28, 2021

**Type:** Announcement

## Summary

Sentence Transformers has collaborated with the Hugging Face Hub as part of its v2 release to make sentence, paragraph, and image embedding models readily accessible. The Hub now hosts over 90 pretrained models supporting more than 100 languages for use cases like semantic search and multilingual zero-shot classification. Alongside direct model loading in minimal code, the platform provides interactive Hub widgets for feature extraction and sentence similarity computation. Developers can execute inference programmatically through Inference API endpoints. Additionally, the library supports direct model uploading to the Hub via save\_to\_hub, which automatically generates a model card detailing layer architecture and dual usage with Sentence Transformers and Transformers.

## Context

Sentence Transformers models for deriving semantically meaningful embeddings across sentences, paragraphs, and images needed better accessibility, sharing mechanisms, interactive demos, and inference tooling for community use.

## Approach / What changed

Integrated Sentence Transformers v2 with the Hugging Face Hub using the huggingface\_hub library, introducing feature-extraction and sentence-similarity widgets, Inference API endpoints, and direct repository uploading via save\_to\_hub with auto-generated model cards.

## Takeaways

- Over 90 pretrained Sentence Transformers models covering more than 100 languages are hosted on the Hugging Face Hub.
- The integration adds two dedicated Hub widgets for feature extraction embeddings and sentence similarity evaluation alongside programmatic Inference API endpoints.
- Calling model.save\_to\_hub automatically creates a Hub repository and model card detailing the architecture layers and usage instructions for both Sentence Transformers and Transformers.

**Tags:** [Machine Learning](https://yomu.fyi/topic/machine-learning), [Open Source](https://yomu.fyi/topic/open-source), [Search](https://yomu.fyi/topic/search)

[Read original post](https://huggingface.co/blog/sentence-transformers-in-the-hub)
