Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
Transformers
xlm-roberta
feature-extraction
text-embeddings-inference
Instructions to use clips/mfaq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use clips/mfaq with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("clips/mfaq") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use clips/mfaq with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("clips/mfaq") model = AutoModel.from_pretrained("clips/mfaq") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -95,4 +95,13 @@ with torch.no_grad():
|
|
| 95 |
|
| 96 |
# Perform pooling. In this case, max pooling.
|
| 97 |
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
```
|
|
|
|
| 95 |
|
| 96 |
# Perform pooling. In this case, max pooling.
|
| 97 |
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
## Citation information
|
| 101 |
+
```
|
| 102 |
+
@InProceedings{mfaq_a_multilingual_dataset,
|
| 103 |
+
title={MFAQ: a Multilingual FAQ Dataset},
|
| 104 |
+
author={Maxime {De Bruyn} and Ehsan Lotfi and Jeska Buhmann and Walter Daelemans},
|
| 105 |
+
year={2021}
|
| 106 |
+
}
|
| 107 |
```
|