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
Safetensors
Model size
22.7M params
Tensor type
I64
·
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yjoonjang/all-MiniLM-L6-v2-multi-qa-linear-merge