File size: 20,347 Bytes
a9c4cb8 03aff39 0a212f8 3796531 0a212f8 a9c4cb8 ff693bf a9c4cb8 ff693bf f4e0b10 533ae75 a9c4cb8 331cb20 f507380 533ae75 e31a372 533ae75 331cb20 a9c4cb8 74a47ea a9c4cb8 789b6ed a9c4cb8 789b6ed a9c4cb8 789b6ed a9c4cb8 533ae75 a9c4cb8 33ace7a a9c4cb8 331cb20 ff693bf 4da61c8 331cb20 4da61c8 ff693bf 331cb20 a9c4cb8 fad5ae1 a24f520 a9c4cb8 a24f520 a9c4cb8 a24f520 a9c4cb8 |
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 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 |
---
language:
- zh
model-index:
- name: Chuxin-Embedding
results:
- dataset:
config: default
name: MTEB CmedqaRetrieval (default)
revision: cd540c506dae1cf9e9a59c3e06f42030d54e7301
split: dev
type: C-MTEB/CmedqaRetrieval
metrics:
- type: map_at_1
value: 33.391999999999996
- type: map_at_10
value: 48.715
- type: map_at_100
value: 50.381
- type: map_at_1000
value: 50.456
- type: map_at_3
value: 43.708999999999996
- type: map_at_5
value: 46.405
- type: mrr_at_1
value: 48.612
- type: mrr_at_10
value: 58.67099999999999
- type: mrr_at_100
value: 59.38
- type: mrr_at_1000
value: 59.396
- type: mrr_at_3
value: 55.906
- type: mrr_at_5
value: 57.421
- type: ndcg_at_1
value: 48.612
- type: ndcg_at_10
value: 56.581
- type: ndcg_at_100
value: 62.422999999999995
- type: ndcg_at_1000
value: 63.476
- type: ndcg_at_3
value: 50.271
- type: ndcg_at_5
value: 52.79899999999999
- type: precision_at_1
value: 48.612
- type: precision_at_10
value: 11.995000000000001
- type: precision_at_100
value: 1.696
- type: precision_at_1000
value: 0.185
- type: precision_at_3
value: 27.465
- type: precision_at_5
value: 19.675
- type: recall_at_1
value: 33.391999999999996
- type: recall_at_10
value: 69.87100000000001
- type: recall_at_100
value: 93.078
- type: recall_at_1000
value: 99.55199999999999
- type: recall_at_3
value: 50.939
- type: recall_at_5
value: 58.714
- type: main_score
value: 56.581
task:
type: Retrieval
- dataset:
config: default
name: MTEB CovidRetrieval (default)
revision: 1271c7809071a13532e05f25fb53511ffce77117
split: dev
type: C-MTEB/CovidRetrieval
metrics:
- type: map_at_1
value: 71.918
- type: map_at_10
value: 80.609
- type: map_at_100
value: 80.796
- type: map_at_1000
value: 80.798
- type: map_at_3
value: 79.224
- type: map_at_5
value: 79.96
- type: mrr_at_1
value: 72.076
- type: mrr_at_10
value: 80.61399999999999
- type: mrr_at_100
value: 80.801
- type: mrr_at_1000
value: 80.803
- type: mrr_at_3
value: 79.276
- type: mrr_at_5
value: 80.025
- type: ndcg_at_1
value: 72.076
- type: ndcg_at_10
value: 84.286
- type: ndcg_at_100
value: 85.14500000000001
- type: ndcg_at_1000
value: 85.21
- type: ndcg_at_3
value: 81.45400000000001
- type: ndcg_at_5
value: 82.781
- type: precision_at_1
value: 72.076
- type: precision_at_10
value: 9.663
- type: precision_at_100
value: 1.005
- type: precision_at_1000
value: 0.101
- type: precision_at_3
value: 29.398999999999997
- type: precision_at_5
value: 18.335
- type: recall_at_1
value: 71.918
- type: recall_at_10
value: 95.574
- type: recall_at_100
value: 99.473
- type: recall_at_1000
value: 100.0
- type: recall_at_3
value: 87.82900000000001
- type: recall_at_5
value: 90.991
- type: main_score
value: 84.286
task:
type: Retrieval
- dataset:
config: default
name: MTEB DuRetrieval (default)
revision: a1a333e290fe30b10f3f56498e3a0d911a693ced
split: dev
type: C-MTEB/DuRetrieval
metrics:
- type: map_at_1
value: 25.019999999999996
- type: map_at_10
value: 77.744
- type: map_at_100
value: 80.562
- type: map_at_1000
value: 80.60300000000001
- type: map_at_3
value: 52.642999999999994
- type: map_at_5
value: 67.179
- type: mrr_at_1
value: 86.5
- type: mrr_at_10
value: 91.024
- type: mrr_at_100
value: 91.09
- type: mrr_at_1000
value: 91.093
- type: mrr_at_3
value: 90.558
- type: mrr_at_5
value: 90.913
- type: ndcg_at_1
value: 86.5
- type: ndcg_at_10
value: 85.651
- type: ndcg_at_100
value: 88.504
- type: ndcg_at_1000
value: 88.887
- type: ndcg_at_3
value: 82.707
- type: ndcg_at_5
value: 82.596
- type: precision_at_1
value: 86.5
- type: precision_at_10
value: 41.595
- type: precision_at_100
value: 4.7940000000000005
- type: precision_at_1000
value: 0.48900000000000005
- type: precision_at_3
value: 74.233
- type: precision_at_5
value: 63.68000000000001
- type: recall_at_1
value: 25.019999999999996
- type: recall_at_10
value: 88.114
- type: recall_at_100
value: 97.442
- type: recall_at_1000
value: 99.39099999999999
- type: recall_at_3
value: 55.397
- type: recall_at_5
value: 73.095
- type: main_score
value: 85.651
task:
type: Retrieval
- dataset:
config: default
name: MTEB EcomRetrieval (default)
revision: 687de13dc7294d6fd9be10c6945f9e8fec8166b9
split: dev
type: C-MTEB/EcomRetrieval
metrics:
- type: map_at_1
value: 55.60000000000001
- type: map_at_10
value: 67.891
- type: map_at_100
value: 68.28699999999999
- type: map_at_1000
value: 68.28699999999999
- type: map_at_3
value: 64.86699999999999
- type: map_at_5
value: 66.652
- type: mrr_at_1
value: 55.60000000000001
- type: mrr_at_10
value: 67.891
- type: mrr_at_100
value: 68.28699999999999
- type: mrr_at_1000
value: 68.28699999999999
- type: mrr_at_3
value: 64.86699999999999
- type: mrr_at_5
value: 66.652
- type: ndcg_at_1
value: 55.60000000000001
- type: ndcg_at_10
value: 74.01100000000001
- type: ndcg_at_100
value: 75.602
- type: ndcg_at_1000
value: 75.602
- type: ndcg_at_3
value: 67.833
- type: ndcg_at_5
value: 71.005
- type: precision_at_1
value: 55.60000000000001
- type: precision_at_10
value: 9.33
- type: precision_at_100
value: 1.0
- type: precision_at_1000
value: 0.1
- type: precision_at_3
value: 25.467000000000002
- type: precision_at_5
value: 16.8
- type: recall_at_1
value: 55.60000000000001
- type: recall_at_10
value: 93.30000000000001
- type: recall_at_100
value: 100.0
- type: recall_at_1000
value: 100.0
- type: recall_at_3
value: 76.4
- type: recall_at_5
value: 84.0
- type: main_score
value: 74.01100000000001
task:
type: Retrieval
- dataset:
config: default
name: MTEB MMarcoRetrieval (default)
revision: 539bbde593d947e2a124ba72651aafc09eb33fc2
split: dev
type: C-MTEB/MMarcoRetrieval
metrics:
- type: map_at_1
value: 66.24799999999999
- type: map_at_10
value: 75.356
- type: map_at_100
value: 75.653
- type: map_at_1000
value: 75.664
- type: map_at_3
value: 73.515
- type: map_at_5
value: 74.67099999999999
- type: mrr_at_1
value: 68.496
- type: mrr_at_10
value: 75.91499999999999
- type: mrr_at_100
value: 76.17399999999999
- type: mrr_at_1000
value: 76.184
- type: mrr_at_3
value: 74.315
- type: mrr_at_5
value: 75.313
- type: ndcg_at_1
value: 68.496
- type: ndcg_at_10
value: 79.065
- type: ndcg_at_100
value: 80.417
- type: ndcg_at_1000
value: 80.72399999999999
- type: ndcg_at_3
value: 75.551
- type: ndcg_at_5
value: 77.505
- type: precision_at_1
value: 68.496
- type: precision_at_10
value: 9.563
- type: precision_at_100
value: 1.024
- type: precision_at_1000
value: 0.105
- type: precision_at_3
value: 28.391
- type: precision_at_5
value: 18.086
- type: recall_at_1
value: 66.24799999999999
- type: recall_at_10
value: 89.97
- type: recall_at_100
value: 96.13199999999999
- type: recall_at_1000
value: 98.551
- type: recall_at_3
value: 80.624
- type: recall_at_5
value: 85.271
- type: main_score
value: 79.065
task:
type: Retrieval
- dataset:
config: default
name: MTEB MedicalRetrieval (default)
revision: 2039188fb5800a9803ba5048df7b76e6fb151fc6
split: dev
type: C-MTEB/MedicalRetrieval
metrics:
- type: map_at_1
value: 61.8
- type: map_at_10
value: 71.101
- type: map_at_100
value: 71.576
- type: map_at_1000
value: 71.583
- type: map_at_3
value: 68.867
- type: map_at_5
value: 70.272
- type: mrr_at_1
value: 61.9
- type: mrr_at_10
value: 71.158
- type: mrr_at_100
value: 71.625
- type: mrr_at_1000
value: 71.631
- type: mrr_at_3
value: 68.917
- type: mrr_at_5
value: 70.317
- type: ndcg_at_1
value: 61.8
- type: ndcg_at_10
value: 75.624
- type: ndcg_at_100
value: 77.702
- type: ndcg_at_1000
value: 77.836
- type: ndcg_at_3
value: 71.114
- type: ndcg_at_5
value: 73.636
- type: precision_at_1
value: 61.8
- type: precision_at_10
value: 8.98
- type: precision_at_100
value: 0.9900000000000001
- type: precision_at_1000
value: 0.1
- type: precision_at_3
value: 25.867
- type: precision_at_5
value: 16.74
- type: recall_at_1
value: 61.8
- type: recall_at_10
value: 89.8
- type: recall_at_100
value: 99.0
- type: recall_at_1000
value: 100.0
- type: recall_at_3
value: 77.60000000000001
- type: recall_at_5
value: 83.7
- type: main_score
value: 75.624
task:
type: Retrieval
- dataset:
config: default
name: MTEB T2Retrieval (default)
revision: 8731a845f1bf500a4f111cf1070785c793d10e64
split: dev
type: C-MTEB/T2Retrieval
metrics:
- type: map_at_1
value: 27.173000000000002
- type: map_at_10
value: 76.454
- type: map_at_100
value: 80.021
- type: map_at_1000
value: 80.092
- type: map_at_3
value: 53.876999999999995
- type: map_at_5
value: 66.122
- type: mrr_at_1
value: 89.519
- type: mrr_at_10
value: 92.091
- type: mrr_at_100
value: 92.179
- type: mrr_at_1000
value: 92.183
- type: mrr_at_3
value: 91.655
- type: mrr_at_5
value: 91.94
- type: ndcg_at_1
value: 89.519
- type: ndcg_at_10
value: 84.043
- type: ndcg_at_100
value: 87.60900000000001
- type: ndcg_at_1000
value: 88.32799999999999
- type: ndcg_at_3
value: 85.623
- type: ndcg_at_5
value: 84.111
- type: precision_at_1
value: 89.519
- type: precision_at_10
value: 41.760000000000005
- type: precision_at_100
value: 4.982
- type: precision_at_1000
value: 0.515
- type: precision_at_3
value: 74.944
- type: precision_at_5
value: 62.705999999999996
- type: recall_at_1
value: 27.173000000000002
- type: recall_at_10
value: 82.878
- type: recall_at_100
value: 94.527
- type: recall_at_1000
value: 98.24199999999999
- type: recall_at_3
value: 55.589
- type: recall_at_5
value: 69.476
- type: main_score
value: 84.043
task:
type: Retrieval
- dataset:
config: default
name: MTEB VideoRetrieval (default)
revision: 58c2597a5943a2ba48f4668c3b90d796283c5639
split: dev
type: C-MTEB/VideoRetrieval
metrics:
- type: map_at_1
value: 70.1
- type: map_at_10
value: 79.62
- type: map_at_100
value: 79.804
- type: map_at_1000
value: 79.804
- type: map_at_3
value: 77.81700000000001
- type: map_at_5
value: 79.037
- type: mrr_at_1
value: 70.1
- type: mrr_at_10
value: 79.62
- type: mrr_at_100
value: 79.804
- type: mrr_at_1000
value: 79.804
- type: mrr_at_3
value: 77.81700000000001
- type: mrr_at_5
value: 79.037
- type: ndcg_at_1
value: 70.1
- type: ndcg_at_10
value: 83.83500000000001
- type: ndcg_at_100
value: 84.584
- type: ndcg_at_1000
value: 84.584
- type: ndcg_at_3
value: 80.282
- type: ndcg_at_5
value: 82.472
- type: precision_at_1
value: 70.1
- type: precision_at_10
value: 9.68
- type: precision_at_100
value: 1.0
- type: precision_at_1000
value: 0.1
- type: precision_at_3
value: 29.133
- type: precision_at_5
value: 18.54
- type: recall_at_1
value: 70.1
- type: recall_at_10
value: 96.8
- type: recall_at_100
value: 100.0
- type: recall_at_1000
value: 100.0
- type: recall_at_3
value: 87.4
- type: recall_at_5
value: 92.7
- type: main_score
value: 83.83500000000001
task:
type: Retrieval
tags:
- mteb
---
# Chuxin-Embedding
<!-- Provide a quick summary of what the model is/does. -->
Chuxin-Embedding 是专为增强中文文本检索能力而设计的嵌入模型。它基于bge-m3-retromae[1],实现了预训练、微调、精调全流程。该模型在来自各个领域的大量语料库上进行训练,语料库的批量非常大。截至 2024 年 9 月 14 日, Chuxin-Embedding 在检索任务中表现出色,在 C-MTEB 中文检索排行榜上排名第一,领先的性能得分为 77.88,在AIR-Bench中文检索+重排序公开排行榜上排名第一,领先的性能得分为 64.78。
Chuxin-Embedding is a specially designed embedding model aimed at enhancing the capability of Chinese text retrieval. It is based on bge-m3-retromae[1] and implements the entire process of pre-training, fine-tuning, and refining. This model has been trained on a vast amount of corpora from various fields. As of September 14, 2024, Chuxin-Embedding has shown outstanding performance in retrieval tasks. It ranks first on the C-MTEB Chinese Retrieval Leaderboard with a leading performance score of 77.88 and also ranks first on the AIR-Bench Chinese Retrieval + Re-ranking Public Leaderboard with a leading performance score of 64.78.
## News
- 2024/10/18: LLM生成及数据清洗 [Code](https://github.com/chuxin-llm/Chuxin-Embedding/blob/main/README_LLM.md) 。
- 2024/9/14: 团队的RAG框架欢迎试用 [ragnify](https://github.com/chuxin-llm/ragnify) 。
- 2024/9/14: LLM generation and data clean [Code](https://github.com/chuxin-llm/Chuxin-Embedding) .
- 2024/9/14: The team's RAG framework is available for trial [ragnify](https://github.com/chuxin-llm/ragnify) .
## Training Details
![image/png](chuxinembedding.png)
基于bge-m3-retromae[1],主要改动如下:
<!-- Provide a longer summary of what this model is. -->
- 基于bge-m3-retromae[1]在亿级数据上预训练。
- 使用BGE pretrain [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain) 完成预训练。
- 在收集的公开亿级检索数据集上实现了微调。
- 使用BGE finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) 完成微调。
- 在收集的公开百万级检索数据集和百万级LLM合成数据集上实现了精调。
- 使用BGE finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) 和 BGE unified_finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/unified_finetune) 完成精调。
- 通过 LLM (QWEN-72B) 进行数据生成,使用 LLM 为message生成新query
- 数据清洗:
- 简单的基于规则清洗
- LLM判断是否可作为搜索引擎查询的query
- rerank模型对(query,message)评分,舍弃pos中的负例,neg中的正例
Based on bge-m3-retromae[1], the main modifications are as follows:
- Pre-trained on a billion-level dataset based on bge-m3-retromae[1].
- Pre-training is completed using BGE pretrain [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain) .
- Fine-tuned on a publicly collected billion-level retrieval dataset.
- Fine-tuning is completed using BGE finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune).
- Refined on a publicly collected million-level retrieval dataset and a million-level LLM synthetic dataset.
- Refining is completed using BGE finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) and BGE unified_finetune [Code](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/unified_finetune).
- Data generation is performed through LLM (QWEN-72B), using LLM to generate new query for messages.
- Data cleaning:
- Simple rule-based cleaning
- LLM to determine whether a query can be used as a search engine query
- The rerank model scores (query, message) pairs, discarding negative examples in the positive set and positive examples in the negative set.
## Collect more data for retrieval-type tasks
1. 预训练数据
- ChineseWebText、 oasis、 oscar、 SkyPile、 wudao
2. 微调数据
- MTP 、webqa、nlpcc、csl、bq、atec、ccks
3. 精调数据
- BGE-M3 、Huatuo26M-Lite 、covid ...
- LLM 合成(BGE-M3 、Huatuo26M-Lite 、covid、wudao、wanjuan_news、mnbvc_news_wiki、mldr、medical QA...)
## Performance
**C_MTEB RETRIEVAL**
| Model | **Average** | **CmedqaRetrieval** | **CovidRetrieval** | **DuRetrieval** | **EcomRetrieval** | **MedicalRetrieval** | **MMarcoRetrieval** | **T2Retrieval** | **VideoRetrieval** |
| :-------------------: | :---------: | :-------: | :------------: | :-----------: | :-----------: | :-------: | :----------: | :-------: | :----------: |
| Zhihui_LLM_Embedding | 76.74 | 48.69 | 84.39 | 91.34 | 71.96 | 65.19 | 84.77 |88.3 | 79.31 |
| zpoint_large_embedding_zh | 76.36 | 47.16 | 89.14 | 89.23 | 70.74 | 68.14 | 82.38 | 83.81 | 80.26 |
| **Chuxin-Embedding** | **77.88** | 56.58 | 84.28 | 85.65 | 74.01 | 75.62 | 79.06 | 84.04 | 83.84 |
**AIR-Bench**
| Retrieval Method | Reranking Model | **Average** | **wiki_zh** | **web_zh** | **news_zh** | **healthcare_zh** | **finance_zh** |
| :-------------------: | :---------:| :---------: | :-------: | :------------: | :-----------: | :-----------: | :----------: |
| bge-m3 | bge-reranker-large | 64.53 | 76.11 | 67.8 | 63.25 | 62.9 | 52.61 |
| gte-Qwen2-7B-instruct |bge-reranker-large | 63.39 | 78.09 | 67.56 | 63.14 | 61.12 | 47.02 |
| **Chuxin-Embedding** | bge-reranker-large | **64.78** |76.23 | 68.44 | 64.2 | 62.93 | 52.11 |
## Generate Embedding for text
```python
#pip install -U FlagEmbedding
from FlagEmbedding import FlagModel
model = FlagModel('chuxin-llm/Chuxin-Embedding',
query_instruction_for_retrieval="为这个句子生成表示以用于检索相关文章:",
use_fp16=True)
sentences_1 = ["样例数据-1", "样例数据-2"]
sentences_2 = ["样例数据-3", "样例数据-1"]
embeddings_1 = model.encode(sentences_1)
embeddings_2 = model.encode(sentences_2)
similarity = embeddings_1 @ embeddings_2.T
print(similarity)
```
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Reference
1. https://huggingface.co/BAAI/bge-m3-retromae
2. https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/BGE_M3
3. https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/baai_general_embedding
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> |