Downloads · 30 days
42
13% of all-time downloads
haukelicht/all-mpnet-base-v2_economic-attributes-classifier
all-mpnet-base-v2_economic-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 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.
Downloads · 30 days
42
13% of all-time downloads
All-time downloads
336
Public
Parameters
109M
876 MB 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 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 economic attributes classified are:
| attribute | definition |
|---|---|
| education | People described with or categorized by their education level such as students, apprentices, higher education, tertiary education, vocational training or graduates. |
| employment status | People described or categorized by their employment status such as employers, employees, self-employed, or unemployed people. |
| income/wealth/economic status | People defined or categorized by their income, wealth, or economic status such as high/medium/low income groups, rich/poor people, homeowners/tenants/homeless. |
| occupation/profession | People referred to with or categorized according to their occupation or profession such as teachers, farmers, public servants, police officers |
Group mention 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_economic-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_economic-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.
@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