Trans-Encoder: Unsupervised sentence-pair modelling through self- and mutual-distillations
Paper • 2109.13059 • Published
How to use cambridgeltl/trans-encoder-bi-simcse-bert-base with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="cambridgeltl/trans-encoder-bi-simcse-bert-base") # Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cambridgeltl/trans-encoder-bi-simcse-bert-base")
model = AutoModel.from_pretrained("cambridgeltl/trans-encoder-bi-simcse-bert-base")# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("cambridgeltl/trans-encoder-bi-simcse-bert-base")
model = AutoModel.from_pretrained("cambridgeltl/trans-encoder-bi-simcse-bert-base")YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
language: en
tags:
An unsupervised sentence encoder (bi-encoder) proposed by Liu et al. (2021). The model is trained with unlabelled sentence pairs sampled from STS2012-2016, STS-b, and SICK-R, using princeton-nlp/unsup-simcse-bert-base-uncased as the base model. Please use [CLS] (before pooler) as the representation of the input.
@article{liu2021trans,
title={Trans-Encoder: Unsupervised sentence-pair modelling through self-and mutual-distillations},
author={Liu, Fangyu and Jiao, Yunlong and Massiah, Jordan and Yilmaz, Emine and Havrylov, Serhii},
journal={arXiv preprint arXiv:2109.13059},
year={2021}
}
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="cambridgeltl/trans-encoder-bi-simcse-bert-base")