Views
No views yet
| Parameter | Value |
|---|---|
| Learning rate | 1e-05 |
| Batch size (train) | 16 |
| Batch size (eval) | 16 |
| Epochs | 5 |
| Weight decay | 0.01 |
| Warmup ratio | 0.06 |
| FP16 | True |
| Max sequence length | 512 |
| Seed | 42 |
| Eval steps | 100 |
| Best model selection | binary_f1_pos |
| Metric | Value |
|---|---|
| Binary F1 (positive) | 0.9041 |
| Macro F1 | 0.9342 |
| Accuracy | 0.948 |
| AUC-ROC | 0.9864 |
| Precision | 0.9223 |
| Recall | 0.9485 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("pjait/deberta-v3-base-disinfo-task1-binary")
5model = AutoModelForSequenceClassification.from_pretrained("pjait/deberta-v3-base-disinfo-task1-binary")
6
7text = "Your article text here..."
8inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
9
10with torch.no_grad():
11 logits = model(**inputs).logits
12 probability = torch.sigmoid(logits).item()
13 prediction = "disinformation" if probability >= 0.5 else "credible"
14
15print(f"Prediction: {prediction} (probability: {probability:.4f})")