patrickfleith
commited on
Commit
•
54762f6
1
Parent(s):
cd17af0
Push model using huggingface_hub.
Browse files- README.md +84 -6
- config.json +1 -1
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +1 -1
- tokenizer_config.json +0 -7
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
base_model:
|
3 |
library_name: setfit
|
4 |
metrics:
|
5 |
- accuracy
|
@@ -9,13 +9,38 @@ tags:
|
|
9 |
- sentence-transformers
|
10 |
- text-classification
|
11 |
- generated_from_setfit_trainer
|
12 |
-
widget:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
inference: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
---
|
15 |
|
16 |
-
# SetFit with
|
17 |
|
18 |
-
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [
|
19 |
|
20 |
The model has been trained using an efficient few-shot learning technique that involves:
|
21 |
|
@@ -26,7 +51,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
26 |
|
27 |
### Model Description
|
28 |
- **Model Type:** SetFit
|
29 |
-
- **Sentence Transformer body:** [
|
30 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
31 |
- **Maximum Sequence Length:** 512 tokens
|
32 |
- **Number of Classes:** 3 classes
|
@@ -40,6 +65,20 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
40 |
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
41 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
## Uses
|
44 |
|
45 |
### Direct Use for Inference
|
@@ -58,7 +97,7 @@ from setfit import SetFitModel
|
|
58 |
# Download from the 🤗 Hub
|
59 |
model = SetFitModel.from_pretrained("patrickfleith/my-awesome-astro-text-classifier")
|
60 |
# Run inference
|
61 |
-
preds = model("
|
62 |
```
|
63 |
|
64 |
<!--
|
@@ -87,6 +126,45 @@ preds = model("I loved the spiderman movie!")
|
|
87 |
|
88 |
## Training Details
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
### Framework Versions
|
91 |
- Python: 3.10.12
|
92 |
- SetFit: 1.0.3
|
|
|
1 |
---
|
2 |
+
base_model: BAAI/bge-small-en-v1.5
|
3 |
library_name: setfit
|
4 |
metrics:
|
5 |
- accuracy
|
|
|
9 |
- sentence-transformers
|
10 |
- text-classification
|
11 |
- generated_from_setfit_trainer
|
12 |
+
widget:
|
13 |
+
- text: How does the choice of oxidizer, such as liquid oxygen or nitrogen tetroxide,
|
14 |
+
affect the performance and handling requirements of a rocket engine?
|
15 |
+
- text: Rocket engines designed for vacuum operation often incorporate radiative cooling
|
16 |
+
methods, utilizing large surface areas to dissipate heat in the absence of convective
|
17 |
+
cooling mechanisms.
|
18 |
+
- text: Thermo-optical properties of surface materials, such as absorptivity and emissivity,
|
19 |
+
are critical parameters in the design of the thermal control subsystem.
|
20 |
+
- text: The thrust produced by a rocket engine is a function of the mass flow rate
|
21 |
+
of the propellant and the velocity of the exhaust gases as they exit the nozzle.
|
22 |
+
- text: Thermal analysis of a satellite involves finite element modeling to predict
|
23 |
+
temperature gradients and ensure proper thermal design and component placement.
|
24 |
inference: true
|
25 |
+
model-index:
|
26 |
+
- name: SetFit with BAAI/bge-small-en-v1.5
|
27 |
+
results:
|
28 |
+
- task:
|
29 |
+
type: text-classification
|
30 |
+
name: Text Classification
|
31 |
+
dataset:
|
32 |
+
name: Unknown
|
33 |
+
type: unknown
|
34 |
+
split: test
|
35 |
+
metrics:
|
36 |
+
- type: accuracy
|
37 |
+
value: 1.0
|
38 |
+
name: Accuracy
|
39 |
---
|
40 |
|
41 |
+
# SetFit with BAAI/bge-small-en-v1.5
|
42 |
|
43 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
|
44 |
|
45 |
The model has been trained using an efficient few-shot learning technique that involves:
|
46 |
|
|
|
51 |
|
52 |
### Model Description
|
53 |
- **Model Type:** SetFit
|
54 |
+
- **Sentence Transformer body:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5)
|
55 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
56 |
- **Maximum Sequence Length:** 512 tokens
|
57 |
- **Number of Classes:** 3 classes
|
|
|
65 |
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
66 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
67 |
|
68 |
+
### Model Labels
|
69 |
+
| Label | Examples |
|
70 |
+
|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
71 |
+
| Propulsion | <ul><li>"Rocket engines operate on the principle of Newton's Third Law of Motion, where the expulsion of high-speed exhaust gases produces a reaction force that propels the rocket forward."</li><li>'The combustion efficiency of a rocket engine depends on factors like propellant mixture ratio, injector design, and combustion chamber pressure.'</li><li>'Deep throttling capability, which allows a rocket engine to vary its thrust over a wide range, is essential for applications requiring precise landing maneuvers, such as lunar landers.'</li></ul> |
|
72 |
+
| Power Subsystem | <ul><li>'Redundant power paths and autonomous fault detection mechanisms are implemented to ensure continuous electrical supply even in the event of subsystem failures or external anomalies.'</li><li>'Electromagnetic interference (EMI) shielding and grounding techniques are essential in satellite design to prevent power system noise from affecting sensitive communication and navigation subsystems.'</li><li>'Autonomous diagnostic and recovery protocols are embedded within the power management system to isolate and rectify faults, ensuring mission continuity.'</li></ul> |
|
73 |
+
| Thermal Control | <ul><li>'The thermal control subsystem must accommodate both internal heat generated by electronic components and external thermal loads from the space environment.'</li><li>'Describe the impact of albedo and infrared emissions from Earth on satellite thermal design.'</li><li>'Passive thermal control elements, such as multi-layer insulation (MLI), surface coatings, and radiators, are used to minimize thermal fluctuations and radiation absorption.'</li></ul> |
|
74 |
+
|
75 |
+
## Evaluation
|
76 |
+
|
77 |
+
### Metrics
|
78 |
+
| Label | Accuracy |
|
79 |
+
|:--------|:---------|
|
80 |
+
| **all** | 1.0 |
|
81 |
+
|
82 |
## Uses
|
83 |
|
84 |
### Direct Use for Inference
|
|
|
97 |
# Download from the 🤗 Hub
|
98 |
model = SetFitModel.from_pretrained("patrickfleith/my-awesome-astro-text-classifier")
|
99 |
# Run inference
|
100 |
+
preds = model("How does the choice of oxidizer, such as liquid oxygen or nitrogen tetroxide, affect the performance and handling requirements of a rocket engine?")
|
101 |
```
|
102 |
|
103 |
<!--
|
|
|
126 |
|
127 |
## Training Details
|
128 |
|
129 |
+
### Training Set Metrics
|
130 |
+
| Training set | Min | Median | Max |
|
131 |
+
|:-------------|:----|:--------|:----|
|
132 |
+
| Word count | 11 | 22.2368 | 30 |
|
133 |
+
|
134 |
+
| Label | Training Sample Count |
|
135 |
+
|:----------------|:----------------------|
|
136 |
+
| Propulsion | 15 |
|
137 |
+
| Thermal Control | 14 |
|
138 |
+
| Power Subsystem | 9 |
|
139 |
+
|
140 |
+
### Training Hyperparameters
|
141 |
+
- batch_size: (32, 32)
|
142 |
+
- num_epochs: (10, 10)
|
143 |
+
- max_steps: -1
|
144 |
+
- sampling_strategy: oversampling
|
145 |
+
- body_learning_rate: (2e-05, 1e-05)
|
146 |
+
- head_learning_rate: 0.01
|
147 |
+
- loss: CosineSimilarityLoss
|
148 |
+
- distance_metric: cosine_distance
|
149 |
+
- margin: 0.25
|
150 |
+
- end_to_end: False
|
151 |
+
- use_amp: False
|
152 |
+
- warmup_proportion: 0.1
|
153 |
+
- seed: 42
|
154 |
+
- eval_max_steps: -1
|
155 |
+
- load_best_model_at_end: False
|
156 |
+
|
157 |
+
### Training Results
|
158 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
159 |
+
|:------:|:----:|:-------------:|:---------------:|
|
160 |
+
| 0.0333 | 1 | 0.2377 | - |
|
161 |
+
| 1.6667 | 50 | 0.0551 | - |
|
162 |
+
| 3.3333 | 100 | 0.0046 | - |
|
163 |
+
| 5.0 | 150 | 0.0031 | - |
|
164 |
+
| 6.6667 | 200 | 0.0024 | - |
|
165 |
+
| 8.3333 | 250 | 0.0022 | - |
|
166 |
+
| 10.0 | 300 | 0.002 | - |
|
167 |
+
|
168 |
### Framework Versions
|
169 |
- Python: 3.10.12
|
170 |
- SetFit: 1.0.3
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "BAAI/bge-small-en-v1.5",
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
config_setfit.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
-
"normalize_embeddings": false,
|
3 |
"labels": [
|
4 |
"Propulsion",
|
5 |
"Thermal Control",
|
6 |
"Power Subsystem"
|
7 |
-
]
|
|
|
8 |
}
|
|
|
1 |
{
|
|
|
2 |
"labels": [
|
3 |
"Propulsion",
|
4 |
"Thermal Control",
|
5 |
"Power Subsystem"
|
6 |
+
],
|
7 |
+
"normalize_embeddings": false
|
8 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 133462128
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:20dfc9830ecb5f48de13002e979b34f400b7464bf88f3f45681deb68998b7551
|
3 |
size 133462128
|
model_head.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 10255
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f8213047d5e6788e2b87b6291b19cfe913e64a14a25fdc5fad543009527f02fa
|
3 |
size 10255
|
tokenizer_config.json
CHANGED
@@ -46,19 +46,12 @@
|
|
46 |
"do_basic_tokenize": true,
|
47 |
"do_lower_case": true,
|
48 |
"mask_token": "[MASK]",
|
49 |
-
"max_length": 512,
|
50 |
"model_max_length": 512,
|
51 |
"never_split": null,
|
52 |
-
"pad_to_multiple_of": null,
|
53 |
"pad_token": "[PAD]",
|
54 |
-
"pad_token_type_id": 0,
|
55 |
-
"padding_side": "right",
|
56 |
"sep_token": "[SEP]",
|
57 |
-
"stride": 0,
|
58 |
"strip_accents": null,
|
59 |
"tokenize_chinese_chars": true,
|
60 |
"tokenizer_class": "BertTokenizer",
|
61 |
-
"truncation_side": "right",
|
62 |
-
"truncation_strategy": "longest_first",
|
63 |
"unk_token": "[UNK]"
|
64 |
}
|
|
|
46 |
"do_basic_tokenize": true,
|
47 |
"do_lower_case": true,
|
48 |
"mask_token": "[MASK]",
|
|
|
49 |
"model_max_length": 512,
|
50 |
"never_split": null,
|
|
|
51 |
"pad_token": "[PAD]",
|
|
|
|
|
52 |
"sep_token": "[SEP]",
|
|
|
53 |
"strip_accents": null,
|
54 |
"tokenize_chinese_chars": true,
|
55 |
"tokenizer_class": "BertTokenizer",
|
|
|
|
|
56 |
"unk_token": "[UNK]"
|
57 |
}
|