Downloads · 30 days
4
8% of all-time downloads
SimoneAstarita/Pride-large-try-sweep-20251010-105542-t00
Pride-large-try-sweep-20251010-105542-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
4
8% of all-time downloads
All-time downloads
49
Public
Parameters
307M
3.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.5 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-10 10:55:42
Data case:
es-it
Model: Alibaba-NLP/gte-multilingual-base
| Hyperparameter | Value |
|---|---|
| LANGUAGES | es-it |
| 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.7894361170592434 |
| f1_weighted_dev_0.5 | 0.86975646934998 |
| accuracy_dev_0.5 | 0.8610169491525423 |
| f1_macro_dev_best_global | 0.8599240265906933 |
| f1_weighted_dev_best_global | 0.9192589373380334 |
| accuracy_dev_best_global | 0.9186440677966101 |
| f1_macro_dev_best_by_lang | 0.8647355515240924 |
| f1_weighted_dev_best_by_lang | 0.9223323271945691 |
| accuracy_dev_best_by_lang | 0.9220338983050848 |
| default_threshold | 0.5 |
| best_threshold_global | 0.7000000000000001 |
| thresholds_by_lang | {"it": 0.75, "es": 0.7000000000000001} |
0.50.7000000000000001{ "it": 0.75, "es": 0.7000000000000001 } precision recall f1-score support
no-recl (0) 0.9552 0.8730 0.9122 244
recl (1) 0.5694 0.8039 0.6667 51
accuracy 0.8610 295
macro avg 0.7623 0.8384 0.7894 295
weighted avg 0.8885 0.8610 0.8698 295
precision recall f1-score support
no-recl (0) 0.9545 0.9467 0.9506 244
recl (1) 0.7547 0.7843 0.7692 51
accuracy 0.9186 295
macro avg 0.8546 0.8655 0.8599 295
weighted avg 0.9200 0.9186 0.9193 295
precision recall f1-score support
no-recl (0) 0.9547 0.9508 0.9528 244
recl (1) 0.7692 0.7843 0.7767 51
accuracy 0.9220 295
macro avg 0.8620 0.8676 0.8647 295
weighted avg 0.9227 0.9220 0.9223 295
| lang | n | acc | f1_macro | f1_weighted | prec_macro | rec_macro | prec_weighted | rec_weighted |
|---|---|---|---|---|---|---|---|---|
| it | 163 | 0.9816 | 0.9697 | 0.9815 | 0.9758 | 0.9640 | 0.9815 | 0.9816 |
| es | 132 | 0.8485 | 0.7169 | 0.8514 | 0.7091 | 0.7259 | 0.8548 | 0.8485 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoConfig
import torch, numpy as np
repo = "SimoneAstarita/Pride-large-try-sweep-20251010-105542-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.