Loading…
Sentence Transformers in the Hugging Face Hub
Omar Sanseviero, Nils Reimers
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.
Related reading
huggingface.co ·
Welcome spaCy to the Hugging Face Hub
Hugging Face has integrated spaCy pipelines into the Hugging Face Hub to simplify the distribution, testing, and deployment of natural language processing models across the community. More than 60 canonical models from the spaCy 3.1 release are hosted in the spaCy organization, alongside discoverable community pipelines. Users can package and upload models directly through the command line using the spacy-huggingface-hub extension, which auto-generates required metadata and model cards. Hosted pipelines offer direct pip installation from live wheel URLs, interactive browser exploration, and production-ready HTTP endpoints through the Inference API. The platform provides immediate interactive widget support for named entity recognition components, with upcoming support planned for text classification and part-of-speech tagging pipelines.
Omar Sanseviero, Ines Montanihuggingface.co ·
Welcome Stable-baselines3 to the Hugging Face Hub 🤗
Hugging Face announced an official integration with Stable-Baselines3, a popular PyTorch library for training and testing Deep Reinforcement Learning agents across diverse environments like Gym, Atari, MuJoco, and Procgen. The integration enables researchers and developers to host their saved reinforcement learning checkpoints on the Hugging Face Hub and download pre-trained community models. Interacting with the Hub requires installing the huggingface_hub and huggingface_sb3 packages, which supply helper methods for authentication, downloading, and uploading. Practitioners can retrieve checkpoint zip files using the load_from_hub function by providing the target repository identifier and filename before loading them into Stable-Baselines3 algorithms. Furthermore, users authenticated via CLI or notebook login can train policies such as PPO and publish their saved zip files to the Hub using push_to_hub.