Downloads · 30 days
5
11% of all-time downloads
SimoneAstarita/Pride-large-try-sweep-20251010-151823-t00
Pride-large-try-sweep-20251010-151823-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
5
11% of all-time downloads
All-time downloads
45
Public
Parameters
611M
4.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2.4 GB · 50%
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 15:18:23
Data case:
en
Model: Alibaba-NLP/gte-multilingual-base
| Hyperparameter | Value |
|---|---|
| LANGUAGES | en |
| LR | 2e-05 |
| EPOCHS | 3 |
| MAX_LENGTH | 256 |
| USE_BIO | False |
| USE_LANG_TOKEN | False |
| GATED_BIO | False |
| 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.36859653075016896 |
| f1_weighted_dev_0.5 | 0.5015011570992648 |
| accuracy_dev_0.5 | 0.4090909090909091 |
| f1_macro_dev_best_global | 0.5737445630684065 |
| f1_weighted_dev_best_global | 0.8659189762392608 |
| accuracy_dev_best_global | 0.8636363636363636 |
| f1_macro_dev_best_by_lang | 0.5737445630684065 |
| f1_weighted_dev_best_by_lang | 0.8659189762392608 |
| accuracy_dev_best_by_lang | 0.8636363636363636 |
| default_threshold | 0.5 |
| best_threshold_global | 0.85 |
| thresholds_by_lang | {"en": 0.85} |
0.50.85{ "en": 0.85 } precision recall f1-score support
no-recl (0) 0.9808 0.3617 0.5285 141
recl (1) 0.1176 0.9231 0.2087 13
accuracy 0.4091 154
macro avg 0.5492 0.6424 0.3686 154
weighted avg 0.9079 0.4091 0.5015 154
precision recall f1-score support
no-recl (0) 0.9286 0.9220 0.9253 141
recl (1) 0.2143 0.2308 0.2222 13
accuracy 0.8636 154
macro avg 0.5714 0.5764 0.5737 154
weighted avg 0.8683 0.8636 0.8659 154
precision recall f1-score support
no-recl (0) 0.9286 0.9220 0.9253 141
recl (1) 0.2143 0.2308 0.2222 13
accuracy 0.8636 154
macro avg 0.5714 0.5764 0.5737 154
weighted avg 0.8683 0.8636 0.8659 154
| lang | n | acc | f1_macro | f1_weighted | prec_macro | rec_macro | prec_weighted | rec_weighted |
|---|---|---|---|---|---|---|---|---|
| en | 154 | 0.8636 | 0.5737 | 0.8659 | 0.5714 | 0.5764 | 0.8683 | 0.8636 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoConfig
import torch, numpy as np
repo = "SimoneAstarita/Pride-large-try-sweep-20251010-151823-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.