Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
tiny
Eval Results (legacy)
text-embeddings-inference
Instructions to use tabularisai/Zip-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use tabularisai/Zip-1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("tabularisai/Zip-1") 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] - Notebooks
- Google Colab
- Kaggle
Super small embedding model (only 4MB!)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("tabularisai/Zip-1")
# Run inference
sentences = [
'The weather is lovely today.',
"It's so sunny outside!",
'He drove to the stadium.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 32]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
print(similarities)
#tensor([[1.0000, 0.7272, 0.2864],
# [0.7272, 1.0000, 0.2265],
# [0.2864, 0.2265, 1.0000]])
|
|
|
|
|
- Downloads last month
- 7
Model tree for tabularisai/Zip-1
Base model
sentence-transformers/all-MiniLM-L6-v2Evaluation results
- Pearson Cosine on Unknownself-reported0.675
- Spearman Cosine on Unknownself-reported0.704