Add SetFit model
Browse files- README.md +62 -26
- config.json +1 -1
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
README.md
CHANGED
@@ -15,27 +15,33 @@ widget:
|
|
15 |
attempt to increase tax revenues. A number of the most popular car models’ prices
|
16 |
were about to increase – mostly large family, luxury and sport cars – but for
|
17 |
many models, the retail price was actually reduced.
|
18 |
-
- text:
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
- text:
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
change
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
- text:
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
pipeline_tag: text-classification
|
40 |
inference: false
|
41 |
base_model: sentence-transformers/all-mpnet-base-v2
|
@@ -86,7 +92,7 @@ from setfit import SetFitModel
|
|
86 |
# Download from the 🤗 Hub
|
87 |
model = SetFitModel.from_pretrained("leavoigt/vulnerability_multilabel_updated")
|
88 |
# Run inference
|
89 |
-
preds = model("
|
90 |
```
|
91 |
|
92 |
<!--
|
@@ -118,7 +124,7 @@ preds = model("SocialSecurityandCommunityDevelopment • Financially sound Natio
|
|
118 |
### Training Set Metrics
|
119 |
| Training set | Min | Median | Max |
|
120 |
|:-------------|:----|:--------|:----|
|
121 |
-
| Word count | 21 | 72.
|
122 |
|
123 |
### Training Hyperparameters
|
124 |
- batch_size: (16, 2)
|
@@ -140,14 +146,44 @@ preds = model("SocialSecurityandCommunityDevelopment • Financially sound Natio
|
|
140 |
### Training Results
|
141 |
| Epoch | Step | Training Loss | Validation Loss |
|
142 |
|:------:|:----:|:-------------:|:---------------:|
|
143 |
-
| 0.0006 | 1 | 0.
|
144 |
-
| 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
### Framework Versions
|
147 |
- Python: 3.10.12
|
148 |
- SetFit: 1.0.3
|
149 |
- Sentence Transformers: 2.3.1
|
150 |
-
- Transformers: 4.
|
151 |
- PyTorch: 2.1.0+cu121
|
152 |
- Datasets: 2.3.0
|
153 |
- Tokenizers: 0.15.2
|
|
|
15 |
attempt to increase tax revenues. A number of the most popular car models’ prices
|
16 |
were about to increase – mostly large family, luxury and sport cars – but for
|
17 |
many models, the retail price was actually reduced.
|
18 |
+
- text: Workers in the formal sector. Formal sector workers also face economic risks.
|
19 |
+
A number of them experience income instability due to contractualization, retrenchment,
|
20 |
+
and firm closures. In 2014, contractual workers accounted for 22 percent of the
|
21 |
+
total 4.5 million workers employed in establishments with 20 or more employees.
|
22 |
+
- text: Building additional dams and power stations to further develop energy generation
|
23 |
+
potential from the same river flow as well as develop new dam sites on parallel
|
24 |
+
rivers in order to maintain the baseline hydropower electricity generation capacity
|
25 |
+
to levels attainable under a ‘no-climate change’ scenario. Developing and implementing
|
26 |
+
climate change compatible building/construction codes for buildings, roads, airports,
|
27 |
+
airfields, dry ports, railways, bridges, dams and irrigation canals that are safe
|
28 |
+
for human life and minimize economic damage that is likely to result from increasing
|
29 |
+
extremes in flooding.
|
30 |
+
- text: Another factor that increases farmer vulnerability is the remoteness of farm
|
31 |
+
villages and lack of adequate road infrastructure. Across the three regions, roads
|
32 |
+
are in a poor state and unevenly distributed, with many villages lacking roads
|
33 |
+
that connect them to other villages. Even the main roads are often accessible
|
34 |
+
only during the dry season. The livelihood implications of this isolation are
|
35 |
+
significant, as farmers have difficulties getting their products to markets as
|
36 |
+
well as obtaining agricultural inputs; in addition, farmers generally have to
|
37 |
+
pay higher prices for agricultural inputs in remote areas, reducing their profit
|
38 |
+
margins
|
39 |
+
- text: This project aims to construct a desalination plant in the capital city in
|
40 |
+
order to respond directly to drinking water supply needs. This new plant, which
|
41 |
+
will have a capacity of 22,500 m3 daily, easily expandable to 45,000 m3, will
|
42 |
+
be fuelled by renewable energy, which is expected to be provided by a wind farm
|
43 |
+
planned for the second phase of the project. Funding: European Union. Rural Community
|
44 |
+
Development and Water Mobilization Project (PRODERMO).
|
45 |
pipeline_tag: text-classification
|
46 |
inference: false
|
47 |
base_model: sentence-transformers/all-mpnet-base-v2
|
|
|
92 |
# Download from the 🤗 Hub
|
93 |
model = SetFitModel.from_pretrained("leavoigt/vulnerability_multilabel_updated")
|
94 |
# Run inference
|
95 |
+
preds = model("Workers in the formal sector. Formal sector workers also face economic risks. A number of them experience income instability due to contractualization, retrenchment, and firm closures. In 2014, contractual workers accounted for 22 percent of the total 4.5 million workers employed in establishments with 20 or more employees.")
|
96 |
```
|
97 |
|
98 |
<!--
|
|
|
124 |
### Training Set Metrics
|
125 |
| Training set | Min | Median | Max |
|
126 |
|:-------------|:----|:--------|:----|
|
127 |
+
| Word count | 21 | 72.6472 | 238 |
|
128 |
|
129 |
### Training Hyperparameters
|
130 |
- batch_size: (16, 2)
|
|
|
146 |
### Training Results
|
147 |
| Epoch | Step | Training Loss | Validation Loss |
|
148 |
|:------:|:----:|:-------------:|:---------------:|
|
149 |
+
| 0.0006 | 1 | 0.1906 | - |
|
150 |
+
| 0.0316 | 50 | 0.1275 | 0.1394 |
|
151 |
+
| 0.0631 | 100 | 0.0851 | 0.1247 |
|
152 |
+
| 0.0947 | 150 | 0.0959 | 0.1269 |
|
153 |
+
| 0.1263 | 200 | 0.1109 | 0.1179 |
|
154 |
+
| 0.1578 | 250 | 0.0923 | 0.1354 |
|
155 |
+
| 0.1894 | 300 | 0.063 | 0.1292 |
|
156 |
+
| 0.2210 | 350 | 0.0555 | 0.1326 |
|
157 |
+
| 0.2525 | 400 | 0.0362 | 0.1127 |
|
158 |
+
| 0.2841 | 450 | 0.0582 | 0.132 |
|
159 |
+
| 0.3157 | 500 | 0.0952 | 0.1339 |
|
160 |
+
| 0.3472 | 550 | 0.0793 | 0.1171 |
|
161 |
+
| 0.3788 | 600 | 0.059 | 0.1187 |
|
162 |
+
| 0.4104 | 650 | 0.0373 | 0.1131 |
|
163 |
+
| 0.4419 | 700 | 0.0593 | 0.1144 |
|
164 |
+
| 0.4735 | 750 | 0.0405 | 0.1174 |
|
165 |
+
| 0.5051 | 800 | 0.0284 | 0.1196 |
|
166 |
+
| 0.5366 | 850 | 0.0329 | 0.1116 |
|
167 |
+
| 0.5682 | 900 | 0.0895 | 0.1193 |
|
168 |
+
| 0.5997 | 950 | 0.0576 | 0.1159 |
|
169 |
+
| 0.6313 | 1000 | 0.0385 | 0.1203 |
|
170 |
+
| 0.6629 | 1050 | 0.0842 | 0.1195 |
|
171 |
+
| 0.6944 | 1100 | 0.0274 | 0.113 |
|
172 |
+
| 0.7260 | 1150 | 0.0226 | 0.1137 |
|
173 |
+
| 0.7576 | 1200 | 0.0276 | 0.1204 |
|
174 |
+
| 0.7891 | 1250 | 0.0355 | 0.1163 |
|
175 |
+
| 0.8207 | 1300 | 0.077 | 0.1161 |
|
176 |
+
| 0.8523 | 1350 | 0.0735 | 0.1135 |
|
177 |
+
| 0.8838 | 1400 | 0.0357 | 0.1175 |
|
178 |
+
| 0.9154 | 1450 | 0.0313 | 0.1207 |
|
179 |
+
| 0.9470 | 1500 | 0.0241 | 0.1159 |
|
180 |
+
| 0.9785 | 1550 | 0.0339 | 0.1161 |
|
181 |
|
182 |
### Framework Versions
|
183 |
- Python: 3.10.12
|
184 |
- SetFit: 1.0.3
|
185 |
- Sentence Transformers: 2.3.1
|
186 |
+
- Transformers: 4.38.1
|
187 |
- PyTorch: 2.1.0+cu121
|
188 |
- Datasets: 2.3.0
|
189 |
- Tokenizers: 0.15.2
|
config.json
CHANGED
@@ -19,6 +19,6 @@
|
|
19 |
"pad_token_id": 1,
|
20 |
"relative_attention_num_buckets": 32,
|
21 |
"torch_dtype": "float32",
|
22 |
-
"transformers_version": "4.
|
23 |
"vocab_size": 30527
|
24 |
}
|
|
|
19 |
"pad_token_id": 1,
|
20 |
"relative_attention_num_buckets": 32,
|
21 |
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.38.1",
|
23 |
"vocab_size": 30527
|
24 |
}
|
config_setfit.json
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
{
|
2 |
-
"normalize_embeddings": true,
|
3 |
"labels": [
|
4 |
"Agricultural communities",
|
5 |
"Children",
|
@@ -19,5 +18,6 @@
|
|
19 |
"Sexual minorities (LGBTQI+)",
|
20 |
"Urban populations",
|
21 |
"Women and other genders"
|
22 |
-
]
|
|
|
23 |
}
|
|
|
1 |
{
|
|
|
2 |
"labels": [
|
3 |
"Agricultural communities",
|
4 |
"Children",
|
|
|
18 |
"Sexual minorities (LGBTQI+)",
|
19 |
"Urban populations",
|
20 |
"Women and other genders"
|
21 |
+
],
|
22 |
+
"normalize_embeddings": true
|
23 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 437967672
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc5541650d65cf79ee8d7500f2e924fbcb0063e43ae6a2cfa1e79acb5b89d5c5
|
3 |
size 437967672
|
model_head.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 56918
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3e1a9898cb62e49b33f8ab4771658997a423da599e0f1466da251f91e5d6d58
|
3 |
size 56918
|