Model reference · open weights

mstsb-paraphrase-multilingual-mpnet

Embeddings AIDA-UPM Embeddings 1 build Licence not stated 2k dl/mo

mstsb-paraphrase-multilingual-mpnet is an open-weight embedding model from AIDA-UPM. mstsb-paraphrase-multilingual-mpnet-base-v2 (BF16) weighs 1.1 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • mstsb-paraphrase-multilingual-mpnet is a sentence-similarity model developed by AIDA-UPM that maps text to a 768-dimensional vector space for clustering and semantic search.
  • It is a fine-tuned version of paraphrase-multilingual-mpnet-base-v2, trained on the Semantic Textual Similarity Benchmark extended to 15 languages.
  • The model has a context length of 514 tokens and uses mean pooling to generate embeddings.

Summary of the AIDA-UPM/mstsb-paraphrase-multilingual-mpnet-base-v2 model card, 2026-10-01

What it is

Released byAIDA-UPM
Released2022-03-02
VRAM1.1 GB for the weights

What it runs on

Memory and cards for mstsb-paraphrase-multilingual-mpnet-base-v2 (BF16)

1.1 GBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What AIDA-UPM says about mstsb-paraphrase-multilingual-mpnet

Read the model card

This is a fine-tuned version of paraphrase-multilingual-mpnet-base-v2 from sentence-transformers model with Semantic Textual Similarity Benchmark extended to 15 languages: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering, semantic search and measuring the similarity between two sentences.

This model is fine-tuned version of paraphrase-multilingual-mpnet-base-v2 for semantic textual similarity with multilingual data. The dataset used for this fine-tuning is STSb extended to 15 languages with Google Translator. For mantaining data quality the sentence pairs with a confidence value below 0.7 were dropped. The extended dataset is available at GitHub. The languages included in the extended version are: ar, cs, de, en, es, fr, hi, it, ja, nl, pl, pt, ru, tr, zh-CN, zh-TW. The pooling operation used to condense the word embeddings into a sentence embedding is mean pooling (more info below).

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

# We should define the proper pooling function: Mean pooling
# 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", "Esta es otra frase de ejemplo", "最後の例文"]

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('AIDA-UPM/mstsb-paraphrase-multilingual-mpnet-base-v2')
model = AutoModel.from_pretrained('AIDA-UPM/mstsb-paraphrase-multilingual-mpnet-base-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)

Evaluation Results

Check the test results in the Semantic Textual Similarity Tasks. The 15 languages available at the Multilingual STSB have been combined into monolingual and cross-lingual tasks, giving a total of 31 tasks. Monolingual tasks have both sentences from the same language source (e.g., Ar-Ar, Es-Es), while cross-lingual tasks have two sentences, each in a different language being one of them English (e.g., en-ar, en-es).

Here we compare the average multilingual semantic textual similairty capabilities between the paraphrase-multilingual-mpnet-base-v2 based model and the mstsb-paraphrase-multilingual-mpnet-base-v2 fine-tuned model across the 31 tasks. It is worth noting that both models are multilingual, but the second model is adjusted with multilingual data for semantic similarity. The average of correlation coefficients is computed by transforming each correlation coefficient to a Fisher's z value, averaging them, and then back-transforming to a correlation coefficient.

ModelAverage Spearman Cosine Test
mstsb-paraphrase-multilingual-mpnet-base-v20.835890
paraphrase-multilingual-mpnet-base-v20.818896

The following tables breakdown the performance of mstsb-paraphrase-multilingual-mpnet-base-v2 according to the different tasks. For the sake of readability tasks have been splitted into monolingual and cross-lingual tasks.

Monolingual TaskPearson Cosine testSpearman Cosine test
en;en0.8680483106925060.8740170943535747
ar;ar0.82671394541934870.8284459741532022
cs;cs0.84668217209421570.8485417688803879
de;de0.85172859618121830.8557680051557893
es;es0.85191853090646910.8552243211580456
fr;fr0.84309510679850640.8466614534379704
hi;hi0.81782586305780920.8176462079184331
it;it0.84759095743056370.8494216064459076
ja;ja0.84355888593864770.8456031494178619
nl;nl0.84867651045270320.8520856765262531
pl;pl0.84078401778834070.8443070467300299
pt;pt0.85348801782492960.8578544068829622
ru;ru0.83908975854556780.8423041443534423
tr;tr0.83821254518205720.8421587450058385
zh-CN;zh-CN0.8262336789466440.8248515460782744
zh-TW;zh-TW0.82426838096754220.8235506799952028
Cross-lingual TaskPearson Cosine testSpearman Cosine test
en;ar0.79908303404625350.7956792016468148
en;cs0.83812748790612650.8388713450024455
en;de0.84144396009287390.8441971698649943
en;es0.84423375113569520.8445035292903559
en;fr0.83784376446050630.8387903367907733

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms