The sentence-transformers library can be installed using pip as shown in the following code:
pip install -U sentence-transformers
The researchers of Sentence-BERT have also made their pre-trained Sentence-BERT models available online. All available pre-trained models can be found here: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/.
We can find pre-trained models named bert-base-nli-cls-token, bert-base-nli-mean-token, roberta-base-nli-max-tokens, distilbert-base-nli-mean-tokens, and so on. Let's understand what this means:
- bert-base-nli-cls-token is a pre-trained Sentence-BERT model where we have taken a pre-trained BERT-base model and fine-tuned it with the NLI dataset, and the model uses a [CLS] token as the sentence representation.
- bert-base-nli-mean-token is a pre-trained Sentence-BERT model where we have taken a pre-trained BERT-base model and fine-tuned it with the NLI dataset, and the model...