Snivellus789 commited on
Commit
332f937
·
verified ·
1 Parent(s): 3d8a980

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,555 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-small-en-v1.5
3
+ library_name: sentence-transformers
4
+ pipeline_tag: sentence-similarity
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:1944
11
+ - loss:BatchAllTripletLoss
12
+ widget:
13
+ - source_sentence: 計算費率給定的延期年金的值。
14
+ sentences:
15
+ - "How can I generate a random list of 10 adjectives in Spanish using Ruby? Can\
16
+ \ you provide me with the Ruby code to generate this list and display it in an\
17
+ \ HTML page similar to the example given below?\n<!DOCTYPE html>\n<html>\n<head>\n\
18
+ \t<title>Random Adjectives in Spanish</title>\n</head>\n<body>\n\t<h1>Random Adjectives\
19
+ \ in Spanish</h1>\n\t<p>Here are ten random examples of adjectives in Spanish:</p>\n\
20
+ \t<ul>\n\t\t<li><strong>Bonito</strong> - Beautiful</li>\n\t\t<li><strong>Tranquilo</strong>\
21
+ \ - Calm</li>\n\t\t<li><strong>Grande</strong> - Big</li>\n\t\t<li><strong>Pequeño</strong>\
22
+ \ - Small</li>\n\t\t<li><strong>Interesante</strong> - Interesting</li>\n\t\t\
23
+ <li><strong>Dulce</strong> - Sweet</li>\n\t\t<li><strong>Divertido</strong> -\
24
+ \ Fun</li>\n\t\t<li><strong>Bueno</strong> - Good</li>\n\t\t<li><strong>Malo</strong>\
25
+ \ - Bad</li>\n\t\t<li><strong>Viejo</strong> - Old</li>\n\t</ul>\n</body>\n</html>\n\
26
+ Please include the Ruby code to generate the random list of adjectives and display\
27
+ \ it in the HTML page. "
28
+ - 创建一个尽可能高效的Python排序算法,可以在大数据量下处理包含重复元素的整数数组。你的算法还应处理负数和零。此外,给出相应的复杂度分析。
29
+ - 好的质量要求标注于射线底片上的IR191的国际标准有哪些常见要求?____、____及____。
30
+ - source_sentence: "How can I modify the above Scala code to use XML data instead\
31
+ \ of CSV data for training and test sets? \nAssuming the XML data is formatted\
32
+ \ as follows:\n<dataset>\n <instance>\n <age>32</age>\n <income>75000</income>\n\
33
+ \ <category>Technology</category>\n <gender>Male</gender>\n <label>1</label>\n\
34
+ \ </instance>\n <instance>\n <age>45</age>\n <income>85000</income>\n\
35
+ \ <category>Finance</category>\n <gender>Female</gender>\n <label>0</label>\n\
36
+ \ </instance>\n ...\n</dataset>\nHere is the modified Scala code using Apache\
37
+ \ Spark's MLlib library and XML data:\n// Import necessary libraries\nimport org.apache.spark.ml.classification.LogisticRegression\n\
38
+ import org.apache.spark.ml.evaluation.BinaryClassificationEvaluator\nimport org.apache.spark.ml.feature.{VectorAssembler,\
39
+ \ StringIndexer}\nimport org.apache.spark.sql.functions.{explode, col}\n// Load\
40
+ \ the training and test data from XML files\nval trainingData = spark.read\n \
41
+ \ .format(\"com.databricks.spark.xml\")\n .option(\"rowTag\", \"instance\")\n\
42
+ \ .load(\"training_data.xml\")\nval testData = spark.read\n .format(\"com.databricks.spark.xml\"\
43
+ )\n .option(\"rowTag\", \"instance\")\n .load(\"test_data.xml\")\n// Convert\
44
+ \ categorical features to numerical using StringIndexer\nval categoricalCols =\
45
+ \ Array(\"category\", \"gender\")\nval indexers = categoricalCols.map(col => new\
46
+ \ StringIndexer().setInputCol(col).setOutputCol(col + \"_index\"))\nval pipeline\
47
+ \ = new Pipeline().setStages(indexers)\nval indexedTrainingData = pipeline.fit(trainingData).transform(trainingData)\n\
48
+ val indexedTestData = pipeline.fit(testData).transform(testData)\n// Assemble\
49
+ \ all features into a single vector column\nval assembler = new VectorAssembler().setInputCols(Array(\"\
50
+ age\", \"income\", \"category_index\", \"gender_index\")).setOutputCol(\"features\"\
51
+ )\nval trainingDataWithFeatures = assembler.transform(indexedTrainingData)\nval\
52
+ \ testDataWithFeatures = assembler.transform(indexedTestData)\n// Train the logistic\
53
+ \ regression model\nval lr = new LogisticRegression().setLabelCol(\"label\").setFeaturesCol(\"\
54
+ features\")\nval model = lr.fit(trainingDataWithFeatures)\n// Make predictions\
55
+ \ on the test data\nval predictions = model.transform(testDataWithFeatures)\n\
56
+ // Evaluate the model using the binary classification evaluator\nval evaluator\
57
+ \ = new BinaryClassificationEvaluator().setLabelCol(\"label\").setRawPredictionCol(\"\
58
+ rawPrediction\")\nval auc = evaluator.evaluate(predictions) // Area Under the\
59
+ \ ROC Curve (AUC) score\nprintln(\"Area Under the ROC Curve (AUC) score: \" +\
60
+ \ auc) "
61
+ sentences:
62
+ - "How can I use Ruby to solve this puzzle and calculate the difference between\
63
+ \ the average population density of metropolitan and non-metropolitan areas? And\
64
+ \ as an added challenge, how can I determine the top 3 metropolitan areas with\
65
+ \ the highest population density and the bottom 3 non-metropolitan areas with\
66
+ \ the lowest population density?\nHere's the data for the puzzle:\n[{\"city\"\
67
+ : \"New York\", \"population\": 8398748, \"area\": 468.9, \"metropolitan\": true},\n\
68
+ \ {\"city\": \"Los Angeles\", \"population\": 3990456, \"area\": 502.7, \"metropolitan\"\
69
+ : true},\n {\"city\": \"Chicago\", \"population\": 2705994, \"area\": 227.3, \"\
70
+ metropolitan\": true},\n {\"city\": \"Houston\", \"population\": 2325502, \"area\"\
71
+ : 637.5, \"metropolitan\": true},\n {\"city\": \"Phoenix\", \"population\": 1660272,\
72
+ \ \"area\": 517.6, \"metropolitan\": true},\n {\"city\": \"Philadelphia\", \"\
73
+ population\": 1584138, \"area\": 347.6, \"metropolitan\": true},\n {\"city\":\
74
+ \ \"San Antonio\", \"population\": 1532233, \"area\": 1196.5, \"metropolitan\"\
75
+ : true},\n {\"city\": \"San Diego\", \"population\": 1425976, \"area\": 964.5,\
76
+ \ \"metropolitan\": true},\n {\"city\": \"Dallas\", \"population\": 1345047, \"\
77
+ area\": 999.3, \"metropolitan\": true},\n {\"city\": \"San Jose\", \"population\"\
78
+ : 1030119, \"area\": 467.4, \"metropolitan\": true},\n {\"city\": \"Austin\",\
79
+ \ \"population\": 964254, \"area\": 815.2, \"metropolitan\": true},\n {\"city\"\
80
+ : \"Fort Worth\", \"population\": 895008, \"area\": 874.4, \"metropolitan\": true},\n\
81
+ \ {\"city\": \"Columbus\", \"population\": 892533, \"area\": 571.8, \"metropolitan\"\
82
+ : true},\n {\"city\": \"San Francisco\", \"population\": 883305, \"area\": 121.4,\
83
+ \ \"metropolitan\": true},\n {\"city\": \"Charlotte\", \"population\": 872498,\
84
+ \ \"area\": 771.0, \"metropolitan\": true},\n {\"city\": \"Indianapolis\", \"\
85
+ population\": 867125, \"area\": 372.9, \"metropolitan\": true},\n {\"city\": \"\
86
+ Seattle\", \"population\": 744955, \"area\": 217.2, \"metropolitan\": true},\n\
87
+ \ {\"city\": \"Denver\", \"population\": 716492, \"area\": 401.2, \"metropolitan\"\
88
+ : true},\n {\"city\": \"Washington\", \"population\": 702455, \"area\": 177.0,\
89
+ \ \"metropolitan\": true},\n {\"city\": \"Boston\", \"population\": 694583, \"\
90
+ area\": 89.6, \"metropolitan\": true},\n {\"city\": \"Nashville-Davidson\", \"\
91
+ population\": 669053, \"area\": 1558.0, \"metropolitan\": true},\n {\"city\":\
92
+ \ \"El Paso\", \"population\": 649121, \"area\": 667.0, \"metropolitan\": true},\n\
93
+ \ {\"city\": \"Portland\", \"population\": 632309, \"area\": 376.5, \"metropolitan\"\
94
+ : true},\n {\"city\": \"Oklahoma City\", \"population\": 631346, \"area\": 1599.6,\
95
+ \ \"metropolitan\": true},\n {\"city\": \"Las Vegas\", \"population\": 644644,\
96
+ \ \"area\": 352.0, \"metropolitan\": true},\n {\"city\": \"Detroit\", \"population\"\
97
+ : 673104, \"area\": 359.4, \"metropolitan\": true},\n {\"city\": \"Memphis\",\
98
+ \ \"population\": 652717, \"area\": 763.4, \"metropolitan\": true},\n {\"city\"\
99
+ : \"Louisville/Jefferson County\", \"population\": 620118, \"area\": 1595.6, \"\
100
+ metropolitan\": true},\n {\"city\": \"Baltimore\", \"population\": 602495, \"\
101
+ area\": 92.1, \"metropolitan\": true},\n {\"city\": \"Milwaukee\", \"population\"\
102
+ : 590157, \"area\": 248.9, \"metropolitan\": true},\n {\"city\": \"Albuquerque\"\
103
+ , \"population\": 560218, \"area\": 491.9, \"metropolitan\": true},\n {\"city\"\
104
+ : \"Tucson\", \"population\": 545975, \"area\": 596.7, \"metropolitan\": true},\n\
105
+ \ {\"city\": \"Fresno\", \"population\": 520052, \"area\": 114.4, \"metropolitan\"\
106
+ : true},\n {\"city\": \"Mesa\", \"population\": 508958, \"area\": 324.2, \"metropolitan\"\
107
+ : true},\n {\"city\": \"Sacramento\", \"population\": 501901, \"area\": 97.9,\
108
+ \ \"metropolitan\": true},\n {\"city\": \"Atlanta\", \"population\": 498715, \"\
109
+ area\": 133.2, \"metropolitan\": true},\n {\"city\": \"Kansas City\", \"population\"\
110
+ : 488943, \"area\": 319.0, \"metropolitan\": true},\n {\"city\": \"Colorado Springs\"\
111
+ , \"population\": 472688, \"area\": 503.1, \"metropolitan\": true},\n {\"city\"\
112
+ : \"Miami\", \"population\": 463347, \"area\": 92.9, \"metropolitan\": true},\n\
113
+ \ {\"city\": \"Raleigh\", \"population\": 464758, \"area\": 369.9, \"metropolitan\"\
114
+ : true},\n {\"city\": \"Omaha\", \"population\": 466893, \"area\": 338.2, \"metropolitan\"\
115
+ : true},\n {\"city\": \"Long Beach\", \"population\": 469450, \"area\": 170.6,\
116
+ \ \"metropolitan\": true},\n {\"city\": \"Virginia Beach\", \"population\": 450980,\
117
+ \ \"area\": 497.3, \"metropolitan\": true},\n {\"city\": \"Oakland\", \"population\"\
118
+ : 425195, \"area\": 78.0, \"metropolitan\": true},\n {\"city\": \"Minneapolis\"\
119
+ , \"population\": 422331, \"area\": 151.4, \"metropolitan\": true},\n {\"city\"\
120
+ : \"Tulsa\", \"population\": 401800, \"area\": 484.9, \"metropolitan\": true},\n\
121
+ \ {\"city\": \"Wichita\", \"population\": 390591, \"area\": 355.6, \"metropolitan\"\
122
+ : true},\n {\"city\": \"New Orleans\", \"population\": 390144, \"area\": 466.9,\
123
+ \ \"metropolitan\": true},\n {\"city\": \"Arlington\", \"population\": 388125,\
124
+ \ \"area\": 261.8, \"metropolitan\": true},\n {\"city\": \"Tampa\", \"population\"\
125
+ : 352957, \"area\": 113.4, \"metropolitan\": true},\n {\"city\": \"Santa Ana\"\
126
+ , \"population\": 332725, \"area\": 71.0, \"metropolitan\": true},\n {\"city\"\
127
+ : \"Anaheim\", \"population\": 336265, \"area\": 131.7, \"metropolitan\": true},\n\
128
+ \ {\"city\": \"St. Louis\", \"population\": 319294, \"area\": 66.2, \"metropolitan\"\
129
+ : true},\n {\"city\": \"Riverside\", \"population\": 316619, \"area\": 204.0,\
130
+ \ \"metropolitan\": true},\n {\"city\": \"Corpus Christi\", \"population\": 316381,\
131
+ \ \"area\": 1606.8, \"metropolitan\": true},\n {\"city\": \"Lexington-Fayette\"\
132
+ , \"population\": 314488, \"area\": 739.5, \"metropolitan\": true},\n {\"city\"\
133
+ : \"Pittsburgh\", \"population\": 302407, \"area\": 151.1, \"metropolitan\": true},\n\
134
+ \ {\"city\": \"Stockton\", \"population\": 291707, \"area\": 151.2, \"metropolitan\"\
135
+ : true},\n {\"city\": \"Cincinnati\", \"population\": 301301, \"area\": 200.3,\
136
+ \ \"metropolitan\": true},\n {\"city\": \"St. Paul\", \"population\": 285068,\
137
+ \ \"area\": 52.8, \"metropolitan\": true},\n {\"city\": \"Toledo\", \"population\"\
138
+ : 276491, \"area\": 217.2, \"metropolitan\": true},\n {\"city\": \"Greensboro\"\
139
+ , \"population\": 279639, \"area\": 283.1, \"metropolitan\": true},\n {\"city\"\
140
+ : \"Newark\", \"population\": 282090, \"area\": 26.1, \"metropolitan\": true},\n\
141
+ \ {\"city\": \"Plano\", \"population\": 269776, \"area\": 185.1, \"metropolitan\"\
142
+ : true},\n {\"city\": \"Henderson\", \"population\": 270811, \"area\": 267.4,\
143
+ \ \"metropolitan\": true},\n {\"city\": \"Lincoln\", \"population\": 258379, \"\
144
+ area\": 196.9, \"metropolitan\": true},\n {\"city\": \"Buffalo\", \"population\"\
145
+ : 256902, \"area\": 136.0, \"metropolitan\": true},\n {\"city\": \"Jersey City\"\
146
+ , \"population\": 247597, \"area\": 21.1, \"metropolitan\": true},\n {\"city\"\
147
+ : \"Chula Vista\", \"population\": 243916, \"area\": 52.1, \"metropolitan\": true},\n\
148
+ \ {\"city\": \"Fort Wayne\", \"population\": 253691, "
149
+ - How would you use Python to count the occurrences of a specific word in a given
150
+ text? "the quick brown fox jumped over the lazy dog", "the
151
+ - 可以介绍一下监狱的运作吗?
152
+ - source_sentence: 'Can you provide a Scala code that can arrange a list of words
153
+ into a grammatically correct sentence? Specifically, can you arrange the following
154
+ list of words: "dog cat run quickly"? '
155
+ sentences:
156
+ - "How can I use C# to generate a set of 150 words for a crossword puzzle? Can you\
157
+ \ provide a sample C# code that will randomly select 150 words from a table called\
158
+ \ 'crossword_words' in a SQL database and output them as a grid for the puzzle?\n\
159
+ Here is a sample C# code that uses the SQL query to select 150 random words from\
160
+ \ the 'crossword_words' table and output them as a grid for the crossword puzzle:\n\
161
+ ```csharp\nusing System;\nusing System.Data.SqlClient;\nnamespace CrosswordPuzzleGenerator\n\
162
+ {\n class Program\n {\n static void Main(string[] args)\n \
163
+ \ {\n string connectionString = \"Data Source=YourServerName;Initial\
164
+ \ Catalog=YourDatabaseName;Integrated Security=True\";\n SqlConnection\
165
+ \ connection = new SqlConnection(connectionString);\n connection.Open();\n\
166
+ \ SqlCommand command = new SqlCommand(\"SELECT TOP 150 * FROM crossword_words\
167
+ \ ORDER BY NEWID()\", connection);\n SqlDataReader reader = command.ExecuteReader();\n\
168
+ \ string[] words = new string[150];\n int index = 0;\n \
169
+ \ while (reader.Read())\n {\n words[index]\
170
+ \ = reader.GetString(0);\n index++;\n }\n \
171
+ \ reader.Close();\n connection.Close();\n // Create grid\
172
+ \ for crossword puzzle\n char[,] grid = new char[15, 15];\n \
173
+ \ for (int i = 0; i < 15; i++)\n {\n for (int j\
174
+ \ = 0; j < 15; j++)\n {\n grid[i, j] = '_';\n\
175
+ \ }\n }\n // Insert words horizontally\n\
176
+ \ foreach (string word in words)\n {\n int\
177
+ \ row = new Random().Next(0, 15);\n int col = new Random().Next(0,\
178
+ \ 16 - word.Length);\n for (int i = 0; i < word.Length; i++)\n\
179
+ \ {\n grid[row, col + i] = word[i];\n \
180
+ \ }\n }\n // Insert words vertically\n \
181
+ \ foreach (string word in words)\n {\n int row =\
182
+ \ new Random().Next(0, 16 - word.Length);\n int col = new Random().Next(0,\
183
+ \ 15);\n for (int i = 0; i < word.Length; i++)\n \
184
+ \ {\n grid[row + i, col] = word[i];\n }\n \
185
+ \ }\n // Print grid for crossword puzzle\n for\
186
+ \ (int i = 0; i < 15; i++)\n {\n for (int j = 0; j <\
187
+ \ 15; j++)\n {\n Console.Write(grid[i, j] +\
188
+ \ \" \");\n }\n Console.WriteLine();\n \
189
+ \ }\n }\n }\n}\n```\nTo use this code, simply replace 'crossword_words'\
190
+ \ with the name of your table in the SQL query and run the C# code. This code\
191
+ \ will generate a crossword puzzle grid with 150 random words from the table. "
192
+ - 对于由 -1,0 和 1 组成的一个二维格子,其宽度和高度均为 n x n,请设计一个算法,需要找到并返回最大的连接在一起的相同数字矩阵,矩阵也可以是单格。这里所谓的“连接”,指的是彼此相邻的单元格(从四个方向:左右上下),共享相同数值(要么-1,要么0,要么1)。
193
+ - 请求创建一个Python函数,以确定给定正整数的阶乘是否在特定范围内产生尾随零。
194
+ - source_sentence: 'How can I generate a randomized short story of at least 1000 words
195
+ using the given characters Mark, Sarah, and Alice and their actions as input data
196
+ in a MATLAB code?
197
+
198
+ I have the following table in MATLAB:
199
+
200
+ StoryEvents = [1,2,3,4,5,6,7,8,9,10]'';
201
+
202
+ Characters = {''Mark'';''Sarah'';''Alice'';''Mark'';''Sarah'';''Alice'';''Mark'';''Sarah'';''Alice'';''Mark''};
203
+
204
+ Actions = {''Meets Sarah at the park'';''Tells Mark about her love for art'';''Joins
205
+ Mark and Sarah for lunch'';''Discovers Alice is a musician'';''Helps Alice prepare
206
+ for a concert'';''Invites Mark and Sarah to her concert'';''Realizes he has feelings
207
+ for Sarah'';''Confesses her love for Mark'';''Performs at her concert'';''Kisses
208
+ Sarah after the concert''};
209
+
210
+ How can I use this table to generate a unique and engaging story each time the
211
+ code is run? '
212
+ sentences:
213
+ - javascript中定义的函数是如何执行的
214
+ - "What R code can be used to create a personalized meal plan for a week based on\
215
+ \ dietary restrictions and preferences?\nHere is an example R code for a personalized\
216
+ \ meal plan:\n```{r}\n# Define dietary restrictions and preferences\nvegetarian\
217
+ \ <- TRUE\ngluten_free <- TRUE\nprefer_spicy <- TRUE\n# Define meal options\n\
218
+ breakfast_options <- c(\"oatmeal\", \"smoothie\", \"avocado toast\")\nlunch_options\
219
+ \ <- c(\"salad\", \"vegetarian wrap\", \"quinoa bowl\")\ndinner_options <- c(\"\
220
+ spicy tofu stir-fry\", \"zucchini noodles with marinara\", \"stuffed bell peppers\"\
221
+ )\n# Create meal plan for the week\ndays <- c(\"Monday\", \"Tuesday\", \"Wednesday\"\
222
+ , \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\")\nmeal_plan <- data.frame(Day\
223
+ \ = days)\nfor (i in 1:length(days)) {\n if (vegetarian) {\n options <- lunch_options[lunch_options\
224
+ \ != \"vegetarian wrap\"]\n } else {\n options <- lunch_options\n }\n if\
225
+ \ (gluten_free) {\n options <- options[options != \"quinoa bowl\"]\n }\n \
226
+ \ if (prefer_spicy) {\n dinner_options <- c(dinner_options, \"spicy lentil\
227
+ \ soup\")\n }\n breakfast <- sample(breakfast_options, 1)\n lunch <- sample(options,\
228
+ \ 1)\n dinner <- sample(dinner_options, 1)\n meal_plan[i, 2:4] <- c(breakfast,\
229
+ \ lunch, dinner)\n}\n# Print meal plan\ncat(\"Here is your personalized meal plan\
230
+ \ for the week:\\n\")\nprint(meal_plan)\n```\nFeel free to adjust the dietary\
231
+ \ restrictions and preferences, as well as the meal options to create a customized\
232
+ \ meal plan for yourself or others. "
233
+ - 你能创建月球、火星或其他行星的拟人化角色吗?
234
+ - source_sentence: ios如何获取url中的参数
235
+ sentences:
236
+ - 下面是《自尊之外:互动心理与互动机制》中的一段对话,请根据对话写出节选自的原文。
237
+ - 'How can the given Ruby code be enhanced to also extract the prepositional phrase
238
+ that contains the adverb modifying the verb in the sentence? The updated code
239
+ must output the complete prepositional phrase along with the noun, verb, and adjectives
240
+ in the sentence. '
241
+ - 小明家2月份计划支出每天150元,通过节约最后每天只用105元,请问这为家庭节省了多少钱?
242
+ ---
243
+
244
+ # SentenceTransformer based on BAAI/bge-small-en-v1.5
245
+
246
+ 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.
247
+
248
+ ## Model Details
249
+
250
+ ### Model Description
251
+ - **Model Type:** Sentence Transformer
252
+ - **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
253
+ - **Maximum Sequence Length:** 512 tokens
254
+ - **Output Dimensionality:** 384 tokens
255
+ - **Similarity Function:** Cosine Similarity
256
+ <!-- - **Training Dataset:** Unknown -->
257
+ <!-- - **Language:** Unknown -->
258
+ <!-- - **License:** Unknown -->
259
+
260
+ ### Model Sources
261
+
262
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
263
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
264
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
265
+
266
+ ### Full Model Architecture
267
+
268
+ ```
269
+ SentenceTransformer(
270
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
271
+ (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})
272
+ (2): Normalize()
273
+ )
274
+ ```
275
+
276
+ ## Usage
277
+
278
+ ### Direct Usage (Sentence Transformers)
279
+
280
+ First install the Sentence Transformers library:
281
+
282
+ ```bash
283
+ pip install -U sentence-transformers
284
+ ```
285
+
286
+ Then you can load this model and run inference.
287
+ ```python
288
+ from sentence_transformers import SentenceTransformer
289
+
290
+ # Download from the 🤗 Hub
291
+ model = SentenceTransformer("Snivellus789/router-embedding-tuned-human")
292
+ # Run inference
293
+ sentences = [
294
+ 'ios如何获取url中的参数',
295
+ 'How can the given Ruby code be enhanced to also extract the prepositional phrase that contains the adverb modifying the verb in the sentence? The updated code must output the complete prepositional phrase along with the noun, verb, and adjectives in the sentence. ',
296
+ '小明家2月份计划支出每天150元,通过节约最后每天只用105元,请问这为家庭节省了多少钱?',
297
+ ]
298
+ embeddings = model.encode(sentences)
299
+ print(embeddings.shape)
300
+ # [3, 384]
301
+
302
+ # Get the similarity scores for the embeddings
303
+ similarities = model.similarity(embeddings, embeddings)
304
+ print(similarities.shape)
305
+ # [3, 3]
306
+ ```
307
+
308
+ <!--
309
+ ### Direct Usage (Transformers)
310
+
311
+ <details><summary>Click to see the direct usage in Transformers</summary>
312
+
313
+ </details>
314
+ -->
315
+
316
+ <!--
317
+ ### Downstream Usage (Sentence Transformers)
318
+
319
+ You can finetune this model on your own dataset.
320
+
321
+ <details><summary>Click to expand</summary>
322
+
323
+ </details>
324
+ -->
325
+
326
+ <!--
327
+ ### Out-of-Scope Use
328
+
329
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
330
+ -->
331
+
332
+ <!--
333
+ ## Bias, Risks and Limitations
334
+
335
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
336
+ -->
337
+
338
+ <!--
339
+ ### Recommendations
340
+
341
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
342
+ -->
343
+
344
+ ## Training Details
345
+
346
+ ### Training Dataset
347
+
348
+ #### Unnamed Dataset
349
+
350
+
351
+ * Size: 1,944 training samples
352
+ * Columns: <code>sentence</code> and <code>label</code>
353
+ * Approximate statistics based on the first 1000 samples:
354
+ | | sentence | label |
355
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------|
356
+ | type | string | int |
357
+ | 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> |
358
+ * Samples:
359
+ | sentence | label |
360
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|
361
+ | <code>请输出所有跟政企市场相关的关键词列表</code> | <code>0</code> |
362
+ | <code>开发一个定制的JavaScript解决方案,用于有效地平衡和排序一个二叉树。你可以假设输入是一个平衡因子擯至2的大O()为Log(N)的AVL树。专注于实现自我调整二叉搜索树的变换,当面对不平衡操作时,如插入或删除节点。确保你的解决方案为潜在的边缘案例做好准备,并具有健壮的错误处理策略。你的代码应该清晰地记录和优化效率。</code> | <code>0</code> |
363
+ | <code>在一个尚未被公开的领域中,描述五个最具创新性的产品概念。</code> | <code>0</code> |
364
+ * Loss: [<code>BatchAllTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss)
365
+
366
+ ### Training Hyperparameters
367
+ #### Non-Default Hyperparameters
368
+
369
+ - `per_device_train_batch_size`: 16
370
+ - `per_device_eval_batch_size`: 16
371
+ - `learning_rate`: 2e-05
372
+ - `num_train_epochs`: 2
373
+ - `warmup_ratio`: 0.1
374
+ - `bf16`: True
375
+ - `batch_sampler`: no_duplicates
376
+
377
+ #### All Hyperparameters
378
+ <details><summary>Click to expand</summary>
379
+
380
+ - `overwrite_output_dir`: False
381
+ - `do_predict`: False
382
+ - `eval_strategy`: no
383
+ - `prediction_loss_only`: True
384
+ - `per_device_train_batch_size`: 16
385
+ - `per_device_eval_batch_size`: 16
386
+ - `per_gpu_train_batch_size`: None
387
+ - `per_gpu_eval_batch_size`: None
388
+ - `gradient_accumulation_steps`: 1
389
+ - `eval_accumulation_steps`: None
390
+ - `torch_empty_cache_steps`: None
391
+ - `learning_rate`: 2e-05
392
+ - `weight_decay`: 0.0
393
+ - `adam_beta1`: 0.9
394
+ - `adam_beta2`: 0.999
395
+ - `adam_epsilon`: 1e-08
396
+ - `max_grad_norm`: 1.0
397
+ - `num_train_epochs`: 2
398
+ - `max_steps`: -1
399
+ - `lr_scheduler_type`: linear
400
+ - `lr_scheduler_kwargs`: {}
401
+ - `warmup_ratio`: 0.1
402
+ - `warmup_steps`: 0
403
+ - `log_level`: passive
404
+ - `log_level_replica`: warning
405
+ - `log_on_each_node`: True
406
+ - `logging_nan_inf_filter`: True
407
+ - `save_safetensors`: True
408
+ - `save_on_each_node`: False
409
+ - `save_only_model`: False
410
+ - `restore_callback_states_from_checkpoint`: False
411
+ - `no_cuda`: False
412
+ - `use_cpu`: False
413
+ - `use_mps_device`: False
414
+ - `seed`: 42
415
+ - `data_seed`: None
416
+ - `jit_mode_eval`: False
417
+ - `use_ipex`: False
418
+ - `bf16`: True
419
+ - `fp16`: False
420
+ - `fp16_opt_level`: O1
421
+ - `half_precision_backend`: auto
422
+ - `bf16_full_eval`: False
423
+ - `fp16_full_eval`: False
424
+ - `tf32`: None
425
+ - `local_rank`: 0
426
+ - `ddp_backend`: None
427
+ - `tpu_num_cores`: None
428
+ - `tpu_metrics_debug`: False
429
+ - `debug`: []
430
+ - `dataloader_drop_last`: False
431
+ - `dataloader_num_workers`: 0
432
+ - `dataloader_prefetch_factor`: None
433
+ - `past_index`: -1
434
+ - `disable_tqdm`: False
435
+ - `remove_unused_columns`: True
436
+ - `label_names`: None
437
+ - `load_best_model_at_end`: False
438
+ - `ignore_data_skip`: False
439
+ - `fsdp`: []
440
+ - `fsdp_min_num_params`: 0
441
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
442
+ - `fsdp_transformer_layer_cls_to_wrap`: None
443
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
444
+ - `deepspeed`: None
445
+ - `label_smoothing_factor`: 0.0
446
+ - `optim`: adamw_torch
447
+ - `optim_args`: None
448
+ - `adafactor`: False
449
+ - `group_by_length`: False
450
+ - `length_column_name`: length
451
+ - `ddp_find_unused_parameters`: None
452
+ - `ddp_bucket_cap_mb`: None
453
+ - `ddp_broadcast_buffers`: False
454
+ - `dataloader_pin_memory`: True
455
+ - `dataloader_persistent_workers`: False
456
+ - `skip_memory_metrics`: True
457
+ - `use_legacy_prediction_loop`: False
458
+ - `push_to_hub`: False
459
+ - `resume_from_checkpoint`: None
460
+ - `hub_model_id`: None
461
+ - `hub_strategy`: every_save
462
+ - `hub_private_repo`: False
463
+ - `hub_always_push`: False
464
+ - `gradient_checkpointing`: False
465
+ - `gradient_checkpointing_kwargs`: None
466
+ - `include_inputs_for_metrics`: False
467
+ - `eval_do_concat_batches`: True
468
+ - `fp16_backend`: auto
469
+ - `push_to_hub_model_id`: None
470
+ - `push_to_hub_organization`: None
471
+ - `mp_parameters`:
472
+ - `auto_find_batch_size`: False
473
+ - `full_determinism`: False
474
+ - `torchdynamo`: None
475
+ - `ray_scope`: last
476
+ - `ddp_timeout`: 1800
477
+ - `torch_compile`: False
478
+ - `torch_compile_backend`: None
479
+ - `torch_compile_mode`: None
480
+ - `dispatch_batches`: None
481
+ - `split_batches`: None
482
+ - `include_tokens_per_second`: False
483
+ - `include_num_input_tokens_seen`: False
484
+ - `neftune_noise_alpha`: None
485
+ - `optim_target_modules`: None
486
+ - `batch_eval_metrics`: False
487
+ - `eval_on_start`: False
488
+ - `eval_use_gather_object`: False
489
+ - `batch_sampler`: no_duplicates
490
+ - `multi_dataset_batch_sampler`: proportional
491
+
492
+ </details>
493
+
494
+ ### Training Logs
495
+ | Epoch | Step | Training Loss |
496
+ |:------:|:----:|:-------------:|
497
+ | 0.8197 | 100 | 0.1444 |
498
+ | 1.6393 | 200 | 0.0905 |
499
+
500
+
501
+ ### Framework Versions
502
+ - Python: 3.10.12
503
+ - Sentence Transformers: 3.1.1
504
+ - Transformers: 4.44.2
505
+ - PyTorch: 2.4.1+cu121
506
+ - Accelerate: 0.35.0.dev0
507
+ - Datasets: 3.0.1
508
+ - Tokenizers: 0.19.1
509
+
510
+ ## Citation
511
+
512
+ ### BibTeX
513
+
514
+ #### Sentence Transformers
515
+ ```bibtex
516
+ @inproceedings{reimers-2019-sentence-bert,
517
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
518
+ author = "Reimers, Nils and Gurevych, Iryna",
519
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
520
+ month = "11",
521
+ year = "2019",
522
+ publisher = "Association for Computational Linguistics",
523
+ url = "https://arxiv.org/abs/1908.10084",
524
+ }
525
+ ```
526
+
527
+ #### BatchAllTripletLoss
528
+ ```bibtex
529
+ @misc{hermans2017defense,
530
+ title={In Defense of the Triplet Loss for Person Re-Identification},
531
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
532
+ year={2017},
533
+ eprint={1703.07737},
534
+ archivePrefix={arXiv},
535
+ primaryClass={cs.CV}
536
+ }
537
+ ```
538
+
539
+ <!--
540
+ ## Glossary
541
+
542
+ *Clearly define terms in order to be accessible across audiences.*
543
+ -->
544
+
545
+ <!--
546
+ ## Model Card Authors
547
+
548
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
549
+ -->
550
+
551
+ <!--
552
+ ## Model Card Contact
553
+
554
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
555
+ -->
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.44.2",
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.1.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.4.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:3b9778609e21db11d472188f3a0afe464106d86b496775ce732d541a36c412ba
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