CoolFace
Modelpublic

yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge

sourceHugging Faceupdated 1mo agoView on Hugging Face
0likes25downloads
Model Card

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

python
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

python
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).