Views
No views yet
| Aspect | T-EBERT (Standard) | T-EBERT-Balanced |
|---|---|---|
| Training distribution | 70/30 (natural) | 50/50 (balanced) |
| F1 Score | 0.922 | 0.822 |
| Optimization goal | Peak performance | Distribution robustness |
| Feature reliance | Content + distribution | Semantic only |
| Best for | Production (known distribution) | Research (unknown distribution) |
| Term | F1 Score |
|---|---|
| Kooperation | 0.934 |
| Entspannung | 0.916 |
| Intervention | 0.901 |
| Integration | 0.895 |
| Norm | 0.699 |
| Regime | 0.390 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4# Load model and tokenizer
5model_name = "pdjohn/T-EBERT-term-sense-balanced"
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForSequenceClassification.from_pretrained(model_name)
8
9# Classify a sentence
10sentence = "Die internationale Norm verbietet den Einsatz von Gewalt."
11inputs = tokenizer(sentence, return_tensors="pt", truncation=True, padding=True)
12
13with torch.no_grad():
14 outputs = model(**inputs)
15 prediction = torch.argmax(outputs.logits, dim=1).item()
16
17# Interpretation
18labels = {0: "Colloquial", 1: "IR Sense"}
19print(f"Prediction: {labels[prediction]}")bias="all") - critical for balanced learning