tg1482 commited on
Commit
2ca6a30
·
verified ·
1 Parent(s): 1dc6bbd

Add SetFit model

Browse files
README.md CHANGED
@@ -11,15 +11,15 @@ tags:
11
  widget:
12
  - text: Point out any dull descriptions that need more color
13
  - text: Find places where I repeat my main points unnecessarily
14
- - text: What's a compelling method to reveal a secret in my plot
15
  - text: How do I handle flashbacks in a non-linear story
16
- - text: Suggest some comedic elements to lighten a dark plot
 
17
  inference: true
18
  ---
19
 
20
  # SetFit
21
 
22
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A LinearDiscriminantAnalysis instance is used for classification.
23
 
24
  The model has been trained using an efficient few-shot learning technique that involves:
25
 
@@ -31,8 +31,8 @@ The model has been trained using an efficient few-shot learning technique that i
31
  ### Model Description
32
  - **Model Type:** SetFit
33
  <!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
34
- - **Classification head:** a LinearDiscriminantAnalysis instance
35
- - **Maximum Sequence Length:** 128 tokens
36
  - **Number of Classes:** 3 classes
37
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
38
  <!-- - **Language:** Unknown -->
@@ -101,13 +101,13 @@ preds = model("How do I handle flashbacks in a non-linear story")
101
  ### Training Set Metrics
102
  | Training set | Min | Median | Max |
103
  |:-------------|:----|:-------|:----|
104
- | Word count | 1 | 8.7947 | 14 |
105
 
106
  | Label | Training Sample Count |
107
  |:----------------------------|:----------------------|
108
- | chat_assistance | 153 |
109
- | comments_assistance | 144 |
110
- | pro_subscription_assistance | 117 |
111
 
112
  ### Framework Versions
113
  - Python: 3.10.15
 
11
  widget:
12
  - text: Point out any dull descriptions that need more color
13
  - text: Find places where I repeat my main points unnecessarily
 
14
  - text: How do I handle flashbacks in a non-linear story
15
+ - text: How can I develop a powerful bond between my characters
16
+ - text: Any suggestions for a surprising end to a short story
17
  inference: true
18
  ---
19
 
20
  # SetFit
21
 
22
+ 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.
23
 
24
  The model has been trained using an efficient few-shot learning technique that involves:
25
 
 
31
  ### Model Description
32
  - **Model Type:** SetFit
33
  <!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
34
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
35
+ - **Maximum Sequence Length:** 512 tokens
36
  - **Number of Classes:** 3 classes
37
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
38
  <!-- - **Language:** Unknown -->
 
101
  ### Training Set Metrics
102
  | Training set | Min | Median | Max |
103
  |:-------------|:----|:-------|:----|
104
+ | Word count | 1 | 8.9171 | 15 |
105
 
106
  | Label | Training Sample Count |
107
  |:----------------------------|:----------------------|
108
+ | chat_assistance | 163 |
109
+ | comments_assistance | 150 |
110
+ | pro_subscription_assistance | 121 |
111
 
112
  ### Framework Versions
113
  - Python: 3.10.15
config.json CHANGED
@@ -1,11 +1,10 @@
1
  {
2
- "_name_or_path": "sentence-transformers/all-MiniLM-L12-v2",
3
  "architectures": [
4
  "BertModel"
5
  ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
8
- "gradient_checkpointing": false,
9
  "hidden_act": "gelu",
10
  "hidden_dropout_prob": 0.1,
11
  "hidden_size": 384,
 
1
  {
2
+ "_name_or_path": "thenlper/gte-small",
3
  "architectures": [
4
  "BertModel"
5
  ],
6
  "attention_probs_dropout_prob": 0.1,
7
  "classifier_dropout": null,
 
8
  "hidden_act": "gelu",
9
  "hidden_dropout_prob": 0.1,
10
  "hidden_size": 384,
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:32ed5a30285dd435b59979b997f7d1c337486ad0b53d3ac0bfc78d779368452e
3
  size 133462128
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:772487fa98b86cf51ec61e86b82e441b7ffe27b2a62179dae487bba07da68c76
3
  size 133462128
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0fb79348a3f4f81d10f2edc336d54f608748484e4225e893bde16ace5cf7280b
3
- size 1194755
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cc523bdeea28859416f375a12072d670d6d44e47e038f94d6c18a32f1fd99ab
3
+ size 10415
sentence_bert_config.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "max_seq_length": 128,
3
  "do_lower_case": false
4
  }
 
1
  {
2
+ "max_seq_length": 512,
3
  "do_lower_case": false
4
  }
tokenizer.json CHANGED
@@ -2,7 +2,7 @@
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
- "max_length": 128,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
 
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
+ "max_length": 512,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
tokenizer_config.json CHANGED
@@ -41,14 +41,14 @@
41
  "special": true
42
  }
43
  },
44
- "clean_up_tokenization_spaces": false,
45
  "cls_token": "[CLS]",
46
  "do_basic_tokenize": true,
47
  "do_lower_case": true,
48
  "extra_special_tokens": {},
49
  "mask_token": "[MASK]",
50
  "max_length": 128,
51
- "model_max_length": 128,
52
  "never_split": null,
53
  "pad_to_multiple_of": null,
54
  "pad_token": "[PAD]",
 
41
  "special": true
42
  }
43
  },
44
+ "clean_up_tokenization_spaces": true,
45
  "cls_token": "[CLS]",
46
  "do_basic_tokenize": true,
47
  "do_lower_case": true,
48
  "extra_special_tokens": {},
49
  "mask_token": "[MASK]",
50
  "max_length": 128,
51
+ "model_max_length": 512,
52
  "never_split": null,
53
  "pad_to_multiple_of": null,
54
  "pad_token": "[PAD]",