EU Detector

Binary classifier: is a parliamentary sentence about the European Union (EU=1) or not (EU=0)? Fine-tuned from jhu-clsp/mmBERT-base on hand-annotated parliamentary speeches from AUS, CZE, DEU, DNK, ESP, GBR, NLD, and SWE.

Labels

  • 0 โ€” Non-EU
  • 1 โ€” EU

Training

  • Base model: jhu-clsp/mmBERT-base
  • Max sequence length: 320
  • Train/val/test split: leakage-safe (StratifiedGroupKFold on country ร— speech_ID)
  • Loss: cross-entropy with balanced class weights

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tok = AutoTokenizer.from_pretrained("LBenoit/eu-detector-xlmr")
mdl = AutoModelForSequenceClassification.from_pretrained("LBenoit/eu-detector-xlmr")

text = "The European Commission proposed new climate targets."
enc  = tok(text, truncation=True, max_length=320, return_tensors="pt")
prob = torch.softmax(mdl(**enc).logits, dim=-1)[0, 1].item()
print(pred, prob)

Intended use

Research on parliamentary discourse about the EU. Outputs reflect the training corpus and annotation scheme; downstream prevalence estimates should ideally be calibrated against a base-rate-representative sample.

Downloads last month
132
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for LBenoit/EuroBert_mmBert

Finetuned
(112)
this model