Downloads · 30 days
16
7% of all-time downloads
haukelicht/all-mpnet-base-v2_noneconomic-attributes-classifier
all-mpnet-base-v2_noneconomic-attributes-classifier is a machine learning model from haukelicht. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for setfit. The card lists the license as apache-2.0.
A multi-label classifier for detecting non-economic attribute categories referred to in a social group mention, trained with setfit based on the light-weight sentence-transformers/all-mpnet-base-v2 sentence embedding…
Downloads · 30 days
16
7% of all-time downloads
All-time downloads
224
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
A multi-label classifier for detecting non-economic attribute categories referred to in a social group mention, trained with setfit based on the light-weight sentence-transformers/all-mpnet-base-v2 sentence embedding model.
The non-economic attributes classified are:
| attribute | definition |
|---|---|
| age | People referred to based on or categorized according to their age, generation, or cohort such as children, young people, old people, future generations. |
| crime | People referred to based on or categorized according to their relation to crime such as offenders/criminals or victims. |
| ethnicity | People referred to based on or categorized according to heir ethnicity such as people of color or ethnic minorities. |
| family | People referred to based on or categorized according to their familial role such as fathers, mothers, parents. |
| gender/sexuality | People referred to based on or categorized according to their gender or sexuality such as men, women, or LGBTQI+ people. |
| health | People referred to based on or categorized according to their health condition or relation to aspects of health such as disabled/handicapped people or chronically sick people. |
| nationality | People referred to based on or categorized according to their nationality such as natives or immigrants. |
| place/location | People referred to based on or categorized according to their place or location such as peolple from rural areas, urban center, the global south, or global north. |
| religion | People referred to based on or categorized according to their religion of belief such as christians, jews, muslims, etc. |
| shared values/mentalities | People referred to based on or categorized according to their shared values or mentalities such as people with a growth mindset, meritocratic values, environmental or peace mentalities or a more equal society. |
Group mention non-economic attributes classifier
Use the code below to get started with the model.
You can use the model with the setfit Python library (>=1.1.0):
Note: It is recommended to use transformers version >=4.5.5,<=5.0.0 and sentence-transformers version >=4.0.1,<=5.1.0 for compatibility.
import torch
from setfit import SetFitModel
model_name = "haukelicht/all-mpnet-base-v2_noneconomic-attributes-classifier"
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
classifier = SetFitModel.from_pretrained(model_name)
classifier.to(device);
# Example mentions
mentions = ["working class people", "highly-educated professionals", "people without a stable job"]
# Get predictions
with torch.no_grad():
predictions = classifier.predict(mentions)
print(predictions)
# Map predictions to labels
[
[
classifier.id2label[l]
for l, p in enumerate(pred) if p==1
]
for pred in predictions
]
import torch
from sentence_transformers import SentenceTransformer
model_name = "haukelicht/all-mpnet-base-v2_noneconomic-attributes-classifier"
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
# Load the sentence transformer component of the pre-trained classifier
model = SentenceTransformer(model_name, device=device)
# Example mentions
mentions = ["working class people", "highly-educated professionals", "people without a stable job"]
# Compute mention embeddings
with torch.no_grad():
embeddings = model.encode(mentions)
The train, dev, and test splits used for model fine-tuning and evaluation are available on GitHub.
The train, dev, and test splits used for model fine-tuning and evaluation are available on GitHub.
BibTeX:
@article{licht_roeth_2026,
title={Attributes, abstractions, and combinations: a new taxonomy for studying how parties invoke social groups},
author={Hauke Licht and Leonce Röth},
journal={Journal of European Public Policy},
volume={},
number={},
pages={1–40},
year={2026},
date={2026-10-01},
url={http://www.tandfonline.com/10.1080/13501763.2026.2737691},
doi={10.1080/13501763.2026.2737691}
}
APA:
Licht, H., & Röth, L. (2026). Attributes, abstractions, and combinations: a new taxonomy for studying how parties invoke social groups. Journal of European Public Policy, 1–40. https://doi.org/10.1080/13501763.2026.2737691