sysoneso
Encoder addestrato con statement tuning multi-domanda: dato un testo (lo stato) e uno o piu' statement,
restituisce la probabilita' che ogni statement sia vero. Pensato come proxy veloce per sem_filter.
Gli statement condividono lo stato nella stessa sequenza, ma una maschera di attenzione bidirezionale a blocchi li rende indipendenti: il punteggio di uno statement e' identico a quello che si otterrebbe valutandolo da solo.
Uso
Serve il pacchetto st_encoder (il codice di training e inferenza con cui e' stato prodotto il modello).
from st_encoder import StatementScorer, sem_filter
scorer = StatementScorer.from_pretrained("stefra/sysoneso")
scorer.score("The vase is broken.", ["The sentence is negative.", "The vase is intact."])
neg = sem_filter(df, "{review} is negative", scorer)
Contenuto
| File | Contenuto |
|---|---|
backbone/ | encoder fine-tuned (formato transformers) |
head.safetensors | testa vero/falso |
statement_encoder.json | pooling e configurazione del packing usata in training |
tokenizer* | tokenizer |
eval_report.json | metriche per sorgente |
Metriche
Validazione (sorgenti di training)
| sorgente | n | accuracy | F1 | ROC-AUC | Brier | ECE |
|---|---|---|---|---|---|---|
| dpr | 264 | 0.561 | 0.621 | 0.595 | 0.245 | 0.034 |
| massive | 900 | 0.943 | 0.943 | 0.989 | 0.045 | 0.032 |
| mnli | 695 | 0.862 | 0.854 | 0.932 | 0.108 | 0.062 |
| piqa | 395 | 0.511 | 0.592 | 0.529 | 0.251 | 0.043 |
| qasc | 744 | 0.883 | 0.854 | 0.938 | 0.089 | 0.032 |
| qqp | 518 | 0.855 | 0.802 | 0.947 | 0.099 | 0.064 |
| race | 879 | 0.679 | 0.685 | 0.747 | 0.209 | 0.071 |
| samsum | 900 | 0.993 | 0.993 | 1.000 | 0.006 | 0.005 |
| sciq | 522 | 0.822 | 0.766 | 0.901 | 0.125 | 0.066 |
| snli | 708 | 0.898 | 0.891 | 0.968 | 0.073 | 0.049 |
| squad | 849 | 0.852 | 0.859 | 0.932 | 0.108 | 0.062 |
| tweet_offensive | 900 | 0.789 | 0.788 | 0.883 | 0.162 | 0.122 |
| winogrande | 600 | 0.535 | 0.603 | 0.540 | 0.249 | 0.017 |
| yelp_polarity | 900 | 0.973 | 0.973 | 0.997 | 0.024 | 0.023 |
| ALL | 9774 | 0.827 | 0.823 | 0.926 | 0.114 | 0.041 |
Held-out (task mai visti in training)
| sorgente | n | accuracy | F1 | ROC-AUC | Brier | ECE |
|---|---|---|---|---|---|---|
| ag_news | 3000 | 0.753 | 0.740 | 0.839 | 0.211 | 0.184 |
| emotion | 3000 | 0.741 | 0.728 | 0.817 | 0.196 | 0.127 |
| ALL | 6000 | 0.747 | 0.734 | 0.820 | 0.204 | 0.156 |