Sentence Similarity
sentence-transformers
TensorFlow
Rust
Safetensors
bert
sentencetransformer
model-merging
Merge
text-embeddings-inference
Instructions to use yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
all-MiniLM-L6-v2-multi-qa-linear-merge
A demonstration model produced by the native model-merging feature (SentenceTransformer.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 SentenceTransformer
merged = SentenceTransformer.merge(
models=["sentence-transformers/all-MiniLM-L6-v2", "sentence-transformers/multi-qa-MiniLM-L6-cos-v1"],
weights=[0.5, 0.5],
method="linear",
output_path="all-MiniLM-L6-v2-multi-qa-linear-merge",
dtype="float16",
)
Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge")
emb = model.encode(["Model merging combines fine-tuned checkpoints.",
"It often beats each individual model."])
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
- 19
Model tree for yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge
Merge model
this model