mahitha-t commited on
Commit
ed6294c
·
verified ·
1 Parent(s): f53d064

Push model using huggingface_hub.

Browse files
Files changed (1) hide show
  1. README.md +5 -50
README.md CHANGED
@@ -4,23 +4,17 @@ tags:
4
  - sentence-transformers
5
  - text-classification
6
  - generated_from_setfit_trainer
7
- widget:
8
- - text: This sentence is positive
9
- - text: This sentence is positive
10
- - text: This sentence is negative
11
- - text: This sentence is positive
12
- - text: This sentence is negative
13
  metrics:
14
  - accuracy
15
  pipeline_tag: text-classification
16
  library_name: setfit
17
  inference: true
18
- base_model: TaylorAI/bge-micro-v2
19
  ---
20
 
21
- # SetFit with TaylorAI/bge-micro-v2
22
 
23
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [TaylorAI/bge-micro-v2](https://huggingface.co/TaylorAI/bge-micro-v2) 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.
24
 
25
  The model has been trained using an efficient few-shot learning technique that involves:
26
 
@@ -31,7 +25,7 @@ The model has been trained using an efficient few-shot learning technique that i
31
 
32
  ### Model Description
33
  - **Model Type:** SetFit
34
- - **Sentence Transformer body:** [TaylorAI/bge-micro-v2](https://huggingface.co/TaylorAI/bge-micro-v2)
35
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
36
  - **Maximum Sequence Length:** 512 tokens
37
  - **Number of Classes:** 2 classes
@@ -45,12 +39,6 @@ The model has been trained using an efficient few-shot learning technique that i
45
  - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
46
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
47
 
48
- ### Model Labels
49
- | Label | Examples |
50
- |:------|:----------------------------------------------------------------------------------------------------------------------|
51
- | 0 | <ul><li>'This sentence is positive'</li><li>'This sentence is positive'</li><li>'This sentence is positive'</li></ul> |
52
- | 1 | <ul><li>'This sentence is negative'</li><li>'This sentence is negative'</li><li>'This sentence is negative'</li></ul> |
53
-
54
  ## Uses
55
 
56
  ### Direct Use for Inference
@@ -69,7 +57,7 @@ from setfit import SetFitModel
69
  # Download from the 🤗 Hub
70
  model = SetFitModel.from_pretrained("mahitha-t/text_classification_model")
71
  # Run inference
72
- preds = model("This sentence is positive")
73
  ```
74
 
75
  <!--
@@ -98,39 +86,6 @@ preds = model("This sentence is positive")
98
 
99
  ## Training Details
100
 
101
- ### Training Set Metrics
102
- | Training set | Min | Median | Max |
103
- |:-------------|:----|:-------|:----|
104
- | Word count | 4 | 4.0 | 4 |
105
-
106
- | Label | Training Sample Count |
107
- |:------|:----------------------|
108
- | 0 | 8 |
109
- | 1 | 8 |
110
-
111
- ### Training Hyperparameters
112
- - batch_size: (16, 2)
113
- - num_epochs: (1, 16)
114
- - max_steps: -1
115
- - sampling_strategy: oversampling
116
- - body_learning_rate: (2e-05, 1e-05)
117
- - head_learning_rate: 0.01
118
- - loss: CosineSimilarityLoss
119
- - distance_metric: cosine_distance
120
- - margin: 0.25
121
- - end_to_end: False
122
- - use_amp: False
123
- - warmup_proportion: 0.1
124
- - l2_weight: 0.01
125
- - seed: 42
126
- - eval_max_steps: -1
127
- - load_best_model_at_end: False
128
-
129
- ### Training Results
130
- | Epoch | Step | Training Loss | Validation Loss |
131
- |:------:|:----:|:-------------:|:---------------:|
132
- | 0.1111 | 1 | 0.1561 | - |
133
-
134
  ### Framework Versions
135
  - Python: 3.11.13
136
  - SetFit: 1.1.2
 
4
  - sentence-transformers
5
  - text-classification
6
  - generated_from_setfit_trainer
7
+ widget: []
 
 
 
 
 
8
  metrics:
9
  - accuracy
10
  pipeline_tag: text-classification
11
  library_name: setfit
12
  inference: true
 
13
  ---
14
 
15
+ # SetFit
16
 
17
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
18
 
19
  The model has been trained using an efficient few-shot learning technique that involves:
20
 
 
25
 
26
  ### Model Description
27
  - **Model Type:** SetFit
28
+ <!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
29
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
30
  - **Maximum Sequence Length:** 512 tokens
31
  - **Number of Classes:** 2 classes
 
39
  - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
40
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
41
 
 
 
 
 
 
 
42
  ## Uses
43
 
44
  ### Direct Use for Inference
 
57
  # Download from the 🤗 Hub
58
  model = SetFitModel.from_pretrained("mahitha-t/text_classification_model")
59
  # Run inference
60
+ preds = model("I loved the spiderman movie!")
61
  ```
62
 
63
  <!--
 
86
 
87
  ## Training Details
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  ### Framework Versions
90
  - Python: 3.11.13
91
  - SetFit: 1.1.2