Downloads · 30 days
6
20% of all-time downloads
SimoneAstarita/Pride-large-try-sweep-20251009-181613-t00
Pride-large-try-sweep-20251009-181613-t00 is a text classification model from SimoneAstarita. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Multilingual XLM-T (EN/IT/ES) binary classifier Task: LGBTQ+ reclamation vs non-reclamation on social media text.
Downloads · 30 days
6
20% of all-time downloads
All-time downloads
30
Public
Parameters
279M
3.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.2 GB · 66%
From the Hugging Face model README
Multilingual XLM-T (EN/IT/ES) binary classifier
Task: LGBTQ+ reclamation vs non-reclamation on social media text.
Trial timestamp (UTC): 2025-10-09 18:16:13
Data case:
es
| Hyperparameter | Value |
|---|---|
| LANGUAGES | es |
| LR | 2e-05 |
| EPOCHS | 3 |
| MAX_LENGTH | 256 |
| USE_BIO | True |
| USE_LANG_TOKEN | False |
| GATED_BIO | True |
| FOCAL_LOSS | True |
| FOCAL_GAMMA | 1.5 |
| USE_SAMPLER | True |
| R_DROP | True |
| R_KL_ALPHA | 1.0 |
| TEXT_NORMALIZE | True |
| Metric | Value |
|---|---|
| f1_macro_dev_0.5 | 0.6116318850496065 |
| f1_weighted_dev_0.5 | 0.7203143304409128 |
| accuracy_dev_0.5 | 0.6742424242424242 |
| f1_macro_dev_best_global | 0.6893257649176242 |
| f1_weighted_dev_best_global | 0.85500442609677 |
| accuracy_dev_best_global | 0.8712121212121212 |
| f1_macro_dev_best_by_lang | 0.6893257649176242 |
| f1_weighted_dev_best_by_lang | 0.85500442609677 |
| accuracy_dev_best_by_lang | 0.8712121212121212 |
| default_threshold | 0.5 |
| best_threshold_global | 0.8 |
| thresholds_by_lang | {"es": 0.8} |
0.50.8{ "es": 0.8 } precision recall f1-score support
no-recl (0) 0.9726 0.6339 0.7676 112
recl (1) 0.3051 0.9000 0.4557 20
accuracy 0.6742 132
macro avg 0.6388 0.7670 0.6116 132
weighted avg 0.8715 0.6742 0.7203 132
precision recall f1-score support
no-recl (0) 0.8926 0.9643 0.9270 112
recl (1) 0.6364 0.3500 0.4516 20
accuracy 0.8712 132
macro avg 0.7645 0.6571 0.6893 132
weighted avg 0.8537 0.8712 0.8550 132
precision recall f1-score support
no-recl (0) 0.8926 0.9643 0.9270 112
recl (1) 0.6364 0.3500 0.4516 20
accuracy 0.8712 132
macro avg 0.7645 0.6571 0.6893 132
weighted avg 0.8537 0.8712 0.8550 132
| lang | n | acc | f1_macro | f1_weighted | prec_macro | rec_macro | prec_weighted | rec_weighted |
|---|---|---|---|---|---|---|---|---|
| es | 132 | 0.8712 | 0.6893 | 0.8550 | 0.7645 | 0.6571 | 0.8537 | 0.8712 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoConfig
import torch, numpy as np
repo = "SimoneAstarita/Pride-large-try-sweep-20251009-181613-t00"
tok = AutoTokenizer.from_pretrained(repo)
cfg = AutoConfig.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
texts = ["example text ..."]
langs = ["en"]
mode = "best_global" # or "0.5", "by_lang"
enc = tok(texts, truncation=True, padding=True, max_length=256, return_tensors="pt")
with torch.no_grad():
logits = model(**enc).logits
probs = torch.softmax(logits, dim=-1)[:, 1].cpu().numpy()
if mode == "0.5":
th = 0.5
preds = (probs >= th).astype(int)
elif mode == "best_global":
th = getattr(cfg, "best_threshold_global", 0.5)
preds = (probs >= th).astype(int)
elif mode == "by_lang":
th_by_lang = getattr(cfg, "thresholds_by_lang", {})
preds = np.zeros_like(probs, dtype=int)
for lg in np.unique(langs):
t = th_by_lang.get(lg, getattr(cfg, "best_threshold_global", 0.5))
preds[np.array(langs) == lg] = (probs[np.array(langs) == lg] >= t).astype(int)
print(list(zip(texts, preds, probs)))
### Files
reports.json — all metrics (macro/weighted/accuracy) for @0.5, @best_global, and @best_by_lang.
config.json — stores thresholds: default_threshold, best_threshold_global, thresholds_by_lang.
report_0.5.txt, report_best.txt — readable classification reports.
postprocessing.json — duplicate threshold info for external tools.