albertus-sussex commited on
Commit
6d1d299
·
verified ·
1 Parent(s): 3ce949e

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,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:8470
8
+ - loss:TripletLoss
9
+ base_model: Alibaba-NLP/gte-base-en-v1.5
10
+ widget:
11
+ - source_sentence: $228.92
12
+ sentences:
13
+ - Nikon CAMERA, COOLPIX S3000, BLACK,12 MP - 26207
14
+ - price
15
+ - model
16
+ - $219.99
17
+ - source_sentence: Vivitar ViviCam T324N 12.1 Megapixel Compact Camera - Grape 2.4"
18
+ LCD - 3x Optical Zoom - Electronic (IS) Included - 4000 x 3000 Image - 640 x 480
19
+ Video - AVI - PictBridge
20
+ sentences:
21
+ - manufacturer
22
+ - Vivitar Corporation
23
+ - model
24
+ - C1033 Compact Camera
25
+ - source_sentence: OB FE-4000 12MP DIGTLCAM - GRAY (227120-OB)
26
+ sentences:
27
+ - Nikon Coolpix L22 Point & Shoot Digital Camera - 12 Megapixel - 3" Active...
28
+ - model
29
+ - price
30
+ - $227.34
31
+ - source_sentence: $179.99
32
+ sentences:
33
+ - SONY Cyber-shot DSC-W350 Black 14.1 MP 2.7" 230K LCD 4X Optical Zoom 26mm Wide
34
+ Angle Digital Camera
35
+ - model
36
+ - $129.00
37
+ - price
38
+ - source_sentence: Sony
39
+ sentences:
40
+ - $599.99
41
+ - GE
42
+ - manufacturer
43
+ - price
44
+ pipeline_tag: sentence-similarity
45
+ library_name: sentence-transformers
46
+ metrics:
47
+ - cosine_accuracy
48
+ - silhouette_cosine
49
+ - silhouette_euclidean
50
+ model-index:
51
+ - name: SentenceTransformer based on Alibaba-NLP/gte-base-en-v1.5
52
+ results:
53
+ - task:
54
+ type: triplet
55
+ name: Triplet
56
+ dataset:
57
+ name: Unknown
58
+ type: unknown
59
+ metrics:
60
+ - type: cosine_accuracy
61
+ value: 1.0
62
+ name: Cosine Accuracy
63
+ - type: cosine_accuracy
64
+ value: 1.0
65
+ name: Cosine Accuracy
66
+ - task:
67
+ type: silhouette
68
+ name: Silhouette
69
+ dataset:
70
+ name: Unknown
71
+ type: unknown
72
+ metrics:
73
+ - type: silhouette_cosine
74
+ value: 0.9786282181739807
75
+ name: Silhouette Cosine
76
+ - type: silhouette_euclidean
77
+ value: 0.8664448857307434
78
+ name: Silhouette Euclidean
79
+ - type: silhouette_cosine
80
+ value: 0.9781048893928528
81
+ name: Silhouette Cosine
82
+ - type: silhouette_euclidean
83
+ value: 0.8658740520477295
84
+ name: Silhouette Euclidean
85
+ ---
86
+
87
+ # SentenceTransformer based on Alibaba-NLP/gte-base-en-v1.5
88
+
89
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5). 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.
90
+
91
+ ## Model Details
92
+
93
+ ### Model Description
94
+ - **Model Type:** Sentence Transformer
95
+ - **Base model:** [Alibaba-NLP/gte-base-en-v1.5](https://huggingface.co/Alibaba-NLP/gte-base-en-v1.5) <!-- at revision a829fd0e060bb84554da0dfd354d0de0f7712b7f -->
96
+ - **Maximum Sequence Length:** 512 tokens
97
+ - **Output Dimensionality:** 768 dimensions
98
+ - **Similarity Function:** Cosine Similarity
99
+ <!-- - **Training Dataset:** Unknown -->
100
+ <!-- - **Language:** Unknown -->
101
+ <!-- - **License:** Unknown -->
102
+
103
+ ### Model Sources
104
+
105
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
106
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
107
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
108
+
109
+ ### Full Model Architecture
110
+
111
+ ```
112
+ SentenceTransformer(
113
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: NewModel
114
+ (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})
115
+ )
116
+ ```
117
+
118
+ ## Usage
119
+
120
+ ### Direct Usage (Sentence Transformers)
121
+
122
+ First install the Sentence Transformers library:
123
+
124
+ ```bash
125
+ pip install -U sentence-transformers
126
+ ```
127
+
128
+ Then you can load this model and run inference.
129
+ ```python
130
+ from sentence_transformers import SentenceTransformer
131
+
132
+ # Download from the 🤗 Hub
133
+ model = SentenceTransformer("albertus-sussex/veriscrape-sbert-camera-reference_9_to_verify_1-fold-1")
134
+ # Run inference
135
+ sentences = [
136
+ 'Sony',
137
+ 'GE',
138
+ '$599.99',
139
+ ]
140
+ embeddings = model.encode(sentences)
141
+ print(embeddings.shape)
142
+ # [3, 768]
143
+
144
+ # Get the similarity scores for the embeddings
145
+ similarities = model.similarity(embeddings, embeddings)
146
+ print(similarities.shape)
147
+ # [3, 3]
148
+ ```
149
+
150
+ <!--
151
+ ### Direct Usage (Transformers)
152
+
153
+ <details><summary>Click to see the direct usage in Transformers</summary>
154
+
155
+ </details>
156
+ -->
157
+
158
+ <!--
159
+ ### Downstream Usage (Sentence Transformers)
160
+
161
+ You can finetune this model on your own dataset.
162
+
163
+ <details><summary>Click to expand</summary>
164
+
165
+ </details>
166
+ -->
167
+
168
+ <!--
169
+ ### Out-of-Scope Use
170
+
171
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
172
+ -->
173
+
174
+ ## Evaluation
175
+
176
+ ### Metrics
177
+
178
+ #### Triplet
179
+
180
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
181
+
182
+ | Metric | Value |
183
+ |:--------------------|:--------|
184
+ | **cosine_accuracy** | **1.0** |
185
+
186
+ #### Silhouette
187
+
188
+ * Evaluated with <code>veriscrape.training.SilhouetteEvaluator</code>
189
+
190
+ | Metric | Value |
191
+ |:----------------------|:-----------|
192
+ | **silhouette_cosine** | **0.9786** |
193
+ | silhouette_euclidean | 0.8664 |
194
+
195
+ #### Triplet
196
+
197
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
198
+
199
+ | Metric | Value |
200
+ |:--------------------|:--------|
201
+ | **cosine_accuracy** | **1.0** |
202
+
203
+ #### Silhouette
204
+
205
+ * Evaluated with <code>veriscrape.training.SilhouetteEvaluator</code>
206
+
207
+ | Metric | Value |
208
+ |:----------------------|:-----------|
209
+ | **silhouette_cosine** | **0.9781** |
210
+ | silhouette_euclidean | 0.8659 |
211
+
212
+ <!--
213
+ ## Bias, Risks and Limitations
214
+
215
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
216
+ -->
217
+
218
+ <!--
219
+ ### Recommendations
220
+
221
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
222
+ -->
223
+
224
+ ## Training Details
225
+
226
+ ### Training Dataset
227
+
228
+ #### Unnamed Dataset
229
+
230
+ * Size: 8,470 training samples
231
+ * Columns: <code>anchor</code>, <code>positive</code>, <code>negative</code>, <code>pos_attr_name</code>, and <code>neg_attr_name</code>
232
+ * Approximate statistics based on the first 1000 samples:
233
+ | | anchor | positive | negative | pos_attr_name | neg_attr_name |
234
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|
235
+ | type | string | string | string | string | string |
236
+ | details | <ul><li>min: 3 tokens</li><li>mean: 11.91 tokens</li><li>max: 73 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 11.75 tokens</li><li>max: 79 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 10.76 tokens</li><li>max: 59 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> |
237
+ * Samples:
238
+ | anchor | positive | negative | pos_attr_name | neg_attr_name |
239
+ |:--------------------------------------------------------------------------------------------|:-----------------------------------------------------------------|:------------------------------------------------------------------------------------------------------|:--------------------------|:--------------------------|
240
+ | <code>Nikon Corporation</code> | <code>Nikon</code> | <code>$390.34</code> | <code>manufacturer</code> | <code>price</code> |
241
+ | <code>Sony Cyber-shot DSC-TX9 12.2 Megapixel Compact Camera - 4.43 mm-17.70 mm - Red</code> | <code>Olympus FE-4020 14 Megapixel Compact Camera - White</code> | <code>OLYMPUS-CAMERAS</code> | <code>model</code> | <code>manufacturer</code> |
242
+ | <code>$238.95</code> | <code>$145.31</code> | <code>Fujifilm XP10 12 MP Digital Point and Shoot Camera (Black) BigVALUEInc 8PC Saver Bundle!</code> | <code>price</code> | <code>model</code> |
243
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
244
+ ```json
245
+ {
246
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
247
+ "triplet_margin": 5
248
+ }
249
+ ```
250
+
251
+ ### Evaluation Dataset
252
+
253
+ #### Unnamed Dataset
254
+
255
+ * Size: 942 evaluation samples
256
+ * Columns: <code>anchor</code>, <code>positive</code>, <code>negative</code>, <code>pos_attr_name</code>, and <code>neg_attr_name</code>
257
+ * Approximate statistics based on the first 942 samples:
258
+ | | anchor | positive | negative | pos_attr_name | neg_attr_name |
259
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|
260
+ | type | string | string | string | string | string |
261
+ | details | <ul><li>min: 3 tokens</li><li>mean: 13.4 tokens</li><li>max: 77 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 12.98 tokens</li><li>max: 73 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 10.63 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 3.0 tokens</li><li>max: 3 tokens</li></ul> |
262
+ * Samples:
263
+ | anchor | positive | negative | pos_attr_name | neg_attr_name |
264
+ |:------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:---------------------|:-------------------|:--------------------------|
265
+ | <code>$99.95</code> | <code>$399.99</code> | <code>JVC</code> | <code>price</code> | <code>manufacturer</code> |
266
+ | <code>Pure Flip Video Underwater Case - AWC2T</code> | <code>Coolpix P100 Point & Shoot Digital Camera</code> | <code>$144.95</code> | <code>model</code> | <code>price</code> |
267
+ | <code>Fujifilm FinePix XP10 12.2 Megapixel Compact Camera - 6.40 mm-32 mm - Silver</code> | <code>Sony Cyber-shot DSC-TX5 10.2MP CMOS Digital Camera with 4x Wide Angle Zoom(Black)</code> | <code>$84.00</code> | <code>model</code> | <code>price</code> |
268
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
269
+ ```json
270
+ {
271
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
272
+ "triplet_margin": 5
273
+ }
274
+ ```
275
+
276
+ ### Training Hyperparameters
277
+ #### Non-Default Hyperparameters
278
+
279
+ - `eval_strategy`: epoch
280
+ - `per_device_train_batch_size`: 128
281
+ - `per_device_eval_batch_size`: 128
282
+ - `num_train_epochs`: 5
283
+ - `warmup_ratio`: 0.1
284
+
285
+ #### All Hyperparameters
286
+ <details><summary>Click to expand</summary>
287
+
288
+ - `overwrite_output_dir`: False
289
+ - `do_predict`: False
290
+ - `eval_strategy`: epoch
291
+ - `prediction_loss_only`: True
292
+ - `per_device_train_batch_size`: 128
293
+ - `per_device_eval_batch_size`: 128
294
+ - `per_gpu_train_batch_size`: None
295
+ - `per_gpu_eval_batch_size`: None
296
+ - `gradient_accumulation_steps`: 1
297
+ - `eval_accumulation_steps`: None
298
+ - `torch_empty_cache_steps`: None
299
+ - `learning_rate`: 5e-05
300
+ - `weight_decay`: 0.0
301
+ - `adam_beta1`: 0.9
302
+ - `adam_beta2`: 0.999
303
+ - `adam_epsilon`: 1e-08
304
+ - `max_grad_norm`: 1.0
305
+ - `num_train_epochs`: 5
306
+ - `max_steps`: -1
307
+ - `lr_scheduler_type`: linear
308
+ - `lr_scheduler_kwargs`: {}
309
+ - `warmup_ratio`: 0.1
310
+ - `warmup_steps`: 0
311
+ - `log_level`: passive
312
+ - `log_level_replica`: warning
313
+ - `log_on_each_node`: True
314
+ - `logging_nan_inf_filter`: True
315
+ - `save_safetensors`: True
316
+ - `save_on_each_node`: False
317
+ - `save_only_model`: False
318
+ - `restore_callback_states_from_checkpoint`: False
319
+ - `no_cuda`: False
320
+ - `use_cpu`: False
321
+ - `use_mps_device`: False
322
+ - `seed`: 42
323
+ - `data_seed`: None
324
+ - `jit_mode_eval`: False
325
+ - `use_ipex`: False
326
+ - `bf16`: False
327
+ - `fp16`: False
328
+ - `fp16_opt_level`: O1
329
+ - `half_precision_backend`: auto
330
+ - `bf16_full_eval`: False
331
+ - `fp16_full_eval`: False
332
+ - `tf32`: None
333
+ - `local_rank`: 0
334
+ - `ddp_backend`: None
335
+ - `tpu_num_cores`: None
336
+ - `tpu_metrics_debug`: False
337
+ - `debug`: []
338
+ - `dataloader_drop_last`: False
339
+ - `dataloader_num_workers`: 0
340
+ - `dataloader_prefetch_factor`: None
341
+ - `past_index`: -1
342
+ - `disable_tqdm`: False
343
+ - `remove_unused_columns`: True
344
+ - `label_names`: None
345
+ - `load_best_model_at_end`: False
346
+ - `ignore_data_skip`: False
347
+ - `fsdp`: []
348
+ - `fsdp_min_num_params`: 0
349
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
350
+ - `fsdp_transformer_layer_cls_to_wrap`: None
351
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
352
+ - `deepspeed`: None
353
+ - `label_smoothing_factor`: 0.0
354
+ - `optim`: adamw_torch
355
+ - `optim_args`: None
356
+ - `adafactor`: False
357
+ - `group_by_length`: False
358
+ - `length_column_name`: length
359
+ - `ddp_find_unused_parameters`: None
360
+ - `ddp_bucket_cap_mb`: None
361
+ - `ddp_broadcast_buffers`: False
362
+ - `dataloader_pin_memory`: True
363
+ - `dataloader_persistent_workers`: False
364
+ - `skip_memory_metrics`: True
365
+ - `use_legacy_prediction_loop`: False
366
+ - `push_to_hub`: False
367
+ - `resume_from_checkpoint`: None
368
+ - `hub_model_id`: None
369
+ - `hub_strategy`: every_save
370
+ - `hub_private_repo`: False
371
+ - `hub_always_push`: False
372
+ - `gradient_checkpointing`: False
373
+ - `gradient_checkpointing_kwargs`: None
374
+ - `include_inputs_for_metrics`: False
375
+ - `eval_do_concat_batches`: True
376
+ - `fp16_backend`: auto
377
+ - `push_to_hub_model_id`: None
378
+ - `push_to_hub_organization`: None
379
+ - `mp_parameters`:
380
+ - `auto_find_batch_size`: False
381
+ - `full_determinism`: False
382
+ - `torchdynamo`: None
383
+ - `ray_scope`: last
384
+ - `ddp_timeout`: 1800
385
+ - `torch_compile`: False
386
+ - `torch_compile_backend`: None
387
+ - `torch_compile_mode`: None
388
+ - `dispatch_batches`: None
389
+ - `split_batches`: None
390
+ - `include_tokens_per_second`: False
391
+ - `include_num_input_tokens_seen`: False
392
+ - `neftune_noise_alpha`: None
393
+ - `optim_target_modules`: None
394
+ - `batch_eval_metrics`: False
395
+ - `eval_on_start`: False
396
+ - `use_liger_kernel`: False
397
+ - `eval_use_gather_object`: False
398
+ - `prompts`: None
399
+ - `batch_sampler`: batch_sampler
400
+ - `multi_dataset_batch_sampler`: proportional
401
+
402
+ </details>
403
+
404
+ ### Training Logs
405
+ | Epoch | Step | Training Loss | Validation Loss | cosine_accuracy | silhouette_cosine |
406
+ |:-----:|:----:|:-------------:|:---------------:|:---------------:|:-----------------:|
407
+ | -1 | -1 | - | - | 0.7983 | 0.3401 |
408
+ | 1.0 | 67 | 0.2864 | 0.0 | 1.0 | 0.9784 |
409
+ | 2.0 | 134 | 0.0 | 0.0 | 1.0 | 0.9786 |
410
+ | 3.0 | 201 | 0.0 | 0.0 | 1.0 | 0.9786 |
411
+ | 4.0 | 268 | 0.0 | 0.0 | 1.0 | 0.9786 |
412
+ | 5.0 | 335 | 0.0 | 0.0 | 1.0 | 0.9786 |
413
+ | -1 | -1 | - | - | 1.0 | 0.9781 |
414
+
415
+
416
+ ### Framework Versions
417
+ - Python: 3.10.16
418
+ - Sentence Transformers: 4.0.1
419
+ - Transformers: 4.45.2
420
+ - PyTorch: 2.5.1+cu124
421
+ - Accelerate: 1.5.2
422
+ - Datasets: 3.1.0
423
+ - Tokenizers: 0.20.3
424
+
425
+ ## Citation
426
+
427
+ ### BibTeX
428
+
429
+ #### Sentence Transformers
430
+ ```bibtex
431
+ @inproceedings{reimers-2019-sentence-bert,
432
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
433
+ author = "Reimers, Nils and Gurevych, Iryna",
434
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
435
+ month = "11",
436
+ year = "2019",
437
+ publisher = "Association for Computational Linguistics",
438
+ url = "https://arxiv.org/abs/1908.10084",
439
+ }
440
+ ```
441
+
442
+ #### TripletLoss
443
+ ```bibtex
444
+ @misc{hermans2017defense,
445
+ title={In Defense of the Triplet Loss for Person Re-Identification},
446
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
447
+ year={2017},
448
+ eprint={1703.07737},
449
+ archivePrefix={arXiv},
450
+ primaryClass={cs.CV}
451
+ }
452
+ ```
453
+
454
+ <!--
455
+ ## Glossary
456
+
457
+ *Clearly define terms in order to be accessible across audiences.*
458
+ -->
459
+
460
+ <!--
461
+ ## Model Card Authors
462
+
463
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
464
+ -->
465
+
466
+ <!--
467
+ ## Model Card Contact
468
+
469
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
470
+ -->
config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Alibaba-NLP/gte-base-en-v1.5",
3
+ "architectures": [
4
+ "NewModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "Alibaba-NLP/new-impl--configuration.NewConfig",
9
+ "AutoModel": "Alibaba-NLP/new-impl--modeling.NewModel",
10
+ "AutoModelForMaskedLM": "Alibaba-NLP/new-impl--modeling.NewForMaskedLM",
11
+ "AutoModelForMultipleChoice": "Alibaba-NLP/new-impl--modeling.NewForMultipleChoice",
12
+ "AutoModelForQuestionAnswering": "Alibaba-NLP/new-impl--modeling.NewForQuestionAnswering",
13
+ "AutoModelForSequenceClassification": "Alibaba-NLP/new-impl--modeling.NewForSequenceClassification",
14
+ "AutoModelForTokenClassification": "Alibaba-NLP/new-impl--modeling.NewForTokenClassification"
15
+ },
16
+ "classifier_dropout": null,
17
+ "hidden_act": "gelu",
18
+ "hidden_dropout_prob": 0.1,
19
+ "hidden_size": 768,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "layer_norm_eps": 1e-12,
23
+ "layer_norm_type": "layer_norm",
24
+ "logn_attention_clip1": false,
25
+ "logn_attention_scale": false,
26
+ "max_position_embeddings": 8192,
27
+ "model_type": "new",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "pack_qkv": true,
31
+ "pad_token_id": 0,
32
+ "position_embedding_type": "rope",
33
+ "rope_scaling": {
34
+ "factor": 2.0,
35
+ "type": "ntk"
36
+ },
37
+ "rope_theta": 500000,
38
+ "torch_dtype": "float32",
39
+ "transformers_version": "4.45.2",
40
+ "type_vocab_size": 0,
41
+ "unpad_inputs": false,
42
+ "use_memory_efficient_attention": false,
43
+ "vocab_size": 30528
44
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.1",
4
+ "transformers": "4.45.2",
5
+ "pytorch": "2.5.1+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea7510d772b1c8a109ed5720b1076670d11a1eb855c9bfedb19a87fb605360df
3
+ size 547119128
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": 512,
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,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "mask_token": "[MASK]",
48
+ "max_length": 512,
49
+ "model_max_length": 512,
50
+ "pad_to_multiple_of": null,
51
+ "pad_token": "[PAD]",
52
+ "pad_token_type_id": 0,
53
+ "padding_side": "right",
54
+ "sep_token": "[SEP]",
55
+ "stride": 0,
56
+ "strip_accents": null,
57
+ "tokenize_chinese_chars": true,
58
+ "tokenizer_class": "BertTokenizer",
59
+ "truncation_side": "right",
60
+ "truncation_strategy": "longest_first",
61
+ "unk_token": "[UNK]"
62
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff