Snivellus789 commited on
Commit
cabdb50
1 Parent(s): 070e4dc

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
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,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-small-en-v1.5
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ pipeline_tag: sentence-similarity
7
+ tags:
8
+ - sentence-transformers
9
+ - sentence-similarity
10
+ - feature-extraction
11
+ - generated_from_trainer
12
+ - dataset_size:1000
13
+ - loss:BatchAllTripletLoss
14
+ widget:
15
+ - source_sentence: x-code秦皇岛革命工程车型号,所体现出来的不同原理,车厢分为哪几类,他们的轮子和动力系统又分为哪几种类型?请详细介绍一下。
16
+ sentences:
17
+ - 計算費率給定的延期年金的值。
18
+ - 从系统生物学的视角解读生物科技的重要性。
19
+ - 新的一年于昨天开始了,请协助完成这篇600字的文章进行时事背景介绍制作,主题有关于“跨年夜上海外滩陈毅广场踩踏事件”五周年。
20
+ - source_sentence: 小明家有前后两幅窗户, 前面的有80块玻璃,后面的窗户有36块玻璃, 一共有116块。然后有一天小明前面窗户有6块玻璃碎了,背面的窗户有4块碎了。后来小明爸爸为了修理这两扇窗户,从相同的商店买了5箱玻璃片,每箱里有20片玻璃片。请问为什么小明爸爸要买5箱这么多?请尝试从“最少够买最少的观念”去阐述你的理解。
21
+ sentences:
22
+ - 'Imagine you''re working on a project that involves transforming news articles
23
+ to make them more positive. You''ve been given a list of words that are considered
24
+ negative, and your task is to replace them with positive alternatives. Your list
25
+ includes words like "failure," "loss," and "tragedy." Your goal is to write a
26
+ program in Ruby that can automatically replace these words with their positive
27
+ counterparts.
28
+
29
+ To make things a bit more challenging, you''ve decided to add the ability to handle
30
+ multiple negative words in a single sentence. For example, if a sentence contains
31
+ both "failure" and "loss," your program should replace both words with positive
32
+ alternatives.
33
+
34
+ As an added bonus, you want to include a table that shows the comparison between
35
+ the negative and positive words. The table should include columns for the original
36
+ negative word, its positive replacement, and a brief explanation of why the replacement
37
+ is more positive.
38
+
39
+ Can you write a program in Ruby that meets these requirements? '
40
+ - 'In the field of e-commerce, how can Scala be used to perform a comprehensive
41
+ analysis of purchasing behavior, including identification of the most frequently
42
+ purchased products and recommendation of the top three to the marketing team?
43
+ To accomplish this, one would load the relevant data into a DataFrame, clean the
44
+ data by eliminating missing or duplicated values, then explore the data using
45
+ calculated product purchase frequencies. After identifying the top three products
46
+ with the highest purchase frequencies, visualizations could be created to aid
47
+ in communicating these findings to the marketing team. These products would then
48
+ be recommended for targeted advertising campaigns. Please note that this process
49
+ assumes that the product information is stored in the second column of the dataset,
50
+ although the specific column index may vary depending on the dataset. '
51
+ - 'Can you write a JavaScript code that will prompt users to input their names and
52
+ messages and display them on the HTML page in a scrambled order? The displayed
53
+ dialogue should require the user to unscramble the conversation in order to understand
54
+ it. Use the following table to scramble the messages:
55
+
56
+ | Original Character | Scrambled Character |
57
+
58
+ |-------------------|---------------------|
59
+
60
+ | A | E |
61
+
62
+ | B | Q |
63
+
64
+ | C | X |
65
+
66
+ | D | Z |
67
+
68
+ | E | F |
69
+
70
+ | F | Y |
71
+
72
+ | G | H |
73
+
74
+ | H | P |
75
+
76
+ | I | K |
77
+
78
+ | J | L |
79
+
80
+ | K | W |
81
+
82
+ | L | M |
83
+
84
+ | M | S |
85
+
86
+ | N | O |
87
+
88
+ | O | T |
89
+
90
+ | P | U |
91
+
92
+ | Q | R |
93
+
94
+ | R | D |
95
+
96
+ | S | N |
97
+
98
+ | T | V |
99
+
100
+ | U | G |
101
+
102
+ | V | J |
103
+
104
+ | W | A |
105
+
106
+ | X | I |
107
+
108
+ | Y | B |
109
+
110
+ | Z | C |
111
+
112
+ Hint: Use the ASCII values of the characters to perform the scrambling. '
113
+ - source_sentence: 'I have a challenge for you that involves some complex reasoning
114
+ and optimization techniques. I need you to identify a word that can be replaced
115
+ by an extensive list of synonyms while keeping its original meaning intact. However,
116
+ you cannot use a simple synonym generator. Instead, you must use the WordNet lexical
117
+ database and perform multi-step reasoning to find context-specific synonyms. To
118
+ make things even more challenging, the puzzle should also involve optimization
119
+ techniques that can reduce processing time for larger datasets. Can you provide
120
+ me with a Scala code snippet that solves this puzzle? Remember, the solution should
121
+ not be a straightforward synonym replacement, but rather a well-thought-out process
122
+ that involves sophisticated reasoning and optimization. '
123
+ sentences:
124
+ - 讨论一下人口老龄化对经济社会的影响。
125
+ - 想象一下,你在一个迷宫里,四周是高墙,墙上有许多按钮,按下后就会出现谜语,你需要解开谜语才能前进。现在假设你面前有一个按钮,按下去,出现了这个谜语:
126
+ - 'How can I modify the given Java code to output the phrase "If only I could find
127
+ my way to the treasure, I would be rich beyond my wildest dreams." using only
128
+ two variables and without using any additional ones?
129
+
130
+ Here''s the given Java code:
131
+
132
+ String a = "If only I could find my way to the treasure, ";
133
+
134
+ String b = "I would be rich beyond my wildest dreams.";
135
+
136
+ System.out.println(a + b);
137
+
138
+ How can I modify this code to meet the new requirements? '
139
+ - source_sentence: 帮我写一个新年祝福吧
140
+ sentences:
141
+ - 评估一则算式:(111 * 222 * 333 * 444 * 555 * 666 * 777 * 888 * 999)/ 111,111
142
+ - '请将_matrix: f(1,0) f(0,1)左乘以下矩阵: 0 -1, 1 1,求出结果。'
143
+ - 创建一个存储所有已知星座的字典,但对于某些星座,给定的缩写可能有误。你的程序应该纠正这些错误的缩写,并为用户提供星座的正确全名。你的程序还必须能够对新输入的星座和缩写是否正确。
144
+ - source_sentence: 'In Swift, what function can I use to shorten the sentence "I''m
145
+ feeling kind of tired after having worked all day" while maintaining the same
146
+ meaning and tone? Can you provide an example of the shortened sentence using the
147
+ function? '
148
+ sentences:
149
+ - "How can we use C++ to perform sentiment analysis on customer reviews and generate\
150
+ \ appropriate taglines for our face masks product while also taking into account\
151
+ \ different age group preferences? Can you provide a sample code that demonstrates\
152
+ \ how we can use libraries such as NLTK and Stanford CoreNLP to analyze sentiment\
153
+ \ and generate taglines based on the results?\n[C++ code]\n#include <iostream>\n\
154
+ #include <fstream>\n#include <string>\n#include <vector>\n#include <algorithm>\n\
155
+ #include <iterator>\n#include <nltk/nltk.h>\n#include <stanfordcorenlp/stanfordcorenlp.h>\n\
156
+ using namespace std;\nint main()\n{\n // read customer reviews from file\n\
157
+ \ ifstream file(\"reviews.txt\");\n string review;\n vector<string> reviews;\n\
158
+ \ while (getline(file, review)) {\n reviews.push_back(review);\n \
159
+ \ }\n // initialize NLTK and Stanford CoreNLP\n nltk::init();\n stanfordcorenlp::StanfordCoreNLP\
160
+ \ pipeline;\n // analyze sentiment for each review and generate tagline\n \
161
+ \ for (const auto& review : reviews) {\n auto sentiment = pipeline.sentiment_analysis(review);\n\
162
+ \ string tagline;\n if (sentiment == \"positive\") {\n \
163
+ \ tagline = \"Protect yourself in style!\";\n } else if (sentiment ==\
164
+ \ \"negative\") {\n tagline = \"Stay safe and comfortable!\";\n \
165
+ \ } else {\n tagline = \"Stay protected with our high-quality masks!\"\
166
+ ;\n }\n // consider age group preferences and adjust tagline accordingly\n\
167
+ \ // ...\n cout << \"Review: \" << review << endl;\n cout\
168
+ \ << \"Sentiment: \" << sentiment << endl;\n cout << \"Tagline: \" << tagline\
169
+ \ << endl;\n }\n // cleanup NLTK and Stanford CoreNLP\n nltk::cleanup();\n\
170
+ \ pipeline.shutdown();\n return 0;\n} "
171
+ - "How can I create a C# program that generates a travel itinerary based on user\
172
+ \ preferences and available destinations? The program should take into account\
173
+ \ factors such as budget, time of year, and desired activities (such as hiking\
174
+ \ or sightseeing). Please use the following data format to represent the available\
175
+ \ destinations:\n```csharp\nList<Destination> destinations = new List<Destination>\n\
176
+ {\n new Destination\n {\n Name = \"Paris\",\n Country = \"\
177
+ France\",\n Activities = new List<string> {\"sightseeing\", \"shopping\"\
178
+ , \"museums\"},\n Cost = 5000,\n Season = \"spring\"\n },\n \
179
+ \ new Destination\n {\n Name = \"Tokyo\",\n Country = \"Japan\"\
180
+ ,\n Activities = new List<string> {\"sightseeing\", \"food\", \"temples\"\
181
+ },\n Cost = 8000,\n Season = \"fall\"\n },\n new Destination\n\
182
+ \ {\n Name = \"Sydney\",\n Country = \"Australia\",\n \
183
+ \ Activities = new List<string> {\"beaches\", \"hiking\", \"wildlife\"},\n \
184
+ \ Cost = 7000,\n Season = \"summer\"\n },\n new Destination\n\
185
+ \ {\n Name = \"Marrakesh\",\n Country = \"Morocco\",\n \
186
+ \ Activities = new List<string> {\"sightseeing\", \"shopping\", \"food\"},\n\
187
+ \ Cost = 4000,\n Season = \"winter\"\n }\n};\npublic class Destination\n\
188
+ {\n public string Name { get; set; }\n public string Country { get; set;\
189
+ \ }\n public List<string> Activities { get; set; }\n public int Cost { get;\
190
+ \ set; }\n public string Season { get; set; }\n}\n```\nPlease provide step-by-step\
191
+ \ instructions for using the program and any necessary inputs. "
192
+ - "Convert the given XML code to JSON code. <root>\n <data>\n <item id=\"\
193
+ 1\">\n <name>Sample data</name>\n <type>Text</type>\n \
194
+ \ <value>123</value>\n </item>\n </data>\n</root>"
195
+ ---
196
+
197
+ # SentenceTransformer based on BAAI/bge-small-en-v1.5
198
+
199
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
200
+
201
+ ## Model Details
202
+
203
+ ### Model Description
204
+ - **Model Type:** Sentence Transformer
205
+ - **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
206
+ - **Maximum Sequence Length:** 512 tokens
207
+ - **Output Dimensionality:** 384 tokens
208
+ - **Similarity Function:** Cosine Similarity
209
+ <!-- - **Training Dataset:** Unknown -->
210
+ <!-- - **Language:** Unknown -->
211
+ <!-- - **License:** Unknown -->
212
+
213
+ ### Model Sources
214
+
215
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
216
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
217
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
218
+
219
+ ### Full Model Architecture
220
+
221
+ ```
222
+ SentenceTransformer(
223
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
224
+ (1): Pooling({'word_embedding_dimension': 384, '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})
225
+ (2): Normalize()
226
+ )
227
+ ```
228
+
229
+ ## Usage
230
+
231
+ ### Direct Usage (Sentence Transformers)
232
+
233
+ First install the Sentence Transformers library:
234
+
235
+ ```bash
236
+ pip install -U sentence-transformers
237
+ ```
238
+
239
+ Then you can load this model and run inference.
240
+ ```python
241
+ from sentence_transformers import SentenceTransformer
242
+
243
+ # Download from the 🤗 Hub
244
+ model = SentenceTransformer("Snivellus789/router-embedding-tuned")
245
+ # Run inference
246
+ sentences = [
247
+ 'In Swift, what function can I use to shorten the sentence "I\'m feeling kind of tired after having worked all day" while maintaining the same meaning and tone? Can you provide an example of the shortened sentence using the function? ',
248
+ 'Convert the given XML code to JSON code. <root>\n <data>\n <item id="1">\n <name>Sample data</name>\n <type>Text</type>\n <value>123</value>\n </item>\n </data>\n</root>',
249
+ 'How can I create a C# program that generates a travel itinerary based on user preferences and available destinations? The program should take into account factors such as budget, time of year, and desired activities (such as hiking or sightseeing). Please use the following data format to represent the available destinations:\n```csharp\nList<Destination> destinations = new List<Destination>\n{\n new Destination\n {\n Name = "Paris",\n Country = "France",\n Activities = new List<string> {"sightseeing", "shopping", "museums"},\n Cost = 5000,\n Season = "spring"\n },\n new Destination\n {\n Name = "Tokyo",\n Country = "Japan",\n Activities = new List<string> {"sightseeing", "food", "temples"},\n Cost = 8000,\n Season = "fall"\n },\n new Destination\n {\n Name = "Sydney",\n Country = "Australia",\n Activities = new List<string> {"beaches", "hiking", "wildlife"},\n Cost = 7000,\n Season = "summer"\n },\n new Destination\n {\n Name = "Marrakesh",\n Country = "Morocco",\n Activities = new List<string> {"sightseeing", "shopping", "food"},\n Cost = 4000,\n Season = "winter"\n }\n};\npublic class Destination\n{\n public string Name { get; set; }\n public string Country { get; set; }\n public List<string> Activities { get; set; }\n public int Cost { get; set; }\n public string Season { get; set; }\n}\n```\nPlease provide step-by-step instructions for using the program and any necessary inputs. ',
250
+ ]
251
+ embeddings = model.encode(sentences)
252
+ print(embeddings.shape)
253
+ # [3, 384]
254
+
255
+ # Get the similarity scores for the embeddings
256
+ similarities = model.similarity(embeddings, embeddings)
257
+ print(similarities.shape)
258
+ # [3, 3]
259
+ ```
260
+
261
+ <!--
262
+ ### Direct Usage (Transformers)
263
+
264
+ <details><summary>Click to see the direct usage in Transformers</summary>
265
+
266
+ </details>
267
+ -->
268
+
269
+ <!--
270
+ ### Downstream Usage (Sentence Transformers)
271
+
272
+ You can finetune this model on your own dataset.
273
+
274
+ <details><summary>Click to expand</summary>
275
+
276
+ </details>
277
+ -->
278
+
279
+ <!--
280
+ ### Out-of-Scope Use
281
+
282
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
283
+ -->
284
+
285
+ <!--
286
+ ## Bias, Risks and Limitations
287
+
288
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
289
+ -->
290
+
291
+ <!--
292
+ ### Recommendations
293
+
294
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
295
+ -->
296
+
297
+ ## Training Details
298
+
299
+ ### Training Dataset
300
+
301
+ #### Unnamed Dataset
302
+
303
+
304
+ * Size: 1,000 training samples
305
+ * Columns: <code>sentence</code> and <code>label</code>
306
+ * Approximate statistics based on the first 1000 samples:
307
+ | | sentence | label |
308
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------|
309
+ | type | string | int |
310
+ | details | <ul><li>min: 8 tokens</li><li>mean: 95.61 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>0: ~50.00%</li><li>1: ~50.00%</li></ul> |
311
+ * Samples:
312
+ | sentence | label |
313
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
314
+ | <code>请输出所有跟政企市场相关的关键词列表</code> | <code>0</code> |
315
+ | <code>开发一个定制的JavaScript解决方案,用于有效地平衡和排序一个二叉树。你可以假设输入是一个平衡因子擯至2的大O()为Log(N)的AVL树。专注于实现自我调整二叉搜索树的变换,当面对不平衡操作时,如插入或删除节点。确保你的解决方案为潜在的边缘案例做好准备,并具有健壮的错误处理策略。你的代码应该清晰地记录和优化效率。</code> | <code>0</code> |
316
+ | <code>在一个尚未被公开的领域中,描述五个最具创新性的产品概念。</code> | <code>0</code> |
317
+ * Loss: [<code>BatchAllTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss)
318
+
319
+ ### Training Hyperparameters
320
+ #### Non-Default Hyperparameters
321
+
322
+ - `per_device_train_batch_size`: 16
323
+ - `per_device_eval_batch_size`: 16
324
+ - `learning_rate`: 2e-05
325
+ - `num_train_epochs`: 2
326
+ - `warmup_ratio`: 0.1
327
+ - `bf16`: True
328
+ - `batch_sampler`: no_duplicates
329
+
330
+ #### All Hyperparameters
331
+ <details><summary>Click to expand</summary>
332
+
333
+ - `overwrite_output_dir`: False
334
+ - `do_predict`: False
335
+ - `eval_strategy`: no
336
+ - `prediction_loss_only`: True
337
+ - `per_device_train_batch_size`: 16
338
+ - `per_device_eval_batch_size`: 16
339
+ - `per_gpu_train_batch_size`: None
340
+ - `per_gpu_eval_batch_size`: None
341
+ - `gradient_accumulation_steps`: 1
342
+ - `eval_accumulation_steps`: None
343
+ - `learning_rate`: 2e-05
344
+ - `weight_decay`: 0.0
345
+ - `adam_beta1`: 0.9
346
+ - `adam_beta2`: 0.999
347
+ - `adam_epsilon`: 1e-08
348
+ - `max_grad_norm`: 1.0
349
+ - `num_train_epochs`: 2
350
+ - `max_steps`: -1
351
+ - `lr_scheduler_type`: linear
352
+ - `lr_scheduler_kwargs`: {}
353
+ - `warmup_ratio`: 0.1
354
+ - `warmup_steps`: 0
355
+ - `log_level`: passive
356
+ - `log_level_replica`: warning
357
+ - `log_on_each_node`: True
358
+ - `logging_nan_inf_filter`: True
359
+ - `save_safetensors`: True
360
+ - `save_on_each_node`: False
361
+ - `save_only_model`: False
362
+ - `restore_callback_states_from_checkpoint`: False
363
+ - `no_cuda`: False
364
+ - `use_cpu`: False
365
+ - `use_mps_device`: False
366
+ - `seed`: 42
367
+ - `data_seed`: None
368
+ - `jit_mode_eval`: False
369
+ - `use_ipex`: False
370
+ - `bf16`: True
371
+ - `fp16`: False
372
+ - `fp16_opt_level`: O1
373
+ - `half_precision_backend`: auto
374
+ - `bf16_full_eval`: False
375
+ - `fp16_full_eval`: False
376
+ - `tf32`: None
377
+ - `local_rank`: 0
378
+ - `ddp_backend`: None
379
+ - `tpu_num_cores`: None
380
+ - `tpu_metrics_debug`: False
381
+ - `debug`: []
382
+ - `dataloader_drop_last`: False
383
+ - `dataloader_num_workers`: 0
384
+ - `dataloader_prefetch_factor`: None
385
+ - `past_index`: -1
386
+ - `disable_tqdm`: False
387
+ - `remove_unused_columns`: True
388
+ - `label_names`: None
389
+ - `load_best_model_at_end`: False
390
+ - `ignore_data_skip`: False
391
+ - `fsdp`: []
392
+ - `fsdp_min_num_params`: 0
393
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
394
+ - `fsdp_transformer_layer_cls_to_wrap`: None
395
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
396
+ - `deepspeed`: None
397
+ - `label_smoothing_factor`: 0.0
398
+ - `optim`: adamw_torch
399
+ - `optim_args`: None
400
+ - `adafactor`: False
401
+ - `group_by_length`: False
402
+ - `length_column_name`: length
403
+ - `ddp_find_unused_parameters`: None
404
+ - `ddp_bucket_cap_mb`: None
405
+ - `ddp_broadcast_buffers`: False
406
+ - `dataloader_pin_memory`: True
407
+ - `dataloader_persistent_workers`: False
408
+ - `skip_memory_metrics`: True
409
+ - `use_legacy_prediction_loop`: False
410
+ - `push_to_hub`: False
411
+ - `resume_from_checkpoint`: None
412
+ - `hub_model_id`: None
413
+ - `hub_strategy`: every_save
414
+ - `hub_private_repo`: False
415
+ - `hub_always_push`: False
416
+ - `gradient_checkpointing`: False
417
+ - `gradient_checkpointing_kwargs`: None
418
+ - `include_inputs_for_metrics`: False
419
+ - `eval_do_concat_batches`: True
420
+ - `fp16_backend`: auto
421
+ - `push_to_hub_model_id`: None
422
+ - `push_to_hub_organization`: None
423
+ - `mp_parameters`:
424
+ - `auto_find_batch_size`: False
425
+ - `full_determinism`: False
426
+ - `torchdynamo`: None
427
+ - `ray_scope`: last
428
+ - `ddp_timeout`: 1800
429
+ - `torch_compile`: False
430
+ - `torch_compile_backend`: None
431
+ - `torch_compile_mode`: None
432
+ - `dispatch_batches`: None
433
+ - `split_batches`: None
434
+ - `include_tokens_per_second`: False
435
+ - `include_num_input_tokens_seen`: False
436
+ - `neftune_noise_alpha`: None
437
+ - `optim_target_modules`: None
438
+ - `batch_eval_metrics`: False
439
+ - `eval_on_start`: False
440
+ - `batch_sampler`: no_duplicates
441
+ - `multi_dataset_batch_sampler`: proportional
442
+
443
+ </details>
444
+
445
+ ### Training Logs
446
+ | Epoch | Step | Training Loss |
447
+ |:------:|:----:|:-------------:|
448
+ | 1.5873 | 100 | 0.0963 |
449
+
450
+
451
+ ### Framework Versions
452
+ - Python: 3.10.12
453
+ - Sentence Transformers: 3.0.1
454
+ - Transformers: 4.42.4
455
+ - PyTorch: 2.3.1+cu121
456
+ - Accelerate: 0.33.0.dev0
457
+ - Datasets: 2.20.0
458
+ - Tokenizers: 0.19.1
459
+
460
+ ## Citation
461
+
462
+ ### BibTeX
463
+
464
+ #### Sentence Transformers
465
+ ```bibtex
466
+ @inproceedings{reimers-2019-sentence-bert,
467
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
468
+ author = "Reimers, Nils and Gurevych, Iryna",
469
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
470
+ month = "11",
471
+ year = "2019",
472
+ publisher = "Association for Computational Linguistics",
473
+ url = "https://arxiv.org/abs/1908.10084",
474
+ }
475
+ ```
476
+
477
+ #### BatchAllTripletLoss
478
+ ```bibtex
479
+ @misc{hermans2017defense,
480
+ title={In Defense of the Triplet Loss for Person Re-Identification},
481
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
482
+ year={2017},
483
+ eprint={1703.07737},
484
+ archivePrefix={arXiv},
485
+ primaryClass={cs.CV}
486
+ }
487
+ ```
488
+
489
+ <!--
490
+ ## Glossary
491
+
492
+ *Clearly define terms in order to be accessible across audiences.*
493
+ -->
494
+
495
+ <!--
496
+ ## Model Card Authors
497
+
498
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
499
+ -->
500
+
501
+ <!--
502
+ ## Model Card Contact
503
+
504
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
505
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-small-en-v1.5",
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,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.42.4",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.42.4",
5
+ "pytorch": "2.3.1+cu121"
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:3226f6ea2e0e045ca3a0a3803f6ab931daeed1db1de4c33005d6e37312736202
3
+ size 133462128
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