Views
No views yet
yoh/distilroberta-base-sept-adapter for distilroberta-basedistilroberta-base model that was trained on the AllNLI, Sentence compression and Stackexchange duplicate question datasets (see information here).adapter-transformers and sentence-transformers:pip install -U adapter-transformers sentence-transformers1from sentence_transformers import SentenceTransformer, models
2
3# Load pre-trained model
4word_embedding_model = models.Transformer("distilroberta-base")
5# Load and activate adapter
6word_embedding_model.auto_model.load_adapter("yoh/distilroberta-base-sept-adapter", source="hf", set_active=True)
7# Create sentence transformer
8pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension(), pooling_mode='mean')
9model = SentenceTransformer(modules=[word_embedding_model, pooling_model])1@article{huang2023adasent,
2 title={AdaSent: Efficient Domain-Adapted Sentence Embeddings for Few-Shot Classification},
3 author={Yongxin Huang and Kexin Wang and Sourav Dutta and Raj Nath Patel and Goran Glavaš and Iryna Gurevych},
4 journal = {ArXiv preprint},
5 url = {https://arxiv.org/abs/2311.00408},
6 volume = {abs/2311.00408},
7 year={2023},
8}