labdmitriy commited on
Commit
fe96f85
·
verified ·
1 Parent(s): 5285a19

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
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,774 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:208
8
+ - loss:BatchSemiHardTripletLoss
9
+ base_model: BAAI/bge-base-en
10
+ widget:
11
+ - source_sentence: '
12
+
13
+ Name : SkillAdvance Academy
14
+
15
+ Category: Online Learning Platform, Professional Development
16
+
17
+ Department: Engineering
18
+
19
+ Location: Austin, TX
20
+
21
+ Amount: 1875.67
22
+
23
+ Card: Continuous Improvement Initiative
24
+
25
+ Trip Name: unknown
26
+
27
+ '
28
+ sentences:
29
+ - '
30
+
31
+ Name : Black Wolf
32
+
33
+ Category: Luxury Vehicle Rentals, Corporate Services
34
+
35
+ Department: Executive
36
+
37
+ Location: Tokyo, Japan
38
+
39
+ Amount: 1478.67
40
+
41
+ Card: Execute Account
42
+
43
+ Trip Name: Tokyo Summit 2023
44
+
45
+ '
46
+ - '
47
+
48
+ Name : Kreutz & Partners
49
+
50
+ Category: Strategic Consulting
51
+
52
+ Department: Marketing
53
+
54
+ Location: Zurich, Switzerland
55
+
56
+ Amount: 982.75
57
+
58
+ Card: Digital Growth Strategy
59
+
60
+ Trip Name: unknown
61
+
62
+ '
63
+ - '
64
+
65
+ Name : Nordiska Hosting Collective
66
+
67
+ Category: Cloud Storage Solutions, Data Security Services
68
+
69
+ Department: IT Operations
70
+
71
+ Location: Helsinki, Finland
72
+
73
+ Amount: 1439.57
74
+
75
+ Card: Annual Data Management Plan
76
+
77
+ Trip Name: unknown
78
+
79
+ '
80
+ - source_sentence: '
81
+
82
+ Name : FusionLink
83
+
84
+ Category: Event Management Solutions, Digital Strategy Services
85
+
86
+ Department: Sales
87
+
88
+ Location: New York, NY
89
+
90
+ Amount: 982.75
91
+
92
+ Card: Product Launch Activation
93
+
94
+ Trip Name: unknown
95
+
96
+ '
97
+ sentences:
98
+ - '
99
+
100
+ Name : Globetrotter Partners
101
+
102
+ Category: Lodging Services, Corporate Retreat Planning
103
+
104
+ Department: Executive
105
+
106
+ Location: Banff, Canada
107
+
108
+ Amount: 1559.75
109
+
110
+ Card: Leadership Development Seminar
111
+
112
+ Trip Name: unknown
113
+
114
+ '
115
+ - '
116
+
117
+ Name : SkyHigh Consultancies
118
+
119
+ Category: Consulting Services, Business Travel Agencies
120
+
121
+ Department: Sales
122
+
123
+ Location: Geneva, Switzerland
124
+
125
+ Amount: 1349.58
126
+
127
+ Card: Strategic Client Meetings
128
+
129
+ Trip Name: Global Expansion Initiative
130
+
131
+ '
132
+ - '
133
+
134
+ Name : Willink Labs
135
+
136
+ Category: Consulting Services, Professional Services
137
+
138
+ Department: Engineering
139
+
140
+ Location: San Francisco, CA
141
+
142
+ Amount: 4500.0
143
+
144
+ Card: Backend Systems Upgrade Analysis
145
+
146
+ Trip Name: unknown
147
+
148
+ '
149
+ - source_sentence: '
150
+
151
+ Name : RBC
152
+
153
+ Category: Transaction Processing, Financial Services
154
+
155
+ Department: Finance
156
+
157
+ Location: Limassol, Cyprus
158
+
159
+ Amount: 843.56
160
+
161
+ Card: Quarterly Financial Management
162
+
163
+ Trip Name: unknown
164
+
165
+ '
166
+ sentences:
167
+ - '
168
+
169
+ Name : Kepler Dynamics
170
+
171
+ Category: Strategic Consultancy, Tech Solutions
172
+
173
+ Department: Finance
174
+
175
+ Location: Zurich, Switzerland
176
+
177
+ Amount: 2375.88
178
+
179
+ Card: Integration Strategy Review
180
+
181
+ Trip Name: unknown
182
+
183
+ '
184
+ - '
185
+
186
+ Name : Global Interconnectivity Corp
187
+
188
+ Category: Data Management Services, Network Infrastructure Consultants
189
+
190
+ Department: Engineering
191
+
192
+ Location: Zurich, Switzerland
193
+
194
+ Amount: 1987.54
195
+
196
+ Card: Unified Communication Rollout
197
+
198
+ Trip Name: unknown
199
+
200
+ '
201
+ - '
202
+
203
+ Name : TechSupply Inc.
204
+
205
+ Category: Electronics Retail, Supply Chain
206
+
207
+ Department: Research & Development
208
+
209
+ Location: Berlin, Germany
210
+
211
+ Amount: 742.45
212
+
213
+ Card: New Prototype Equipment
214
+
215
+ Trip Name: unknown
216
+
217
+ '
218
+ - source_sentence: '
219
+
220
+ Name : EcoClean Systems
221
+
222
+ Category: Environmental Services, Industrial Equipment Care
223
+
224
+ Department: Office Administration
225
+
226
+ Location: San Francisco, CA
227
+
228
+ Amount: 952.63
229
+
230
+ Card: Essential Facility Sustainability
231
+
232
+ Trip Name: unknown
233
+
234
+ '
235
+ sentences:
236
+ - '
237
+
238
+ Name : Wunder
239
+
240
+ Category: Advanced Electronics
241
+
242
+ Department: Operations
243
+
244
+ Location: Munich, Germany
245
+
246
+ Amount: 1643.87
247
+
248
+ Card: Enterprise Systems Initiative
249
+
250
+ Trip Name: Q2-MUC-TechOps
251
+
252
+ '
253
+ - '
254
+
255
+ Name : Pacific Union Services
256
+
257
+ Category: Financial Consulting, Subscription Management
258
+
259
+ Department: Finance
260
+
261
+ Location: Singapore
262
+
263
+ Amount: 129.58
264
+
265
+ Card: Quarterly Financial Account Review
266
+
267
+ Trip Name: unknown
268
+
269
+ '
270
+ - '
271
+
272
+ Name : FirmTrust Advisory
273
+
274
+ Category: Legal Services, Financial Planning
275
+
276
+ Department: Executive
277
+
278
+ Location: London, UK
279
+
280
+ Amount: 1534.76
281
+
282
+ Card: Global Expansion Strategy
283
+
284
+ Trip Name: unknown
285
+
286
+ '
287
+ - source_sentence: '
288
+
289
+ Name : ComplyTech Solutions
290
+
291
+ Category: Regulatory Software, Consultancy Services
292
+
293
+ Department: Compliance
294
+
295
+ Location: Brussels, Belgium
296
+
297
+ Amount: 1095.45
298
+
299
+ Card: Regulatory Compliance Optimization Plan
300
+
301
+ Trip Name: unknown
302
+
303
+ '
304
+ sentences:
305
+ - '
306
+
307
+ Name : TechXperts Global
308
+
309
+ Category: IT Services, Consulting
310
+
311
+ Department: IT Operations
312
+
313
+ Location: Berlin, Germany
314
+
315
+ Amount: 987.49
316
+
317
+ Card: Quarterly System Assessment
318
+
319
+ Trip Name: unknown
320
+
321
+ '
322
+ - '
323
+
324
+ Name : Optix Global
325
+
326
+ Category: Digital Storage Solutions, Office Essentials Provider
327
+
328
+ Department: All Departments
329
+
330
+ Location: Tokyo, Japan
331
+
332
+ Amount: 568.77
333
+
334
+ Card: Monthly Office Needs
335
+
336
+ Trip Name: unknown
337
+
338
+ '
339
+ - '
340
+
341
+ Name : Gandalf
342
+
343
+ Category: Financial Services, Consulting
344
+
345
+ Department: Finance
346
+
347
+ Location: Singapore
348
+
349
+ Amount: 457.29
350
+
351
+ Card: Financial Advisory Services
352
+
353
+ Trip Name: unknown
354
+
355
+ '
356
+ pipeline_tag: sentence-similarity
357
+ library_name: sentence-transformers
358
+ metrics:
359
+ - cosine_accuracy
360
+ - dot_accuracy
361
+ - manhattan_accuracy
362
+ - euclidean_accuracy
363
+ - max_accuracy
364
+ model-index:
365
+ - name: SentenceTransformer based on BAAI/bge-base-en
366
+ results:
367
+ - task:
368
+ type: triplet
369
+ name: Triplet
370
+ dataset:
371
+ name: bge base en train
372
+ type: bge-base-en-train
373
+ metrics:
374
+ - type: cosine_accuracy
375
+ value: 0.8269230769230769
376
+ name: Cosine Accuracy
377
+ - type: dot_accuracy
378
+ value: 0.17307692307692307
379
+ name: Dot Accuracy
380
+ - type: manhattan_accuracy
381
+ value: 0.8269230769230769
382
+ name: Manhattan Accuracy
383
+ - type: euclidean_accuracy
384
+ value: 0.8269230769230769
385
+ name: Euclidean Accuracy
386
+ - type: max_accuracy
387
+ value: 0.8269230769230769
388
+ name: Max Accuracy
389
+ - task:
390
+ type: triplet
391
+ name: Triplet
392
+ dataset:
393
+ name: bge base en eval
394
+ type: bge-base-en-eval
395
+ metrics:
396
+ - type: cosine_accuracy
397
+ value: 0.9848484848484849
398
+ name: Cosine Accuracy
399
+ - type: dot_accuracy
400
+ value: 0.015151515151515152
401
+ name: Dot Accuracy
402
+ - type: manhattan_accuracy
403
+ value: 0.9696969696969697
404
+ name: Manhattan Accuracy
405
+ - type: euclidean_accuracy
406
+ value: 0.9848484848484849
407
+ name: Euclidean Accuracy
408
+ - type: max_accuracy
409
+ value: 0.9848484848484849
410
+ name: Max Accuracy
411
+ ---
412
+
413
+ # SentenceTransformer based on BAAI/bge-base-en
414
+
415
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
416
+
417
+ ## Model Details
418
+
419
+ ### Model Description
420
+ - **Model Type:** Sentence Transformer
421
+ - **Base model:** [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en) <!-- at revision b737bf5dcc6ee8bdc530531266b4804a5d77b5d8 -->
422
+ - **Maximum Sequence Length:** 512 tokens
423
+ - **Output Dimensionality:** 768 tokens
424
+ - **Similarity Function:** Cosine Similarity
425
+ <!-- - **Training Dataset:** Unknown -->
426
+ <!-- - **Language:** Unknown -->
427
+ <!-- - **License:** Unknown -->
428
+
429
+ ### Model Sources
430
+
431
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
432
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
433
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
434
+
435
+ ### Full Model Architecture
436
+
437
+ ```
438
+ SentenceTransformer(
439
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
440
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
441
+ (2): Normalize()
442
+ )
443
+ ```
444
+
445
+ ## Usage
446
+
447
+ ### Direct Usage (Sentence Transformers)
448
+
449
+ First install the Sentence Transformers library:
450
+
451
+ ```bash
452
+ pip install -U sentence-transformers
453
+ ```
454
+
455
+ Then you can load this model and run inference.
456
+ ```python
457
+ from sentence_transformers import SentenceTransformer
458
+
459
+ # Download from the 🤗 Hub
460
+ model = SentenceTransformer("labdmitriy/finetuned-bge-base-en")
461
+ # Run inference
462
+ sentences = [
463
+ '\nName : ComplyTech Solutions\nCategory: Regulatory Software, Consultancy Services\nDepartment: Compliance\nLocation: Brussels, Belgium\nAmount: 1095.45\nCard: Regulatory Compliance Optimization Plan\nTrip Name: unknown\n',
464
+ '\nName : Gandalf\nCategory: Financial Services, Consulting\nDepartment: Finance\nLocation: Singapore\nAmount: 457.29\nCard: Financial Advisory Services\nTrip Name: unknown\n',
465
+ '\nName : TechXperts Global\nCategory: IT Services, Consulting\nDepartment: IT Operations\nLocation: Berlin, Germany\nAmount: 987.49\nCard: Quarterly System Assessment\nTrip Name: unknown\n',
466
+ ]
467
+ embeddings = model.encode(sentences)
468
+ print(embeddings.shape)
469
+ # [3, 768]
470
+
471
+ # Get the similarity scores for the embeddings
472
+ similarities = model.similarity(embeddings, embeddings)
473
+ print(similarities.shape)
474
+ # [3, 3]
475
+ ```
476
+
477
+ <!--
478
+ ### Direct Usage (Transformers)
479
+
480
+ <details><summary>Click to see the direct usage in Transformers</summary>
481
+
482
+ </details>
483
+ -->
484
+
485
+ <!--
486
+ ### Downstream Usage (Sentence Transformers)
487
+
488
+ You can finetune this model on your own dataset.
489
+
490
+ <details><summary>Click to expand</summary>
491
+
492
+ </details>
493
+ -->
494
+
495
+ <!--
496
+ ### Out-of-Scope Use
497
+
498
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
499
+ -->
500
+
501
+ ## Evaluation
502
+
503
+ ### Metrics
504
+
505
+ #### Triplet
506
+ * Dataset: `bge-base-en-train`
507
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
508
+
509
+ | Metric | Value |
510
+ |:-------------------|:-----------|
511
+ | cosine_accuracy | 0.8269 |
512
+ | dot_accuracy | 0.1731 |
513
+ | manhattan_accuracy | 0.8269 |
514
+ | euclidean_accuracy | 0.8269 |
515
+ | **max_accuracy** | **0.8269** |
516
+
517
+ #### Triplet
518
+ * Dataset: `bge-base-en-eval`
519
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
520
+
521
+ | Metric | Value |
522
+ |:-------------------|:-----------|
523
+ | cosine_accuracy | 0.9848 |
524
+ | dot_accuracy | 0.0152 |
525
+ | manhattan_accuracy | 0.9697 |
526
+ | euclidean_accuracy | 0.9848 |
527
+ | **max_accuracy** | **0.9848** |
528
+
529
+ <!--
530
+ ## Bias, Risks and Limitations
531
+
532
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
533
+ -->
534
+
535
+ <!--
536
+ ### Recommendations
537
+
538
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
539
+ -->
540
+
541
+ ## Training Details
542
+
543
+ ### Training Dataset
544
+
545
+ #### Unnamed Dataset
546
+
547
+
548
+ * Size: 208 training samples
549
+ * Columns: <code>sentence</code> and <code>label</code>
550
+ * Approximate statistics based on the first 208 samples:
551
+ | | sentence | label |
552
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
553
+ | type | string | int |
554
+ | details | <ul><li>min: 33 tokens</li><li>mean: 39.62 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>0: ~3.37%</li><li>1: ~3.85%</li><li>2: ~3.85%</li><li>3: ~3.37%</li><li>4: ~6.25%</li><li>5: ~4.81%</li><li>6: ~3.85%</li><li>7: ~3.37%</li><li>8: ~4.33%</li><li>9: ~3.85%</li><li>10: ~2.40%</li><li>11: ~1.92%</li><li>12: ~3.37%</li><li>13: ~3.85%</li><li>14: ~2.88%</li><li>15: ~2.40%</li><li>16: ~5.29%</li><li>17: ~5.77%</li><li>18: ~5.29%</li><li>19: ~4.33%</li><li>20: ~1.92%</li><li>21: ~4.81%</li><li>22: ~2.40%</li><li>23: ~2.40%</li><li>24: ~2.88%</li><li>25: ~4.33%</li><li>26: ~2.88%</li></ul> |
555
+ * Samples:
556
+ | sentence | label |
557
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
558
+ | <code><br>Name : FTC<br>Category: Regulatory Compliance Services, Business Consulting<br>Department: Legal<br>Location: Toronto, Canada<br>Amount: 3594.76<br>Card: Annual Compliance Assessment<br>Trip Name: unknown<br></code> | <code>0</code> |
559
+ | <code><br>Name : IntelliSync Integration<br>Category: Connectivity Services, Enterprise Solutions<br>Department: IT Operations<br>Location: San Francisco, CA<br>Amount: 1387.42<br>Card: Global Connectivity Suite<br>Trip Name: unknown<br></code> | <code>1</code> |
560
+ | <code><br>Name : Omachi Meitetsu<br>Category: Transportation Services, Travel Services<br>Department: Sales<br>Location: Hakkuba Japan<br>Amount: 120.0<br>Card: Quarterly Travel Expenses<br>Trip Name: unknown<br></code> | <code>2</code> |
561
+ * Loss: [<code>BatchSemiHardTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchsemihardtripletloss)
562
+
563
+ ### Evaluation Dataset
564
+
565
+ #### Unnamed Dataset
566
+
567
+
568
+ * Size: 52 evaluation samples
569
+ * Columns: <code>sentence</code> and <code>label</code>
570
+ * Approximate statistics based on the first 52 samples:
571
+ | | sentence | label |
572
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
573
+ | type | string | int |
574
+ | details | <ul><li>min: 32 tokens</li><li>mean: 39.12 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>0: ~3.85%</li><li>1: ~1.92%</li><li>2: ~9.62%</li><li>3: ~5.77%</li><li>4: ~3.85%</li><li>5: ~3.85%</li><li>7: ~3.85%</li><li>8: ~3.85%</li><li>9: ~3.85%</li><li>10: ~3.85%</li><li>11: ~3.85%</li><li>12: ~7.69%</li><li>13: ~7.69%</li><li>14: ~1.92%</li><li>15: ~3.85%</li><li>17: ~1.92%</li><li>18: ~1.92%</li><li>19: ~3.85%</li><li>21: ~1.92%</li><li>23: ~9.62%</li><li>24: ~1.92%</li><li>25: ~1.92%</li><li>26: ~7.69%</li></ul> |
575
+ * Samples:
576
+ | sentence | label |
577
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------|
578
+ | <code><br>Name : NexGen Fiscal Systems<br>Category: Financial Software Solutions, Revenue Management Services<br>Department: Finance<br>Location: San Francisco, CA<br>Amount: 2749.95<br>Card: Q4 Revenue Optimization Initiative<br>Trip Name: unknown<br></code> | <code>15</code> |
579
+ | <code><br>Name : Midnight Brasserie<br>Category: Culinary Experience, Event Catering<br>Department: Marketing<br>Location: Paris, France<br>Amount: 456.87<br>Card: Quarterly Team Building<br>Trip Name: Summer Collaboration Retreat<br></code> | <code>5</code> |
580
+ | <code><br>Name : Zero One<br>Category: Media Production<br>Department: Marketing<br>Location: New York, NY<br>Amount: 7500.0<br>Card: Sales Operating Budget<br>Trip Name: unknown<br></code> | <code>13</code> |
581
+ * Loss: [<code>BatchSemiHardTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchsemihardtripletloss)
582
+
583
+ ### Training Hyperparameters
584
+ #### Non-Default Hyperparameters
585
+
586
+ - `eval_strategy`: steps
587
+ - `per_device_train_batch_size`: 16
588
+ - `per_device_eval_batch_size`: 16
589
+ - `learning_rate`: 2e-05
590
+ - `num_train_epochs`: 5
591
+ - `warmup_ratio`: 0.1
592
+ - `bf16`: True
593
+ - `batch_sampler`: no_duplicates
594
+
595
+ #### All Hyperparameters
596
+ <details><summary>Click to expand</summary>
597
+
598
+ - `overwrite_output_dir`: False
599
+ - `do_predict`: False
600
+ - `eval_strategy`: steps
601
+ - `prediction_loss_only`: True
602
+ - `per_device_train_batch_size`: 16
603
+ - `per_device_eval_batch_size`: 16
604
+ - `per_gpu_train_batch_size`: None
605
+ - `per_gpu_eval_batch_size`: None
606
+ - `gradient_accumulation_steps`: 1
607
+ - `eval_accumulation_steps`: None
608
+ - `torch_empty_cache_steps`: None
609
+ - `learning_rate`: 2e-05
610
+ - `weight_decay`: 0.0
611
+ - `adam_beta1`: 0.9
612
+ - `adam_beta2`: 0.999
613
+ - `adam_epsilon`: 1e-08
614
+ - `max_grad_norm`: 1.0
615
+ - `num_train_epochs`: 5
616
+ - `max_steps`: -1
617
+ - `lr_scheduler_type`: linear
618
+ - `lr_scheduler_kwargs`: {}
619
+ - `warmup_ratio`: 0.1
620
+ - `warmup_steps`: 0
621
+ - `log_level`: passive
622
+ - `log_level_replica`: warning
623
+ - `log_on_each_node`: True
624
+ - `logging_nan_inf_filter`: True
625
+ - `save_safetensors`: True
626
+ - `save_on_each_node`: False
627
+ - `save_only_model`: False
628
+ - `restore_callback_states_from_checkpoint`: False
629
+ - `no_cuda`: False
630
+ - `use_cpu`: False
631
+ - `use_mps_device`: False
632
+ - `seed`: 42
633
+ - `data_seed`: None
634
+ - `jit_mode_eval`: False
635
+ - `use_ipex`: False
636
+ - `bf16`: True
637
+ - `fp16`: False
638
+ - `fp16_opt_level`: O1
639
+ - `half_precision_backend`: auto
640
+ - `bf16_full_eval`: False
641
+ - `fp16_full_eval`: False
642
+ - `tf32`: None
643
+ - `local_rank`: 0
644
+ - `ddp_backend`: None
645
+ - `tpu_num_cores`: None
646
+ - `tpu_metrics_debug`: False
647
+ - `debug`: []
648
+ - `dataloader_drop_last`: False
649
+ - `dataloader_num_workers`: 0
650
+ - `dataloader_prefetch_factor`: None
651
+ - `past_index`: -1
652
+ - `disable_tqdm`: False
653
+ - `remove_unused_columns`: True
654
+ - `label_names`: None
655
+ - `load_best_model_at_end`: False
656
+ - `ignore_data_skip`: False
657
+ - `fsdp`: []
658
+ - `fsdp_min_num_params`: 0
659
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
660
+ - `fsdp_transformer_layer_cls_to_wrap`: None
661
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
662
+ - `deepspeed`: None
663
+ - `label_smoothing_factor`: 0.0
664
+ - `optim`: adamw_torch
665
+ - `optim_args`: None
666
+ - `adafactor`: False
667
+ - `group_by_length`: False
668
+ - `length_column_name`: length
669
+ - `ddp_find_unused_parameters`: None
670
+ - `ddp_bucket_cap_mb`: None
671
+ - `ddp_broadcast_buffers`: False
672
+ - `dataloader_pin_memory`: True
673
+ - `dataloader_persistent_workers`: False
674
+ - `skip_memory_metrics`: True
675
+ - `use_legacy_prediction_loop`: False
676
+ - `push_to_hub`: False
677
+ - `resume_from_checkpoint`: None
678
+ - `hub_model_id`: None
679
+ - `hub_strategy`: every_save
680
+ - `hub_private_repo`: False
681
+ - `hub_always_push`: False
682
+ - `gradient_checkpointing`: False
683
+ - `gradient_checkpointing_kwargs`: None
684
+ - `include_inputs_for_metrics`: False
685
+ - `eval_do_concat_batches`: True
686
+ - `fp16_backend`: auto
687
+ - `push_to_hub_model_id`: None
688
+ - `push_to_hub_organization`: None
689
+ - `mp_parameters`:
690
+ - `auto_find_batch_size`: False
691
+ - `full_determinism`: False
692
+ - `torchdynamo`: None
693
+ - `ray_scope`: last
694
+ - `ddp_timeout`: 1800
695
+ - `torch_compile`: False
696
+ - `torch_compile_backend`: None
697
+ - `torch_compile_mode`: None
698
+ - `dispatch_batches`: None
699
+ - `split_batches`: None
700
+ - `include_tokens_per_second`: False
701
+ - `include_num_input_tokens_seen`: False
702
+ - `neftune_noise_alpha`: None
703
+ - `optim_target_modules`: None
704
+ - `batch_eval_metrics`: False
705
+ - `eval_on_start`: False
706
+ - `use_liger_kernel`: False
707
+ - `eval_use_gather_object`: False
708
+ - `batch_sampler`: no_duplicates
709
+ - `multi_dataset_batch_sampler`: proportional
710
+
711
+ </details>
712
+
713
+ ### Training Logs
714
+ | Epoch | Step | bge-base-en-eval_max_accuracy | bge-base-en-train_max_accuracy |
715
+ |:-----:|:----:|:-----------------------------:|:------------------------------:|
716
+ | 0 | 0 | - | 0.8269 |
717
+ | 5.0 | 65 | 0.9848 | - |
718
+
719
+
720
+ ### Framework Versions
721
+ - Python: 3.12.8
722
+ - Sentence Transformers: 3.1.1
723
+ - Transformers: 4.45.2
724
+ - PyTorch: 2.6.0+cu124
725
+ - Accelerate: 1.3.0
726
+ - Datasets: 3.2.0
727
+ - Tokenizers: 0.20.3
728
+
729
+ ## Citation
730
+
731
+ ### BibTeX
732
+
733
+ #### Sentence Transformers
734
+ ```bibtex
735
+ @inproceedings{reimers-2019-sentence-bert,
736
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
737
+ author = "Reimers, Nils and Gurevych, Iryna",
738
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
739
+ month = "11",
740
+ year = "2019",
741
+ publisher = "Association for Computational Linguistics",
742
+ url = "https://arxiv.org/abs/1908.10084",
743
+ }
744
+ ```
745
+
746
+ #### BatchSemiHardTripletLoss
747
+ ```bibtex
748
+ @misc{hermans2017defense,
749
+ title={In Defense of the Triplet Loss for Person Re-Identification},
750
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
751
+ year={2017},
752
+ eprint={1703.07737},
753
+ archivePrefix={arXiv},
754
+ primaryClass={cs.CV}
755
+ }
756
+ ```
757
+
758
+ <!--
759
+ ## Glossary
760
+
761
+ *Clearly define terms in order to be accessible across audiences.*
762
+ -->
763
+
764
+ <!--
765
+ ## Model Card Authors
766
+
767
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
768
+ -->
769
+
770
+ <!--
771
+ ## Model Card Contact
772
+
773
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
774
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en",
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": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.45.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.1.1",
4
+ "transformers": "4.45.2",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77c3b053b4a39609fc2ccc2808f96eac1aae385bf74c3147f5532c3e80fdf055
3
+ size 437951328
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
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,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_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
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff