Sentence Similarity
sentence-transformers
Safetensors
Transformers
bert
feature-extraction
text-embeddings-inference
Instructions to use sergioburdisso/space-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sergioburdisso/space-2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sergioburdisso/space-2") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use sergioburdisso/space-2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("sergioburdisso/space-2") model = AutoModel.from_pretrained("sergioburdisso/space-2") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ Model from the paper ["SPACE-2: Tree-Structured Semi-Supervised Contrastive Pre-
|
|
| 14 |
|
| 15 |
This a port of the original [SPACE-2 model](https://github.com/AlibabaResearch/DAMO-ConvAI/tree/main/space-2) using authors' original [space2hug.py](https://github.com/AlibabaResearch/DAMO-ConvAI/blob/main/space-2/tools/space2hug.py) convertion script.
|
| 16 |
|
| 17 |
-
This is a [sentence-transformers](https://www.SBERT.net)
|
| 18 |
|
| 19 |
|
| 20 |
## Usage (Sentence-Transformers)
|
|
|
|
| 14 |
|
| 15 |
This a port of the original [SPACE-2 model](https://github.com/AlibabaResearch/DAMO-ConvAI/tree/main/space-2) using authors' original [space2hug.py](https://github.com/AlibabaResearch/DAMO-ConvAI/blob/main/space-2/tools/space2hug.py) convertion script.
|
| 16 |
|
| 17 |
+
This is a [sentence-transformers](https://www.SBERT.net) wrapper around the ported model.
|
| 18 |
|
| 19 |
|
| 20 |
## Usage (Sentence-Transformers)
|