EU_Ukraine
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, including Ukrainian Rada data alongside other European parliaments.
Labels
0โ Non-EU1โ 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_Ukraine")
mdl = AutoModelForSequenceClassification.from_pretrained("LBenoit/EU_Ukraine")
text = "The European Commission proposed new climate targets."
enc = tok(text, truncation=True, max_length=320, return_tensors="pt")
with torch.no_grad():
logits = mdl(**enc).logits
probs = torch.softmax(logits, dim=-1)[0]
pred = int(probs.argmax().item())
prob = probs[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
- 12
Model tree for LBenoit/EU_Ukraine
Base model
jhu-clsp/mmBERT-base