PopFit

This is a SetFit model for German-language populism detection in news and media content. It was created as part of master thesis at the Hochschule für Politik @TUM.

The model is based on deutsche-telekom/gbert-large-paraphrase-cosine and has been trained using an efficient few-shot learning technique that involves:

  1. Fine-tuning a Sentence Transformer with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

The model generates binary classification labels with 0 as the non-populist and 1 as the populist class.

Usage

To use this model for inference, first install the SetFit library:

python -m pip install setfit

You can then run inference as follows:

from setfit import SetFitModel

# Download from Hub and run inference
model = SetFitModel.from_pretrained("baunef/PopFit")
# Run inference
preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])
Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support