AI SeedbankHelp preserve open and free AI for humanity's future

← All models

sentence-transformers_msmarco-MiniLM-L12-cos-v5

sentence-transformers · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: 1 · Leechers: 0

Observed 2026-09-02T13:56:39Z via announce.aitorrent.org:7070.

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


language:

  • en library_name: sentence-transformers tags:
  • sentence-transformers
  • feature-extraction
  • sentence-similarity
  • transformers pipeline_tag: sentence-similarity

msmarco-MiniLM-L12-cos-v5

This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and was designed for semantic search. It has been trained on 500k (query, answer) pairs from the MS MARCO Passages dataset. For an introduction to semantic search, have a look at: SBERT.net - Semantic Search

Usage (Sentence-Transformers)

Using this model becomes easy when you have sentence-transformers installed:

pip install -U sentence-transformers

Then you can use the model like this:

from sentence_transformers import SentenceTransformer, util

query = "How many people live in London?"
docs = ["Around 9 Million people live in London", "London is known for its financial district"]

#Load the model
model = SentenceTransformer('sentence-transformers/msmarco-MiniLM-L12-cos-v5')

#Encode query and documents
query_emb = model.encode(query)
doc_emb = model.encode(docs)

#Compute dot score between query and all document embeddings
scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist()

#Combine docs & scores
doc_score_pairs = list(zip(docs, scores))

#Sort by decreasing score
doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)

#Output passages & scores
for doc, score in doc_score_pairs:
    print(score, doc)

Usage (HuggingFace Transformers)

Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings.

from transformers import AutoTokenizer, AutoModel
import torch
import torch.nn.functional as F

#Mean Pooling - Take average of all tokens
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output.last_hidden_state #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)


#Encode text
def encode(texts):
    # Tokenize sentences
    encoded_input = tokenizer(texts, padding=True, truncation=True, return_tensors='pt')

    # Compute token embeddings
    with torch.no_grad():
        model_output = model(**encoded_input, return_dict=True)

    # Perform pooling
    embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

    # Normalize embeddings
    embeddings = F.normalize(embeddings, p=2, dim=1)
	
    return embeddings


# Sentences we want sentence embeddings for
query = "How many people live in London?"
docs = ["Around 9 Million people live in London", "London is known for its financial district"]

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-MiniLM-L12-cos-v5")
model = AutoModel.from_pretrained("sentence-transformers/msmarco-MiniLM-L12-cos-v5")

#Encode query and docs
query_emb = encode(query)
doc_emb = encode(docs)

#Compute dot score between query and all document embeddings
scores = torch.mm(query_emb, doc_emb.transpose(0, 1))[0].cpu().tolist()

#Combine docs & scores
doc_score_pairs = list(zip(docs, scores))

#Sort by decreasing score
doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)

#Output passages & scores
for doc, score in doc_score_pairs:
    print(score, doc)

Technical Details

In the following some technical details how this model must be used:

Setting Value
Dimensions 768
Produces normalized embeddings Yes
Pooling-Method Mean pooling
Suitable score functions dot-product (util.dot_score), cosine-similarity (util.cos_sim), or euclidean distance

Note: When loaded with sentence-transformers, this model produces normalized embeddings with length 1. In that case, dot-product and cosine-similarity are equivalent. dot-product is preferred as it is faster. Euclidean distance is proportional to dot-product and can also be used.

Citing & Authors

This model was trained by sentence-transformers.

If you find this model helpful, feel free to cite our publication Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks:

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "http://arxiv.org/abs/1908.10084",
}

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:841f10709708ed9437fd5aa81d7906fb5ab78b08&dn=sentence-transformers_msmarco-MiniLM-L12-cos-v5

Open magnet in torrent client · infohash 841f10709708ed9437fd5aa81d7906fb5ab78b08

Files & hashes

PathSizesha1sha256
1_Pooling/config.json190 B (190 B)d1514c3162bbe87b343f565fadc62e6c06f04f034be450dde3b0273bb9787637cfbd28fe04a7ba6ab9d36ac48e92b11e350ffc23
README.md5.0 KB (5,169 B)a480ae66f5ff89b7940689f438aec6261ebc27b68559094eef664d7d5020722bd559020df5dce6f60498f325947a41d1f17fe643
config.json629 B (629 B)82164f1c64ff11b3cc6a184963e8534a7d2c9980125baf0d7caa19d8871c2381d0597b8b52781641cef5e878200ba2f1912be3ea
config_sentence_transformers.json122 B (122 B)b974b349cb2d419ada11181750a733ff82f291adb8c64b5cece00d8424b4896ea75b512b6008576088497609dfeb6bd63e6d36b8
model.safetensors127.3 MB (133,466,304 B)5febc3546fb723a1b1bf07dd2e35d1a47c60276ede1a3145d5bdeebb9d7a8294f05603adfb395cbf67c174697c6e42918f8ae17f
modules.json349 B (349 B)952a9b81c0bfd99800fabf352f69c7ccd46c5e4384e40c8e006c9b1d6c122e02cba9b02458120b5fb0c87b746c41e0207cf642cf
openvino/openvino_model.bin126.7 MB (132,852,880 B)f2ae5e828e6b0d7b8b805d477b7012d48651bb6698681a746c2465cfa12e483c7545ffe16a7768be493bfb75291b25beb7f63913
openvino/openvino_model.xml388.7 KB (398,045 B)b0b1fd85227ec06353141f340ac3f1d75c69b3d1650e5d62268e08ea37f828b17cf610190ea9b0c372f6379e50226d4fdfb46dd1
openvino/openvino_model_qint8_quantized.bin32.3 MB (33,818,048 B)d994d304c5e05e81cc9fd9430af858460e719997cb59513b412cef1acd8d55609f398ff9b51ed89051f630b733f32b68af2bff8c
openvino/openvino_model_qint8_quantized.xml691.6 KB (708,149 B)c607f0faa5942709654426f915a7b7ae46ffb04c5107c32c953687eac29449681459c7a8cda74a588b7e6dc88082ece2cd819564
pytorch_model.bin127.3 MB (133,518,577 B)170d823f8abc16b6056619fc745ccd3c164664abb17442e1b4a5db687084be01f47d35f683f35ffadbfe26ca42622fec51d013a8
sentence_bert_config.json53 B (53 B)4eb670bb4e7f34e9031acec2b86d39e5c921198ecabfacded9272091a06ff595a46ef027a76ddf4ac9e77d0fcf11c605748f1667
special_tokens_map.json112 B (112 B)e7b0375001f109a6b8873d756ad4f7bbb15fbaa5303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tokenizer.json455.2 KB (466,081 B)40c4a0f6c414c8218190234bbce9bf4cc04fa3ac5fd1c882abbd30517dced455a2c9768945ec726b96727927e4959348d9de550b
tokenizer_config.json432 B (432 B)4580d1ae89dc4075e8b8b7766bf61f05217f71bf7b0e032935673f37ea4f7c01e3038e2fe5c03d8a71b83d50298c9dd44a6ff27d
vocab.txt226.1 KB (231,508 B)fb140275c155a9c7c5a3b3e0e77a9e839594a93807eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3

Cite this release

Canonical URL
https://aiseedbank.org/models/sentence-transformers_msmarco-MiniLM-L12-cos-v5/
Slug
sentence-transformers_msmarco-MiniLM-L12-cos-v5
Infohash
841f10709708ed9437fd5aa81d7906fb5ab78b08
License
no license recorded
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: sentence-transformers_msmarco-MiniLM-L12-cos-v5.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositorysentence-transformers/msmarco-MiniLM-L12-cos-v5
Revision (pinned)09660d808c6038205655b469ac62c39fe7288ed4
Fetched at2026-09-02T04:43:06Z
License at fetchno license recorded
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-02T04:43:12Z

no license recorded415.3 MB (435,466,648 bytes)sentence-transformerspytorchjaxonnxsafetensorsopenvinobertfeature-extractionsentence-similaritytransformerstext-embeddings-inferenceendpoints_compatible2 languages (tf, en)paper: 1908.10084