Push model using huggingface_hub.
Browse files- 1_Pooling/config.json +8 -8
- 2_Dense/config.json +6 -1
- 2_Dense/model.safetensors +1 -1
- README.md +39 -33
- config.json +2 -2
- config_sentence_transformers.json +8 -4
- model.safetensors +1 -1
- model_head.pkl +1 -1
- sentence_bert_config.json +2 -2
1_Pooling/config.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"word_embedding_dimension": 768,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": false,
|
| 9 |
+
"include_prompt": true
|
| 10 |
}
|
2_Dense/config.json
CHANGED
|
@@ -1 +1,6 @@
|
|
| 1 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"in_features": 768,
|
| 3 |
+
"out_features": 512,
|
| 4 |
+
"bias": true,
|
| 5 |
+
"activation_function": "torch.nn.modules.activation.Tanh"
|
| 6 |
+
}
|
2_Dense/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1575072
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdab215fed27889edb0ae83e8110be80635137ba551af952f2879a8254834dc2
|
| 3 |
size 1575072
|
README.md
CHANGED
|
@@ -5,15 +5,21 @@ tags:
|
|
| 5 |
- text-classification
|
| 6 |
- generated_from_setfit_trainer
|
| 7 |
widget:
|
| 8 |
-
- text:
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
la
|
| 14 |
-
|
| 15 |
-
- text:
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
metrics:
|
| 18 |
- accuracy
|
| 19 |
pipeline_tag: text-classification
|
|
@@ -32,7 +38,7 @@ model-index:
|
|
| 32 |
split: test
|
| 33 |
metrics:
|
| 34 |
- type: accuracy
|
| 35 |
-
value: 0.
|
| 36 |
name: Accuracy
|
| 37 |
---
|
| 38 |
|
|
@@ -64,17 +70,17 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 64 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 65 |
|
| 66 |
### Model Labels
|
| 67 |
-
| Label | Examples
|
| 68 |
-
|:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 69 |
-
| 0 | <ul><li>'
|
| 70 |
-
| 1 | <ul><li>'
|
| 71 |
|
| 72 |
## Evaluation
|
| 73 |
|
| 74 |
### Metrics
|
| 75 |
| Label | Accuracy |
|
| 76 |
|:--------|:---------|
|
| 77 |
-
| **all** | 0.
|
| 78 |
|
| 79 |
## Uses
|
| 80 |
|
|
@@ -94,7 +100,7 @@ from setfit import SetFitModel
|
|
| 94 |
# Download from the 🤗 Hub
|
| 95 |
model = SetFitModel.from_pretrained("fede-m/FGSDI_final_setfit_fold_2")
|
| 96 |
# Run inference
|
| 97 |
-
preds = model("
|
| 98 |
```
|
| 99 |
|
| 100 |
<!--
|
|
@@ -126,12 +132,12 @@ preds = model("E non si venga a dire dell'ostruzionismo.")
|
|
| 126 |
### Training Set Metrics
|
| 127 |
| Training set | Min | Median | Max |
|
| 128 |
|:-------------|:----|:--------|:----|
|
| 129 |
-
| Word count |
|
| 130 |
|
| 131 |
| Label | Training Sample Count |
|
| 132 |
|:------|:----------------------|
|
| 133 |
| 0 | 45 |
|
| 134 |
-
| 1 |
|
| 135 |
|
| 136 |
### Training Hyperparameters
|
| 137 |
- batch_size: (16, 16)
|
|
@@ -155,23 +161,23 @@ preds = model("E non si venga a dire dell'ostruzionismo.")
|
|
| 155 |
### Training Results
|
| 156 |
| Epoch | Step | Training Loss | Validation Loss |
|
| 157 |
|:------:|:----:|:-------------:|:---------------:|
|
| 158 |
-
| 0.0028 | 1 | 0.
|
| 159 |
-
| 0.
|
| 160 |
-
| 0.
|
| 161 |
-
| 0.
|
| 162 |
-
| 0.
|
| 163 |
-
| 0.
|
| 164 |
-
| 0.
|
| 165 |
-
| 0.
|
| 166 |
|
| 167 |
### Framework Versions
|
| 168 |
-
- Python: 3.
|
| 169 |
-
- SetFit: 1.1.
|
| 170 |
-
- Sentence Transformers:
|
| 171 |
-
- Transformers: 4.
|
| 172 |
-
- PyTorch: 2.
|
| 173 |
-
- Datasets:
|
| 174 |
-
- Tokenizers: 0.
|
| 175 |
|
| 176 |
## Citation
|
| 177 |
|
|
|
|
| 5 |
- text-classification
|
| 6 |
- generated_from_setfit_trainer
|
| 7 |
widget:
|
| 8 |
+
- text: In reparto c’era lei [Mariangela Ferrari] quando i genitori della piccola
|
| 9 |
+
Sara [Sara Rapini] giunsero di corsa in ospedale perché la bambina accusava forti
|
| 10 |
+
dolori addominali e aveva febbre alta.
|
| 11 |
+
- text: 'Le parole del testimone Sebastiano F., 55 anni, il testimone citato, assieme
|
| 12 |
+
a un altro, nel dossier sullo scandalo gay nei carmelitani É lui stesso, Sebastiano
|
| 13 |
+
F., originario della Sicilia, a raccontare: «Certo che c’entra la mia storia con
|
| 14 |
+
il prete.'
|
| 15 |
+
- text: «Non lo faccio – ribadisce [Lucrezia Bona] - perché penso che il punto della
|
| 16 |
+
questione non sia questo adesso.
|
| 17 |
+
- text: «Per combattere l’allarmante calo delle vaccinazioni nel nostro Paese ho deciso
|
| 18 |
+
con alcuni colleghi di intervenire con norme idonee, presentando alla Camera un
|
| 19 |
+
progetto di legge che reintroduce l’obbligo per i bambini che frequentano le scuole
|
| 20 |
+
dell’obbligo» ha detto Crimì [Filippo Crimì].
|
| 21 |
+
- text: Ci scusiamo con i cittadini per i disagi, il Comune ha programmato i lavori
|
| 22 |
+
per ridurne al minimo l'impatto".
|
| 23 |
metrics:
|
| 24 |
- accuracy
|
| 25 |
pipeline_tag: text-classification
|
|
|
|
| 38 |
split: test
|
| 39 |
metrics:
|
| 40 |
- type: accuracy
|
| 41 |
+
value: 0.568284789644013
|
| 42 |
name: Accuracy
|
| 43 |
---
|
| 44 |
|
|
|
|
| 70 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 71 |
|
| 72 |
### Model Labels
|
| 73 |
+
| Label | Examples |
|
| 74 |
+
|:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 75 |
+
| 0 | <ul><li>'Sull’aumento del limite al contante «non è vero» quando dice «l’amico» Raffaele Cantone, che favorisce l’evasione, perché «è una misura che dà la possibilità di spendere».'</li><li>'La sua pagina Twitter si è trasformata in un diario spagnolo.'</li><li>'Allagamenti si sono verificati in strade terranei per il sollevamento dei tombini a causa della forte pressione dell’acqua.'</li></ul> |
|
| 76 |
+
| 1 | <ul><li>'Questo vuole Putin [Vladimir Putin], che sa tuttavia di dover stipulare un accordo con gli Usa e con Obama [Barack Obama] in particolare perché chi tra un anno gli succederà non è detto che conceda alla Russia il ruolo di comprimario che Obama [Barack Obama], pur cercando di limitarlo, è comunque disposto a riconoscergli.'</li><li>'Gli imputati sono Jessica Pulizzi, accusata di sequestro di persona e Gaspare Ghaleb accusato di falsa testimonianza.'</li><li>"Laureata in storia greca [Daniela Bellingeri], è approdata al giornale nel 1989, diventando subito l'interlocutore cui affidarsi, anche, in certi casi, aggrapparsi, quando arrivavano richieste di pezzi impossibili a ore impossibili."</li></ul> |
|
| 77 |
|
| 78 |
## Evaluation
|
| 79 |
|
| 80 |
### Metrics
|
| 81 |
| Label | Accuracy |
|
| 82 |
|:--------|:---------|
|
| 83 |
+
| **all** | 0.5683 |
|
| 84 |
|
| 85 |
## Uses
|
| 86 |
|
|
|
|
| 100 |
# Download from the 🤗 Hub
|
| 101 |
model = SetFitModel.from_pretrained("fede-m/FGSDI_final_setfit_fold_2")
|
| 102 |
# Run inference
|
| 103 |
+
preds = model("«Non lo faccio – ribadisce [Lucrezia Bona] - perché penso che il punto della questione non sia questo adesso.")
|
| 104 |
```
|
| 105 |
|
| 106 |
<!--
|
|
|
|
| 132 |
### Training Set Metrics
|
| 133 |
| Training set | Min | Median | Max |
|
| 134 |
|:-------------|:----|:--------|:----|
|
| 135 |
+
| Word count | 1 | 39.6207 | 139 |
|
| 136 |
|
| 137 |
| Label | Training Sample Count |
|
| 138 |
|:------|:----------------------|
|
| 139 |
| 0 | 45 |
|
| 140 |
+
| 1 | 245 |
|
| 141 |
|
| 142 |
### Training Hyperparameters
|
| 143 |
- batch_size: (16, 16)
|
|
|
|
| 161 |
### Training Results
|
| 162 |
| Epoch | Step | Training Loss | Validation Loss |
|
| 163 |
|:------:|:----:|:-------------:|:---------------:|
|
| 164 |
+
| 0.0028 | 1 | 0.5423 | - |
|
| 165 |
+
| 0.1377 | 50 | 0.2061 | - |
|
| 166 |
+
| 0.2755 | 100 | 0.0246 | - |
|
| 167 |
+
| 0.4132 | 150 | 0.0067 | - |
|
| 168 |
+
| 0.5510 | 200 | 0.0019 | - |
|
| 169 |
+
| 0.6887 | 250 | 0.0009 | - |
|
| 170 |
+
| 0.8264 | 300 | 0.0006 | - |
|
| 171 |
+
| 0.9642 | 350 | 0.0006 | - |
|
| 172 |
|
| 173 |
### Framework Versions
|
| 174 |
+
- Python: 3.12.12
|
| 175 |
+
- SetFit: 1.1.3
|
| 176 |
+
- Sentence Transformers: 5.1.2
|
| 177 |
+
- Transformers: 4.57.1
|
| 178 |
+
- PyTorch: 2.8.0+cu126
|
| 179 |
+
- Datasets: 4.0.0
|
| 180 |
+
- Tokenizers: 0.22.1
|
| 181 |
|
| 182 |
## Citation
|
| 183 |
|
config.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
| 6 |
"attention_dropout": 0.1,
|
| 7 |
"dim": 768,
|
| 8 |
"dropout": 0.1,
|
|
|
|
| 9 |
"hidden_dim": 3072,
|
| 10 |
"initializer_range": 0.02,
|
| 11 |
"max_position_embeddings": 512,
|
|
@@ -17,7 +18,6 @@
|
|
| 17 |
"seq_classif_dropout": 0.2,
|
| 18 |
"sinusoidal_pos_embds": false,
|
| 19 |
"tie_weights_": true,
|
| 20 |
-
"
|
| 21 |
-
"transformers_version": "4.52.4",
|
| 22 |
"vocab_size": 119547
|
| 23 |
}
|
|
|
|
| 6 |
"attention_dropout": 0.1,
|
| 7 |
"dim": 768,
|
| 8 |
"dropout": 0.1,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
"hidden_dim": 3072,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"max_position_embeddings": 512,
|
|
|
|
| 18 |
"seq_classif_dropout": 0.2,
|
| 19 |
"sinusoidal_pos_embds": false,
|
| 20 |
"tie_weights_": true,
|
| 21 |
+
"transformers_version": "4.57.1",
|
|
|
|
| 22 |
"vocab_size": 119547
|
| 23 |
}
|
config_sentence_transformers.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
{
|
| 2 |
"__version__": {
|
| 3 |
-
"sentence_transformers": "
|
| 4 |
-
"transformers": "4.
|
| 5 |
-
"pytorch": "2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
},
|
| 7 |
-
"prompts": {},
|
| 8 |
"default_prompt_name": null,
|
| 9 |
"similarity_fn_name": "cosine"
|
| 10 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"__version__": {
|
| 3 |
+
"sentence_transformers": "5.1.2",
|
| 4 |
+
"transformers": "4.57.1",
|
| 5 |
+
"pytorch": "2.8.0+cu126"
|
| 6 |
+
},
|
| 7 |
+
"model_type": "SentenceTransformer",
|
| 8 |
+
"prompts": {
|
| 9 |
+
"query": "",
|
| 10 |
+
"document": ""
|
| 11 |
},
|
|
|
|
| 12 |
"default_prompt_name": null,
|
| 13 |
"similarity_fn_name": "cosine"
|
| 14 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 538947416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:acdc47f724f8b40c15a2b5f3d80dc86bb7379edc41cd78ce58b6038afa3851f6
|
| 3 |
size 538947416
|
model_head.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4959
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3650a9ee8490ed72aedc2bb316881d9ab5d41d2815f3cfb4dcd47ce7e574b3d1
|
| 3 |
size 4959
|
sentence_bert_config.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"max_seq_length": 128,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
}
|