Downloads · 30 days
14
41% of all-time downloads
yoh/distilroberta-base-sept-adapter
distilroberta-base-sept-adapter is a machine learning model from yoh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for adapter-transformers. The card lists the license as apache-2.0.
An adapter for the distilroberta-base model that was trained on the AllNLI, Sentence compression and Stackexchange duplicate question datasets (see information here).
Downloads · 30 days
14
41% of all-time downloads
All-time downloads
34
Public
Repo size
14.2 MB
Likes
1
Public
Click a slice to open those files.
.bin14.2 MB · 100%
From the Hugging Face model README
yoh/distilroberta-base-sept-adapter for distilroberta-baseAn adapter for the distilroberta-base model that was trained on the AllNLI, Sentence compression and Stackexchange duplicate question datasets (see information here).
This adapter was created for usage with the adapter-transformers library. See this paper and repository for more information on the tasks.
First, install adapter-transformers and sentence-transformers:
pip install -U adapter-transformers sentence-transformers
Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. More
Now, the adapter can be loaded and activated like this:
from sentence_transformers import SentenceTransformer, models
# Load pre-trained model
word_embedding_model = models.Transformer("distilroberta-base")
# Load and activate adapter
word_embedding_model.auto_model.load_adapter("yoh/distilroberta-base-sept-adapter", source="hf", set_active=True)
# Create sentence transformer
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension(), pooling_mode='mean')
model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
See this paper
See this paper
@article{huang2023adasent,
title={AdaSent: Efficient Domain-Adapted Sentence Embeddings for Few-Shot Classification},
author={Yongxin Huang and Kexin Wang and Sourav Dutta and Raj Nath Patel and Goran Glavaš and Iryna Gurevych},
journal = {ArXiv preprint},
url = {https://arxiv.org/abs/2311.00408},
volume = {abs/2311.00408},
year={2023},
}