Downloads · 30 days
901
2% of all-time downloads
dwulff/mpnet-personality
mpnet-personality is a sentence similarity model from dwulff. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as cc-by-sa-4.0.
This is a sentence-transformers model that maps personality-related items or texts into a 768-dimensional dense vector space and can be used for many tasks in personality psychology, such as clustering personality ite…
Downloads · 30 days
901
2% of all-time downloads
All-time downloads
40.2K
Public
Parameters
109M
438 MB on disk
Likes
15
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model that maps personality-related items or texts into a 768-dimensional dense vector space and can be used for many tasks in personality psychology, such as clustering personality items and scales, mapping personality scales to personality constructs, and others.
The model has been generated by fine-tuning all-mpnet-base-v2 using unsigned empirical correlations of 200k pairs of personality items. The model, therefore, encodes the content of personality-related texts independent of the direction (e.g., negation).
See Wulff & Mata (2025) (see Supplement) for details.
Make sure sentence-transformers is installed:
# latest version
pip install -U sentence-transformers
# latest dev version
pip install git+https://github.com/UKPLab/sentence-transformers.git
You can extract embeddings in the following way:
from sentence_transformers import SentenceTransformer
# personality sentences
sentences = ["Rarely think about how I feel.", "Make decisions quickly."]
# load model
model = SentenceTransformer('dwulff/mpnet-personality')
# extract embeddings
embeddings = model.encode(sentences)
print(embeddings)
The model has been evaluated on public personality data. For standard personality inventories, such as the BIG5 or HEXACO inventories, the model predicts the empirical correlations between personality items at Pearson r ~ .6 and empirical correlations between scales at Pearson r ~ .7.
Performance can be higher on the many common personality items it has been trained on due to memorization (r ~ .9). Performance will be worse for more specialized personality assessments and texts beyond personality items, as well as for personality factors due to the reduced variance in correlations.
See Wulff & Mata (2025) (see Supplement) for details.
@article{wulff2024taxonomic,
author = {Wulff, Dirk U. and Mata, Rui},
title = {Semantic embeddings reveal and address taxonomic incommensurability in psychological measurement},
journal = {Nature Human Behavior},
doi = {https://doi.org/10.1038/s41562-024-02089-y}
}
The model was trained with the parameters:
DataLoader:
torch.utils.data.dataloader.DataLoader of length 3125 with parameters:
{'batch_size': 64, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
Loss:
sentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss
Parameters of the fit()-Method:
{
"epochs": 3,
"evaluation_steps": 0,
"evaluator": "NoneType",
"max_grad_norm": 1,
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
"optimizer_params": {
"lr": 2e-05
},
"scheduler": "WarmupLinear",
"steps_per_epoch": null,
"warmup_steps": 625,
"weight_decay": 0.01
}
SentenceTransformer(
(0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Normalize()
)