Feature Extraction
sentence-transformers
Safetensors
bert
sparseencoder
model-merging
Merge
text-embeddings-inference
Instructions to use yjoonjang/splade-cocondenser-ensemble-self-linear-merge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use yjoonjang/splade-cocondenser-ensemble-self-linear-merge with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yjoonjang/splade-cocondenser-ensemble-self-linear-merge") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
splade-cocondenser-ensemble-self-linear-merge
A demonstration model produced by the native model-merging feature (SparseEncoder.merge)
added to Sentence Transformers. It is a
showcase merge, not a task-tuned release.
It merges these two checkpoints with the linear method (weights [0.5, 0.5]):
How it was created
from sentence_transformers import SparseEncoder
merged = SparseEncoder.merge(
models=["naver/splade-cocondenser-ensembledistil", "naver/splade-cocondenser-selfdistil"],
weights=[0.5, 0.5],
method="linear",
output_path="splade-cocondenser-ensemble-self-linear-merge",
dtype="float16",
)
Usage
from sentence_transformers import SparseEncoder
model = SparseEncoder("yjoonjang/splade-cocondenser-ensemble-self-linear-merge")
emb = model.encode(["What is sparse retrieval?",
"SPLADE produces sparse lexical embeddings."])
print(model.similarity(emb, emb))
License
This is a derivative of the two base models above; their licenses apply. See each base model's card for terms (note that some bases — e.g. the SPLADE cocondenser models — are non-commercial).
- Downloads last month
- 13