Hippius
mainsafetensorsPublicapache-2.0sentence-transformerssentence-similarity

archive/paraphrase-multilingual-minilm-l12-v2

sha256:92252c5d48108f06ac0022889449f4fb7c778ac980aae9680f060d37aeb50949·Indexed 26d ago

Parameters

—

Total size

476.4 MB

Files

20

Quantization

—

README.md

4.3 KB

Mirror. This is an unmodified copy of sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 at commit e8f8c211226b, mirrored by Hippius on 2026-10-29. Large files were checked against Hugging Face's published SHA-256 before upload (4 verified). License: apache-2.0. All credit to the original authors.

sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or 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
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
embeddings = model.encode(sentences)
print(embeddings)

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 right pooling-operation on-top of the contextualized word embeddings.

from transformers import AutoTokenizer, AutoModel
import torch


# Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #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)


# Sentences we want sentence embeddings for
sentences = ['This is an example sentence', 'Each sentence is converted']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
model = AutoModel.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')

# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

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

# Perform pooling. In this case, max pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

print("Sentence embeddings:")
print(sentence_embeddings)

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
)

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",
}

Model architecture

config.json
Architecture
BertModel
Model type
bert
Hidden size
384
Layers
12
Attention heads
12
FFN size
1,536
Vocab size
250,037
Context window
512

Files

20 items
  • 22820da43907

    67.7 MB

  • 1203c9262ff6

    66.0 MB

  • 525d04cc5793

    65.7 MB

  • 2a35c33ba5ff

    65.6 MB

  • c0037679e250

    65.5 MB

  • bdd273b668a2

    64.5 MB

  • 09e3c7a7a2ce

    53.8 MB

  • unigram.json

    71b44701d7ef

    14.1 MB

  • tokenizer.json

    2c3387be7655

    8.7 MB

  • sentencepiece.bpe.model

    cfc8146abe2a

    4.8 MB

  • model.safetensors

    5f275eef2fab

    19.5 KB

    safetensors

  • README.md

    8dfd6e301e51

    4.3 KB

  • hippius-provenance.json

    3402293ff0a4

    1.6 KB

  • config.json

    6300193cb75e

    645 B

  • tokenizer_config.json

    5036ea374ffe

    526 B

  • special_tokens_map.json

    378eb3bf733e

    239 B

  • modules.json

    8f4b264b8020

    229 B

  • 1_Pooling/config.json

    4be450dde3b0

    190 B

  • config_sentence_transformers.json

    b8c64b5cece0

    122 B

  • sentence_bert_config.json

    70f4448f3132

    53 B