splade-mini
234
4
1 language
—
by
rasyosef
Embedding Model
OTHER
2004.05665B params
New
234 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
4480GB+ RAM
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Device Compatibility
Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
1867GB+ RAM
Code Examples
Usagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagebash
pip install -U sentence-transformersUsagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Usagepython
from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("yosefw/SPLADE-BERT-Mini-BS256-distil")
# Run inference
queries = [
"common law implied warranty",
]
documents = [
'The law recognizes two basic kinds of warrantiesimplied warranties and express warranties. Implied Warranties. Implied warranties are unspoken, unwritten promises, created by state law, that go from you, as a seller or merchant, to your customers.',
'An implied warranty is a contract law term for certain assurances that are presumed in the sale of products or real property.',
'The implied warranty of fitness for a particular purpose is a promise that the law says you, as a seller, make when your customer relies on your advice that a product can be used for some specific purpose.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 30522] [3, 30522]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[22.4364, 22.7160, 21.7330]])Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.