Model reference · open weights

mstsb-paraphrase-multilingual-mpnet

Available as managed deployment Embeddings AIDA-UPM Embeddings 1 variants 2k dl/mo

mstsb-paraphrase-multilingual-mpnet is an open-weight embedding model from AIDA-UPM. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byAIDA-UPM
TypeEmbedding models
TaskEmbeddings
Context514 tokens
Runs withtransformers
Released2022-03-02
Popularity2k downloads / month
LicenceUnknown

About

What mstsb-paraphrase-multilingual-mpnet is

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

Read the full model card

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

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys mstsb-paraphrase-multilingual-mpnet for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mstsb-paraphrase-multilingual-mpnet below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"mstsb-paraphrase-multilingual-mpnet","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

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