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