weizhou03 commited on
Commit
44c3049
·
verified ·
1 Parent(s): 7f352b4

Push model using huggingface_hub.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,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
+ }
README.md ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - setfit
4
+ - sentence-transformers
5
+ - text-classification
6
+ - generated_from_setfit_trainer
7
+ widget:
8
+ - text: Insert a descriptive caption for the image
9
+ - text: Make the photo lighter
10
+ - text: Move the logo to the top layer
11
+ - text: Make the shape smaller
12
+ - text: Flip the icon vertically
13
+ metrics:
14
+ - accuracy
15
+ pipeline_tag: text-classification
16
+ library_name: setfit
17
+ inference: true
18
+ base_model: nomic-ai/nomic-embed-text-v1.5
19
+ model-index:
20
+ - name: SetFit with nomic-ai/nomic-embed-text-v1.5
21
+ results:
22
+ - task:
23
+ type: text-classification
24
+ name: Text Classification
25
+ dataset:
26
+ name: Unknown
27
+ type: unknown
28
+ split: test
29
+ metrics:
30
+ - type: accuracy
31
+ value: 0.5701459034792368
32
+ name: Accuracy
33
+ ---
34
+
35
+ # SetFit with nomic-ai/nomic-embed-text-v1.5
36
+
37
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [nomic-ai/nomic-embed-text-v1.5](https://huggingface.co/nomic-ai/nomic-embed-text-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.
38
+
39
+ The model has been trained using an efficient few-shot learning technique that involves:
40
+
41
+ 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
42
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
43
+
44
+ ## Model Details
45
+
46
+ ### Model Description
47
+ - **Model Type:** SetFit
48
+ - **Sentence Transformer body:** [nomic-ai/nomic-embed-text-v1.5](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5)
49
+ - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
50
+ - **Maximum Sequence Length:** 8192 tokens
51
+ - **Number of Classes:** 63 classes
52
+ <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
53
+ <!-- - **Language:** Unknown -->
54
+ <!-- - **License:** Unknown -->
55
+
56
+ ### Model Sources
57
+
58
+ - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
59
+ - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
60
+ - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
61
+
62
+ ### Model Labels
63
+ | Label | Examples |
64
+ |:---------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
65
+ | setBorderStyle | <ul><li>'Change the border color to red'</li><li>'Change the border to a pattern'</li><li>'Add a shadow border'</li></ul> |
66
+ | setChildIndex | <ul><li>'Bring the shape to the front'</li><li>'Send the watermark to the back'</li><li>'Bring the button to the front'</li></ul> |
67
+ | undo | <ul><li>'Go back to the original position'</li><li>'Revert the color change'</li><li>'Go back to the original text'</li></ul> |
68
+ | setTextListStyle | <ul><li>'Make the text into bullet points'</li><li>'Convert the text to a list format'</li><li>'Create a bulleted list from the text'</li></ul> |
69
+ | align | <ul><li>'Align all the text elements to the left'</li><li>'Align the images to the right edge'</li><li>'Center align the images on the page'</li></ul> |
70
+ | resetImageSettings | <ul><li>'Remove all edits from the photo'</li><li>'Reset the image to original'</li><li>'Restore the original colors'</li></ul> |
71
+ | rotate | <ul><li>'Turn the logo upside down'</li><li>'Rotate the text 45 degrees'</li><li>'Turn the button around'</li></ul> |
72
+ | ungroup | <ul><li>'Ungroup the combined items'</li><li>'Separate the grouped items'</li><li>'Break apart the grouped components'</li></ul> |
73
+ | setBlendMode | <ul><li>'Set the blend mode to multiply'</li><li>'Change the blend mode to lighten'</li><li>'Set the blend mode to color dodge'</li></ul> |
74
+ | addText | <ul><li>'Add a navigation menu text'</li><li>'Insert a descriptive caption for the image'</li><li>'Add a date and time for the event'</li></ul> |
75
+ | setParagraphSpacing | <ul><li>'Add more paragraph separation'</li><li>'Increase the paragraph gap'</li><li>'Make the text sections tighter'</li></ul> |
76
+ | addAsset | <ul><li>'Add a sports-themed background'</li><li>'Add a tech-themed icon pack'</li><li>'Add a colorful gradient background'</li></ul> |
77
+ | addAssetsUIAction | <ul><li>'I need some decorative elements'</li><li>'I need some professional-looking assets'</li><li>'Can you recommend some images that would work well here?'</li></ul> |
78
+ | redo | <ul><li>'Bring back the original text'</li><li>'Redo the text edit'</li><li>'Redo the last modification'</li></ul> |
79
+ | applyAnimationObjectPreset | <ul><li>'Make the image slide from left'</li><li>'Add a fade-in animation to the text'</li><li>'Add a slide-up animation'</li></ul> |
80
+ | moveRelativeTo | <ul><li>'Move the button to the right'</li><li>'Position the image above the text'</li><li>'Move the shape to the bottom'</li></ul> |
81
+ | resizePage | <ul><li>'Make the page taller'</li><li>'Resize to LinkedIn post dimensions'</li><li>'Make the page portrait orientation'</li></ul> |
82
+ | setBlur | <ul><li>'Blur the logo slightly'</li><li>'Blur the background elements'</li><li>'Add a gaussian blur'</li></ul> |
83
+ | group | <ul><li>'Group the header elements'</li><li>'Group the footer content'</li><li>'Combine the logo and tagline'</li></ul> |
84
+ | displayHelpQA | <ul><li>'How do I group elements together?'</li><li>'How do I add shadows to text?'</li><li>'How can I duplicate elements?'</li></ul> |
85
+ | applyPageLevelAnimation | <ul><li>'Make the page slide in from the right'</li><li>'Add a flip animation to the whole page'</li><li>'Make the page scale in smoothly'</li></ul> |
86
+ | duplicatePage | <ul><li>'Duplicate the page structure'</li><li>'Duplicate the current layout'</li><li>'Make a second version'</li></ul> |
87
+ | setBackgroundColor | <ul><li>'Set the background to cool blue'</li><li>'Change to a dark background'</li><li>'Change to a neutral background'</li></ul> |
88
+ | setLetterSpacing | <ul><li>'Increase spacing between characters'</li><li>'Tighten the letter spacing'</li><li>'Make the text more spaced out'</li></ul> |
89
+ | setWarmth | <ul><li>'Add warm lighting to the image'</li><li>'Make the photo more golden'</li><li>'Make the image more yellow'</li></ul> |
90
+ | setSaturation | <ul><li>'Make the image more muted'</li><li>'Increase the color richness'</li><li>'Reduce the color vibrancy'</li></ul> |
91
+ | replaceText | <ul><li>'Replace the title'</li><li>'Update the navigation text'</li><li>'Replace the menu items'</li></ul> |
92
+ | setLineSpacing | <ul><li>'Increase spacing between lines'</li><li>'Make the text more compact'</li><li>'Make the lines tighter'</li></ul> |
93
+ | setSharpness | <ul><li>'Sharpen the image details'</li><li>'Sharpen the image edges'</li><li>'Increase the detail sharpness'</li></ul> |
94
+ | delete | <ul><li>'Remove the background shape'</li><li>'Delete the broken image'</li><li>'Remove the unnecessary decoration'</li></ul> |
95
+ | setContrast | <ul><li>'Make the colors more vibrant'</li><li>'Make the image more intense'</li><li>'Make the image more striking'</li></ul> |
96
+ | setTextLayout | <ul><li>'Create text that follows a circle'</li><li>'Create circular text around the logo'</li><li>'Make the text follow a custom curve'</li></ul> |
97
+ | generateImageFromText | <ul><li>'Make an image of a vintage car'</li><li>'Generate a picture of a tropical beach'</li><li>'Make an image of a magical forest'</li></ul> |
98
+ | flip | <ul><li>'Flip the text vertically'</li><li>'Flip the icon vertically'</li><li>'Mirror the logo vertically'</li></ul> |
99
+ | generateTemplates | <ul><li>'Create a wedding invitation with floral decorations'</li><li>'Generate a poster for a birthday party'</li><li>'Create a minimalistic menu for a restaurant'</li></ul> |
100
+ | setHighlight | <ul><li>'Enhance the highlight details'</li><li>'Make the highlights more prominent'</li><li>'Brighten the reflective areas'</li></ul> |
101
+ | removeBackground | <ul><li>'Remove the background from the illustration'</li><li>'Remove the background from the item'</li><li>'Remove the background from the animal'</li></ul> |
102
+ | fixTypography | <ul><li>'Fix the letter spacing'</li><li>'Improve the overall typography'</li><li>'Fix the typographic errors'</li></ul> |
103
+ | setBrightness | <ul><li>'Brighten the highlights'</li><li>'Make the image more luminous'</li><li>'Increase the brightness contrast'</li></ul> |
104
+ | changeContentInImage | <ul><li>"Add glasses to the person's face"</li><li>'Remove the logo from the shirt'</li><li>'Add a scarf to the person'</li></ul> |
105
+ | setImageAsBackground | <ul><li>'Make the photo cover the background'</li><li>'Set the photo as page background'</li><li>'Set the picture as full background'</li></ul> |
106
+ | resize | <ul><li>'Reduce the shape size'</li><li>'Make the image larger'</li><li>'Make the shape smaller'</li></ul> |
107
+ | setFontSize | <ul><li>'Make the heading larger'</li><li>'Make the label smaller'</li><li>'Make the quote larger'</li></ul> |
108
+ | showUploadUI | <ul><li>'Show me the upload options'</li><li>'I need to import a file'</li><li>'I want to import an image'</li></ul> |
109
+ | replaceAsset | <ul><li>'Change the decorative element'</li><li>'Change the shape to a different style'</li><li>'Replace the element with an alternative'</li></ul> |
110
+ | distributeAroundObject | <ul><li>'Distribute the text around the focal point'</li><li>'Distribute the elements around the focal point'</li><li>'Place the decorations around the title'</li></ul> |
111
+ | select | <ul><li>'Pick the main text block'</li><li>'Select the logo element'</li><li>'Select the footer content'</li></ul> |
112
+ | setOpacity | <ul><li>'Make the shape more opaque'</li><li>'Reduce the opacity of the shape'</li><li>'Make the background more opaque'</li></ul> |
113
+ | setDropShadow | <ul><li>'Add a long shadow effect'</li><li>'Add a gradient shadow'</li><li>'Create a realistic shadow'</li></ul> |
114
+ | proposeAssets | <ul><li>'Suggest some shape designs'</li><li>'Show me pattern options'</li><li>'Find me some background images'</li></ul> |
115
+ | setShadow | <ul><li>'Increase the shadow intensity'</li><li>'Make the shadows deeper'</li><li>'Make the shadows more prominent'</li></ul> |
116
+ | setCropShape | <ul><li>'Crop the image to a circle'</li><li>'Make the image rectangular'</li><li>'Crop to a custom shape'</li></ul> |
117
+ | setTextAlignment | <ul><li>'Justify the description'</li><li>'Center the tagline'</li><li>'Left align the subtitle'</li></ul> |
118
+ | setFontStyle | <ul><li>'Make the text italic and bold'</li><li>'Make the text bold and underlined'</li><li>'Add bold to the title'</li></ul> |
119
+ | duplicateSceneNode | <ul><li>'Copy the button and resize it'</li><li>'Duplicate the text and change the color'</li><li>'Copy the text and modify it'</li></ul> |
120
+ | setFontType | <ul><li>'Change the font to Arial'</li><li>'Use a script font for the title'</li><li>'Use a minimalist font'</li></ul> |
121
+ | setTextDecorationEffect | <ul><li>'Create a text container'</li><li>'Add a glow effect behind the text'</li><li>'Add a highlight background to the text'</li></ul> |
122
+ | scatter | <ul><li>'Randomly place the icons on the page'</li><li>'Distribute the bubbles randomly'</li><li>'Scatter the stars around the title'</li></ul> |
123
+ | removeContentFromImage | <ul><li>'Delete the unwanted person'</li><li>'Delete the car from the image'</li><li>'Remove the distracting element'</li></ul> |
124
+ | setFillColor | <ul><li>'Fill the element with lime'</li><li>'Change the text color to pink'</li><li>'Change the color to teal'</li></ul> |
125
+ | setTextShadow | <ul><li>'Create a text shadow'</li><li>'Add a dramatic shadow effect'</li><li>'Add a glow effect to the text'</li></ul> |
126
+ | previewFilterEffects | <ul><li>'Add a dramatic contrast effect'</li><li>'Make the image pop with color'</li><li>'Apply a cool blue filter'</li></ul> |
127
+ | duplicateSceneNodeToPage | <ul><li>'Copy the content to the final page'</li><li>'Duplicate the decoration to page 8'</li><li>'Copy the icon to the next slide'</li></ul> |
128
+
129
+ ## Evaluation
130
+
131
+ ### Metrics
132
+ | Label | Accuracy |
133
+ |:--------|:---------|
134
+ | **all** | 0.5701 |
135
+
136
+ ## Uses
137
+
138
+ ### Direct Use for Inference
139
+
140
+ First install the SetFit library:
141
+
142
+ ```bash
143
+ pip install setfit
144
+ ```
145
+
146
+ Then you can load this model and run inference.
147
+
148
+ ```python
149
+ from setfit import SetFitModel
150
+
151
+ # Download from the 🤗 Hub
152
+ model = SetFitModel.from_pretrained("setfit_model_id")
153
+ # Run inference
154
+ preds = model("Make the photo lighter")
155
+ ```
156
+
157
+ <!--
158
+ ### Downstream Use
159
+
160
+ *List how someone could finetune this model on their own dataset.*
161
+ -->
162
+
163
+ <!--
164
+ ### Out-of-Scope Use
165
+
166
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
167
+ -->
168
+
169
+ <!--
170
+ ## Bias, Risks and Limitations
171
+
172
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
173
+ -->
174
+
175
+ <!--
176
+ ### Recommendations
177
+
178
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
179
+ -->
180
+
181
+ ## Training Details
182
+
183
+ ### Training Set Metrics
184
+ | Training set | Min | Median | Max |
185
+ |:-------------|:----|:-------|:----|
186
+ | Word count | 3 | 5.2063 | 11 |
187
+
188
+ | Label | Training Sample Count |
189
+ |:---------------------------|:----------------------|
190
+ | addAsset | 8 |
191
+ | addAssetsUIAction | 8 |
192
+ | addText | 8 |
193
+ | align | 8 |
194
+ | applyAnimationObjectPreset | 8 |
195
+ | applyPageLevelAnimation | 8 |
196
+ | changeContentInImage | 8 |
197
+ | delete | 8 |
198
+ | displayHelpQA | 8 |
199
+ | distributeAroundObject | 8 |
200
+ | duplicatePage | 8 |
201
+ | duplicateSceneNode | 8 |
202
+ | duplicateSceneNodeToPage | 8 |
203
+ | fixTypography | 8 |
204
+ | flip | 8 |
205
+ | generateImageFromText | 8 |
206
+ | generateTemplates | 8 |
207
+ | group | 8 |
208
+ | moveRelativeTo | 8 |
209
+ | previewFilterEffects | 8 |
210
+ | proposeAssets | 8 |
211
+ | redo | 8 |
212
+ | removeBackground | 8 |
213
+ | removeContentFromImage | 8 |
214
+ | replaceAsset | 8 |
215
+ | replaceText | 8 |
216
+ | resetImageSettings | 8 |
217
+ | resize | 8 |
218
+ | resizePage | 8 |
219
+ | rotate | 8 |
220
+ | scatter | 8 |
221
+ | select | 8 |
222
+ | setBackgroundColor | 8 |
223
+ | setBlendMode | 8 |
224
+ | setBlur | 8 |
225
+ | setBorderStyle | 8 |
226
+ | setBrightness | 8 |
227
+ | setChildIndex | 8 |
228
+ | setContrast | 8 |
229
+ | setCropShape | 8 |
230
+ | setDropShadow | 8 |
231
+ | setFillColor | 8 |
232
+ | setFontSize | 8 |
233
+ | setFontStyle | 8 |
234
+ | setFontType | 8 |
235
+ | setHighlight | 8 |
236
+ | setImageAsBackground | 8 |
237
+ | setLetterSpacing | 8 |
238
+ | setLineSpacing | 8 |
239
+ | setOpacity | 8 |
240
+ | setParagraphSpacing | 8 |
241
+ | setSaturation | 8 |
242
+ | setShadow | 8 |
243
+ | setSharpness | 8 |
244
+ | setTextAlignment | 8 |
245
+ | setTextDecorationEffect | 8 |
246
+ | setTextLayout | 8 |
247
+ | setTextListStyle | 8 |
248
+ | setTextShadow | 8 |
249
+ | setWarmth | 8 |
250
+ | showUploadUI | 8 |
251
+ | undo | 8 |
252
+ | ungroup | 8 |
253
+
254
+ ### Training Hyperparameters
255
+ - batch_size: (64, 64)
256
+ - num_epochs: (1, 1)
257
+ - max_steps: -1
258
+ - sampling_strategy: oversampling
259
+ - body_learning_rate: (2e-05, 1e-05)
260
+ - head_learning_rate: 0.01
261
+ - loss: CosineSimilarityLoss
262
+ - distance_metric: cosine_distance
263
+ - margin: 0.25
264
+ - end_to_end: False
265
+ - use_amp: False
266
+ - warmup_proportion: 0.1
267
+ - l2_weight: 0.01
268
+ - seed: 42
269
+ - eval_max_steps: -1
270
+ - load_best_model_at_end: False
271
+
272
+ ### Training Results
273
+ | Epoch | Step | Training Loss | Validation Loss |
274
+ |:------:|:----:|:-------------:|:---------------:|
275
+ | 0.0003 | 1 | 0.1733 | - |
276
+ | 0.0128 | 50 | 0.1425 | - |
277
+ | 0.0256 | 100 | 0.0954 | - |
278
+ | 0.0384 | 150 | 0.0483 | - |
279
+ | 0.0512 | 200 | 0.0297 | - |
280
+ | 0.0640 | 250 | 0.0189 | - |
281
+ | 0.0768 | 300 | 0.0122 | - |
282
+ | 0.0896 | 350 | 0.0099 | - |
283
+ | 0.1024 | 400 | 0.0085 | - |
284
+ | 0.1152 | 450 | 0.0067 | - |
285
+ | 0.1280 | 500 | 0.0059 | - |
286
+ | 0.1408 | 550 | 0.0076 | - |
287
+ | 0.1536 | 600 | 0.0061 | - |
288
+ | 0.1664 | 650 | 0.0049 | - |
289
+ | 0.1792 | 700 | 0.003 | - |
290
+ | 0.1920 | 750 | 0.0023 | - |
291
+ | 0.2048 | 800 | 0.002 | - |
292
+ | 0.2176 | 850 | 0.0037 | - |
293
+ | 0.2304 | 900 | 0.0007 | - |
294
+ | 0.2432 | 950 | 0.0015 | - |
295
+ | 0.2560 | 1000 | 0.0017 | - |
296
+ | 0.2688 | 1050 | 0.0014 | - |
297
+ | 0.2816 | 1100 | 0.0003 | - |
298
+ | 0.2944 | 1150 | 0.0006 | - |
299
+ | 0.3072 | 1200 | 0.001 | - |
300
+ | 0.3200 | 1250 | 0.0007 | - |
301
+ | 0.3328 | 1300 | 0.0002 | - |
302
+ | 0.3456 | 1350 | 0.0012 | - |
303
+ | 0.3584 | 1400 | 0.0006 | - |
304
+ | 0.3712 | 1450 | 0.0003 | - |
305
+ | 0.3840 | 1500 | 0.0005 | - |
306
+ | 0.3968 | 1550 | 0.0002 | - |
307
+ | 0.4096 | 1600 | 0.0004 | - |
308
+ | 0.4224 | 1650 | 0.0009 | - |
309
+ | 0.4352 | 1700 | 0.0007 | - |
310
+ | 0.4480 | 1750 | 0.0003 | - |
311
+ | 0.4608 | 1800 | 0.0001 | - |
312
+ | 0.4736 | 1850 | 0.0006 | - |
313
+ | 0.4864 | 1900 | 0.0004 | - |
314
+ | 0.4992 | 1950 | 0.0004 | - |
315
+ | 0.5120 | 2000 | 0.0001 | - |
316
+ | 0.5248 | 2050 | 0.0004 | - |
317
+ | 0.5376 | 2100 | 0.0003 | - |
318
+ | 0.5504 | 2150 | 0.0012 | - |
319
+ | 0.5632 | 2200 | 0.0006 | - |
320
+ | 0.5760 | 2250 | 0.0001 | - |
321
+ | 0.5888 | 2300 | 0.0003 | - |
322
+ | 0.6016 | 2350 | 0.0007 | - |
323
+ | 0.6144 | 2400 | 0.0003 | - |
324
+ | 0.6272 | 2450 | 0.0004 | - |
325
+ | 0.6400 | 2500 | 0.0006 | - |
326
+ | 0.6528 | 2550 | 0.0001 | - |
327
+ | 0.6656 | 2600 | 0.0003 | - |
328
+ | 0.6784 | 2650 | 0.0006 | - |
329
+ | 0.6912 | 2700 | 0.001 | - |
330
+ | 0.7040 | 2750 | 0.0004 | - |
331
+ | 0.7168 | 2800 | 0.0008 | - |
332
+ | 0.7296 | 2850 | 0.0003 | - |
333
+ | 0.7424 | 2900 | 0.0007 | - |
334
+ | 0.7552 | 2950 | 0.0007 | - |
335
+ | 0.7680 | 3000 | 0.0007 | - |
336
+ | 0.7808 | 3050 | 0.0003 | - |
337
+ | 0.7937 | 3100 | 0.0003 | - |
338
+ | 0.8065 | 3150 | 0.0003 | - |
339
+ | 0.8193 | 3200 | 0.0007 | - |
340
+ | 0.8321 | 3250 | 0.0001 | - |
341
+ | 0.8449 | 3300 | 0.0006 | - |
342
+ | 0.8577 | 3350 | 0.0007 | - |
343
+ | 0.8705 | 3400 | 0.0003 | - |
344
+ | 0.8833 | 3450 | 0.0009 | - |
345
+ | 0.8961 | 3500 | 0.0003 | - |
346
+ | 0.9089 | 3550 | 0.0004 | - |
347
+ | 0.9217 | 3600 | 0.0004 | - |
348
+ | 0.9345 | 3650 | 0.0001 | - |
349
+ | 0.9473 | 3700 | 0.0001 | - |
350
+ | 0.9601 | 3750 | 0.0007 | - |
351
+ | 0.9729 | 3800 | 0.0006 | - |
352
+ | 0.9857 | 3850 | 0.0005 | - |
353
+ | 0.9985 | 3900 | 0.0003 | - |
354
+
355
+ ### Framework Versions
356
+ - Python: 3.12.11
357
+ - SetFit: 1.1.3
358
+ - Sentence Transformers: 5.1.0
359
+ - Transformers: 4.54.1
360
+ - PyTorch: 2.7.1
361
+ - Datasets: 4.0.0
362
+ - Tokenizers: 0.21.4
363
+
364
+ ## Citation
365
+
366
+ ### BibTeX
367
+ ```bibtex
368
+ @article{https://doi.org/10.48550/arxiv.2209.11055,
369
+ doi = {10.48550/ARXIV.2209.11055},
370
+ url = {https://arxiv.org/abs/2209.11055},
371
+ author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
372
+ keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
373
+ title = {Efficient Few-Shot Learning Without Prompts},
374
+ publisher = {arXiv},
375
+ year = {2022},
376
+ copyright = {Creative Commons Attribution 4.0 International}
377
+ }
378
+ ```
379
+
380
+ <!--
381
+ ## Glossary
382
+
383
+ *Clearly define terms in order to be accessible across audiences.*
384
+ -->
385
+
386
+ <!--
387
+ ## Model Card Authors
388
+
389
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
390
+ -->
391
+
392
+ <!--
393
+ ## Model Card Contact
394
+
395
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
396
+ -->
config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "swiglu",
3
+ "architectures": [
4
+ "NomicBertModel"
5
+ ],
6
+ "attn_pdrop": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_hf_nomic_bert.NomicBertConfig",
9
+ "AutoModel": "modeling_hf_nomic_bert.NomicBertModel",
10
+ "AutoModelForMaskedLM": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForPreTraining",
11
+ "AutoModelForMultipleChoice": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForMultipleChoice",
12
+ "AutoModelForQuestionAnswering": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForQuestionAnswering",
13
+ "AutoModelForSequenceClassification": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForSequenceClassification",
14
+ "AutoModelForTokenClassification": "nomic-ai/nomic-bert-2048--modeling_hf_nomic_bert.NomicBertForTokenClassification"
15
+ },
16
+ "bos_token_id": null,
17
+ "causal": false,
18
+ "dense_seq_output": true,
19
+ "embd_pdrop": 0.0,
20
+ "eos_token_id": null,
21
+ "fused_bias_fc": true,
22
+ "fused_dropout_add_ln": true,
23
+ "initializer_range": 0.02,
24
+ "layer_norm_epsilon": 1e-12,
25
+ "max_trained_positions": 2048,
26
+ "mlp_fc1_bias": false,
27
+ "mlp_fc2_bias": false,
28
+ "model_type": "nomic_bert",
29
+ "n_embd": 768,
30
+ "n_head": 12,
31
+ "n_inner": 3072,
32
+ "n_layer": 12,
33
+ "n_positions": 8192,
34
+ "pad_vocab_size_multiple": 64,
35
+ "parallel_block": false,
36
+ "parallel_block_tied_norm": false,
37
+ "prenorm": false,
38
+ "qkv_proj_bias": false,
39
+ "reorder_and_upcast_attn": false,
40
+ "resid_pdrop": 0.0,
41
+ "rotary_emb_base": 1000,
42
+ "rotary_emb_fraction": 1.0,
43
+ "rotary_emb_interleaved": false,
44
+ "rotary_emb_scale_base": null,
45
+ "rotary_scaling_factor": null,
46
+ "scale_attn_by_inverse_layer_idx": false,
47
+ "scale_attn_weights": true,
48
+ "summary_activation": null,
49
+ "summary_first_dropout": 0.0,
50
+ "summary_proj_to_labels": true,
51
+ "summary_type": "cls_index",
52
+ "summary_use_proj": true,
53
+ "torch_dtype": "float32",
54
+ "transformers_version": "4.54.1",
55
+ "type_vocab_size": 2,
56
+ "use_cache": true,
57
+ "use_flash_attn": true,
58
+ "use_rms_norm": false,
59
+ "use_xentropy": true,
60
+ "vocab_size": 30528
61
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.0",
4
+ "transformers": "4.54.1",
5
+ "pytorch": "2.7.1"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
config_setfit.json ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "normalize_embeddings": false,
3
+ "labels": [
4
+ "addAsset",
5
+ "addAssetsUIAction",
6
+ "addText",
7
+ "align",
8
+ "applyAnimationObjectPreset",
9
+ "applyPageLevelAnimation",
10
+ "changeContentInImage",
11
+ "delete",
12
+ "displayHelpQA",
13
+ "distributeAroundObject",
14
+ "duplicatePage",
15
+ "duplicateSceneNode",
16
+ "duplicateSceneNodeToPage",
17
+ "fixTypography",
18
+ "flip",
19
+ "generateImageFromText",
20
+ "generateTemplates",
21
+ "group",
22
+ "moveRelativeTo",
23
+ "previewFilterEffects",
24
+ "proposeAssets",
25
+ "redo",
26
+ "removeBackground",
27
+ "removeContentFromImage",
28
+ "replaceAsset",
29
+ "replaceText",
30
+ "resetImageSettings",
31
+ "resize",
32
+ "resizePage",
33
+ "rotate",
34
+ "scatter",
35
+ "select",
36
+ "setBackgroundColor",
37
+ "setBlendMode",
38
+ "setBlur",
39
+ "setBorderStyle",
40
+ "setBrightness",
41
+ "setChildIndex",
42
+ "setContrast",
43
+ "setCropShape",
44
+ "setDropShadow",
45
+ "setFillColor",
46
+ "setFontSize",
47
+ "setFontStyle",
48
+ "setFontType",
49
+ "setHighlight",
50
+ "setImageAsBackground",
51
+ "setLetterSpacing",
52
+ "setLineSpacing",
53
+ "setOpacity",
54
+ "setParagraphSpacing",
55
+ "setSaturation",
56
+ "setShadow",
57
+ "setSharpness",
58
+ "setTextAlignment",
59
+ "setTextDecorationEffect",
60
+ "setTextLayout",
61
+ "setTextListStyle",
62
+ "setTextShadow",
63
+ "setWarmth",
64
+ "showUploadUI",
65
+ "undo",
66
+ "ungroup"
67
+ ]
68
+ }
configuration_hf_nomic_bert.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import GPT2Config
2
+
3
+
4
+ class NomicBertConfig(GPT2Config):
5
+ model_type = "nomic_bert"
6
+
7
+ def __init__(
8
+ self,
9
+ prenorm=False,
10
+ parallel_block=False,
11
+ parallel_block_tied_norm=False,
12
+ rotary_emb_fraction=0.0,
13
+ fused_dropout_add_ln=False,
14
+ fused_bias_fc=False,
15
+ use_flash_attn=False,
16
+ use_xentropy=False,
17
+ qkv_proj_bias=True,
18
+ rotary_emb_base=10_000,
19
+ rotary_emb_scale_base=None,
20
+ rotary_emb_interleaved=False,
21
+ mlp_fc1_bias=True,
22
+ mlp_fc2_bias=True,
23
+ use_rms_norm=False,
24
+ causal=False,
25
+ type_vocab_size=2,
26
+ dense_seq_output=True,
27
+ pad_vocab_size_multiple=1,
28
+ tie_word_embeddings=True,
29
+ rotary_scaling_factor=None,
30
+ max_trained_positions=2048,
31
+ **kwargs,
32
+ ):
33
+ self.prenorm = prenorm
34
+ self.parallel_block = parallel_block
35
+ self.parallel_block_tied_norm = parallel_block_tied_norm
36
+ self.rotary_emb_fraction = rotary_emb_fraction
37
+ self.tie_word_embeddings = tie_word_embeddings
38
+ self.fused_dropout_add_ln = fused_dropout_add_ln
39
+ self.fused_bias_fc = fused_bias_fc
40
+ self.use_flash_attn = use_flash_attn
41
+ self.use_xentropy = use_xentropy
42
+ self.qkv_proj_bias = qkv_proj_bias
43
+ self.rotary_emb_base = rotary_emb_base
44
+ self.rotary_emb_scale_base = rotary_emb_scale_base
45
+ self.rotary_emb_interleaved = rotary_emb_interleaved
46
+ self.mlp_fc1_bias = mlp_fc1_bias
47
+ self.mlp_fc2_bias = mlp_fc2_bias
48
+ self.use_rms_norm = use_rms_norm
49
+ self.causal = causal
50
+ self.type_vocab_size = type_vocab_size
51
+ self.dense_seq_output = dense_seq_output
52
+ self.pad_vocab_size_multiple = pad_vocab_size_multiple
53
+ self.rotary_scaling_factor = rotary_scaling_factor
54
+ self.max_trained_positions = max_trained_positions
55
+
56
+ super().__init__(**kwargs)
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa9aadd2159de2c42651146a5986764684ab69bce27981e785e6526cc9029108
3
+ size 546938168
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c2fcf5c85e55b03ddb9686e88e2cab24fd04e6aec17e2fa0af1333caca47794
3
+ size 388927
modeling_hf_nomic_bert.py ADDED
The diff for this file is too large to render. See raw diff
 
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 8192,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "BertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff