File size: 63,571 Bytes
797e7d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
---
language:
- en
- ar
- zh
- fr
- de
- ja
- ko
- es
tags:
- liquid
- lfm2
- edge
- ColBERT
- PyLate
- sentence-transformers
- sentence-similarity
- feature-extraction
pipeline_tag: sentence-similarity
library_name: PyLate
license: other
license_name: lfm1.0
license_link: LICENSE
metrics:
- MaxSim_accuracy@1
- MaxSim_accuracy@3
- MaxSim_accuracy@5
- MaxSim_accuracy@10
- MaxSim_precision@1
- MaxSim_precision@3
- MaxSim_precision@5
- MaxSim_precision@10
- MaxSim_recall@1
- MaxSim_recall@3
- MaxSim_recall@5
- MaxSim_recall@10
- MaxSim_ndcg@10
- MaxSim_mrr@10
- MaxSim_map@100
model-index:
- name: PyLate
  results:
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoClimateFEVER
      type: NanoClimateFEVER
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.4
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.52
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.64
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.8
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.4
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.20666666666666667
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.15600000000000003
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.11799999999999997
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.195
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.2733333333333334
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.31566666666666665
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.45899999999999996
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.38664978031372876
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.506095238095238
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.31298040075928324
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoDBPedia
      type: NanoDBPedia
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.86
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.92
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.94
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.98
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.86
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.7
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.64
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.5660000000000001
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.12059669442306678
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.2074731836307263
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.28467782707772427
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.4182321427819297
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.7139105590461106
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.8975
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.5749525139913445
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoFEVER
      type: NanoFEVER
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.96
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.98
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.98
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.98
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.96
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.3533333333333333
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.21599999999999994
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.10799999999999997
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.8966666666666667
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.9533333333333333
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.96
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.96
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.9494352279872394
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.9666666666666667
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.9396715796806541
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoFiQA2018
      type: NanoFiQA2018
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.56
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.78
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.78
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.82
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.56
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.36
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.26
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.14799999999999996
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.34874603174603175
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.5375714285714286
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.584452380952381
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.6361984126984127
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.5909802936451645
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.6625000000000001
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.5325997234510657
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoHotpotQA
      type: NanoHotpotQA
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.92
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.98
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 1.0
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 1.0
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.92
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.5599999999999999
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.35999999999999993
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.18799999999999997
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.46
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.84
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.9
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.94
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.8954853297530804
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.9540000000000001
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.8452079490557751
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoMSMARCO
      type: NanoMSMARCO
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.58
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.7
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.76
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.82
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.58
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.23333333333333336
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.15200000000000002
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.08199999999999999
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.58
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.7
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.76
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.82
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.6860512766453598
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.6444126984126984
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.6563222143353721
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoNFCorpus
      type: NanoNFCorpus
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.5
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.6
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.66
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.7
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.5
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.3933333333333333
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.36400000000000005
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.29
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.06441975062397678
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.10314642255588413
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.1276571146817061
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.15217406670771688
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.37688958487118834
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.5655
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.18401289774934215
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoNQ
      type: NanoNQ
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.66
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.78
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.86
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.88
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.66
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.26666666666666666
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.184
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.09599999999999997
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.62
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.72
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.82
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.85
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.7462482063760048
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.7323333333333334
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.7080310107127462
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoQuoraRetrieval
      type: NanoQuoraRetrieval
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.8
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.92
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.98
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 1.0
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.8
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.3666666666666666
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.23599999999999993
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.132
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.7106666666666667
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.8813333333333333
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.9346666666666666
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.9793333333333334
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.882106394646597
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.8631666666666666
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.8429613442113442
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoSCIDOCS
      type: NanoSCIDOCS
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.5
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.68
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.76
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.86
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.5
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.3466666666666666
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.27599999999999997
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.18599999999999997
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.10566666666666666
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.21366666666666664
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.2826666666666667
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.38066666666666665
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.3835676640413774
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.6130555555555556
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.29746953473534715
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoArguAna
      type: NanoArguAna
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.28
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.5
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.7
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.88
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.28
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.16666666666666663
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.14
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.088
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.28
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.5
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.7
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.88
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.550733304467759
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.44868253968253957
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.4511852654234456
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoSciFact
      type: NanoSciFact
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.7
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.82
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.88
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.92
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.7
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.29333333333333333
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.19599999999999998
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.10199999999999998
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.675
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.805
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.88
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.91
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.8042579434791977
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.7707142857142858
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.7705943722943722
      name: Maxsim Map@100
  - task:
      type: py-late-information-retrieval
      name: Py Late Information Retrieval
    dataset:
      name: NanoTouche2020
      type: NanoTouche2020
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.7959183673469388
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.9795918367346939
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 1.0
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 1.0
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.7959183673469388
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.7619047619047619
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.6897959183673469
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.5489795918367346
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.054536287361574225
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.15427299614340523
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.2308549805548407
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.3471515583210746
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.629619385239878
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.8894557823129251
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.4616787350016793
      name: Maxsim Map@100
  - task:
      type: nano-beir
      name: Nano BEIR
    dataset:
      name: NanoBEIR mean
      type: NanoBEIR_mean
    metrics:
    - type: MaxSim_accuracy@1
      value: 0.6550706436420722
      name: Maxsim Accuracy@1
    - type: MaxSim_accuracy@3
      value: 0.7815070643642071
      name: Maxsim Accuracy@3
    - type: MaxSim_accuracy@5
      value: 0.8415384615384615
      name: Maxsim Accuracy@5
    - type: MaxSim_accuracy@10
      value: 0.8953846153846154
      name: Maxsim Accuracy@10
    - type: MaxSim_precision@1
      value: 0.6550706436420722
      name: Maxsim Precision@1
    - type: MaxSim_precision@3
      value: 0.3852747252747252
      name: Maxsim Precision@3
    - type: MaxSim_precision@5
      value: 0.2976766091051805
      name: Maxsim Precision@5
    - type: MaxSim_precision@10
      value: 0.20407535321821035
      name: Maxsim Precision@10
    - type: MaxSim_recall@1
      value: 0.3931768280118962
      name: Maxsim Recall@1
    - type: MaxSim_recall@3
      value: 0.5299331305821623
      name: Maxsim Recall@3
    - type: MaxSim_recall@5
      value: 0.5985109464051271
      name: Maxsim Recall@5
    - type: MaxSim_recall@10
      value: 0.6717504754237795
      name: Maxsim Recall@10
    - type: MaxSim_ndcg@10
      value: 0.6612257654240528
      name: Maxsim Ndcg@10
    - type: MaxSim_mrr@10
      value: 0.7318525204953776
      name: Maxsim Mrr@10
    - type: MaxSim_map@100
      value: 0.5828975031847518
      name: Maxsim Map@100
---

<center>
<div style="text-align: center;">
  <img 
    src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/7_6D7rWrLxp2hb6OHSV1p.png" 
    alt="Liquid AI"
    style="width: 100%; max-width: 66%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;"
  />
</div>
<div style="display: flex; justify-content: center;">
<a href="https://playground.liquid.ai/chat">
<svg width="114.8" height="20" viewBox="0 0 900 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Playground" style="margin-bottom: 1em;">
  <title>Playground</title>
  <g>
    <rect fill="#fff" width="200" height="200"></rect>
    <rect fill="url(#x)" x="200" width="800" height="200"></rect>
  </g>
  <g transform="translate(35, 30) scale(0.45, 0.45)">
    <path d="M172.314 129.313L172.219 129.367L206.125 188.18C210.671 195.154 213.324 203.457 213.324 212.382C213.324 220.834 210.956 228.739 206.839 235.479L275.924 213.178L167.853 33.6L141.827 76.9614L172.314 129.313Z" fill="black"/>
    <path d="M114.217 302.4L168.492 257.003C168.447 257.003 168.397 257.003 168.352 257.003C143.515 257.003 123.385 237.027 123.385 212.387C123.385 203.487 126.023 195.204 130.55 188.24L162.621 132.503L135.966 86.7327L60.0762 213.183L114.127 302.4H114.217Z" fill="black"/>
    <path d="M191.435 250.681C191.435 250.681 191.43 250.681 191.425 250.686L129.71 302.4H221.294L267.71 226.593L191.435 250.686V250.681Z" fill="black"/>
  </g>
  <g transform="translate(50, 0)" aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
    <text x="255" y="148" textLength="619" fill="#000" opacity="0.1">Playground</text>
    <text x="245" y="138" textLength="619">Playground</text>
  </g>
  <linearGradient id="x" x1="0%" y1="0%" x2="100%" y2="0%">
    <stop offset="0%" style="stop-color:#000000"></stop>
    <stop offset="100%" style="stop-color:#000000"></stop>
  </linearGradient>
</svg>
</a>
<a href="https://leap.liquid.ai/?utm_source=huggingface&utm_medium=modelcards">
<svg width="114.8" height="20" viewBox="0 0 900 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Leap" style="margin-bottom: 1em;">
  <title>Leap</title>
  <g>
    <rect fill="#000" width="500" height="200"></rect>
  </g>
  <g transform="translate(100, 45) scale(3.5, 3.5)" fill="#fff">
    <path d="M13.8512 28.0769C12.5435 28.0769 11.4025 27.8205 10.4281 27.3077C9.45375 26.7692 8.68452 26.0128 8.12042 25.0385C7.58196 24.0641 7.31273 22.9359 7.31273 21.6538V3.76923H0.389648V0H11.4666V21.6538C11.4666 22.4744 11.6973 23.1282 12.1589 23.6154C12.6204 24.0769 13.2486 24.3077 14.0435 24.3077H20.582V28.0769H13.8512Z"/>
    <path d="M29.6439 28.4615C27.9259 28.4615 26.4131 28.1282 25.1054 27.4615C23.8233 26.7692 22.8362 25.8077 22.1439 24.5769C21.4516 23.3462 21.1054 21.9103 21.1054 20.2692V14.7308C21.1054 13.0641 21.4516 11.6282 22.1439 10.4231C22.8362 9.19231 23.8233 8.24359 25.1054 7.57692C26.4131 6.88462 27.9259 6.53846 29.6439 6.53846C31.3875 6.53846 32.9003 6.88462 34.1823 7.57692C35.4644 8.24359 36.4516 9.19231 37.1439 10.4231C37.8362 11.6282 38.1823 13.0641 38.1823 14.7308V18.5H25.1054V20.2692C25.1054 21.8333 25.49 23.0256 26.2592 23.8462C27.0541 24.6667 28.1951 25.0769 29.6823 25.0769C30.8875 25.0769 31.8618 24.8718 32.6054 24.4615C33.349 24.0256 33.8105 23.3974 33.99 22.5769H38.1054C37.7977 24.3718 36.8746 25.8077 35.3362 26.8846C33.7977 27.9359 31.9003 28.4615 29.6439 28.4615ZM34.1823 16V14.6923C34.1823 13.1538 33.7977 11.9615 33.0285 11.1154C32.2592 10.2692 31.131 9.84615 29.6439 9.84615C28.1823 9.84615 27.0541 10.2692 26.2592 11.1154C25.49 11.9615 25.1054 13.1667 25.1054 14.7308V15.6923L34.49 15.6538L34.1823 16Z"/>
    <path d="M46.3596 28.4615C44.1545 28.4615 42.4109 27.8974 41.1288 26.7692C39.8724 25.6154 39.2442 24.0513 39.2442 22.0769C39.2442 20.0769 39.9109 18.5128 41.2442 17.3846C42.6032 16.2308 44.4622 15.6538 46.8211 15.6538H52.7058V13.6923C52.7058 12.5385 52.3468 11.641 51.6288 11C50.9109 10.359 49.8981 10.0385 48.5904 10.0385C47.4365 10.0385 46.475 10.2949 45.7058 10.8077C44.9365 11.2949 44.4878 11.9487 44.3596 12.7692H40.2827C40.5135 10.8718 41.3852 9.35897 42.8981 8.23077C44.4365 7.10256 46.3724 6.53846 48.7058 6.53846C51.2186 6.53846 53.2058 7.17949 54.6673 8.46154C56.1288 9.71795 56.8596 11.4359 56.8596 13.6154V28.0769H52.8211V24.1923H52.1288L52.8211 23.4231C52.8211 24.9615 52.2314 26.1923 51.0519 27.1154C49.8724 28.0128 48.3083 28.4615 46.3596 28.4615ZM47.5904 25.2692C49.0776 25.2692 50.2955 24.8974 51.2442 24.1538C52.2186 23.3846 52.7058 22.4103 52.7058 21.2308V18.4615H46.8981C45.8211 18.4615 44.9622 18.7564 44.3211 19.3462C43.7058 19.9359 43.3981 20.7436 43.3981 21.7692C43.3981 22.8462 43.7699 23.7051 44.5135 24.3462C45.257 24.9615 46.2827 25.2692 47.5904 25.2692Z"/>
    <path d="M58.9984 35V6.92308H63.1138V10.9615H63.9984L63.1138 11.9231C63.1138 10.2564 63.6266 8.94872 64.6523 8C65.7036 7.02564 67.101 6.53846 68.8446 6.53846C70.9728 6.53846 72.6651 7.25641 73.9215 8.69231C75.2036 10.1026 75.8446 12.0385 75.8446 14.5V20.4615C75.8446 22.1026 75.5497 23.5256 74.96 24.7308C74.3959 25.9103 73.5882 26.8333 72.5369 27.5C71.5113 28.141 70.2805 28.4615 68.8446 28.4615C67.1266 28.4615 65.742 27.9872 64.6907 27.0385C63.6395 26.0641 63.1138 24.7436 63.1138 23.0769L63.9984 24.0385H63.0369L63.1523 28.9615V35H58.9984ZM67.4215 24.8462C68.7805 24.8462 69.8318 24.4615 70.5754 23.6923C71.3446 22.8974 71.7292 21.7564 71.7292 20.2692V14.7308C71.7292 13.2436 71.3446 12.1154 70.5754 11.3462C69.8318 10.5513 68.7805 10.1538 67.4215 10.1538C66.1138 10.1538 65.0754 10.5641 64.3061 11.3846C63.5369 12.1795 63.1523 13.2949 63.1523 14.7308V20.2692C63.1523 21.7051 63.5369 22.8333 64.3061 23.6538C65.0754 24.4487 66.1138 24.8462 67.4215 24.8462Z"/>
  </g>
  <linearGradient id="y" x1="0%" y1="0%" x2="100%" y2="0%">
    <stop offset="0%" style="stop-color:#000000"></stop>
  </linearGradient>
</svg>
</a>
</div>
</center>

# LFM2-ColBERT-350M

LFM2-ColBERT-350M is a late interaction retriever with excellent multilingual performance. It allows you to store documents in one language (for example, a product description in English) and retrieve them in many languages with high accuracy.

- LFM2-ColBERT-350M offers **best-in-class accuracy** across different languages.
- Inference speed is **on par with models 2.3 times smaller**, thanks to the efficient LFM2 backbone.
- You can use it as a **drop-in replacement** in your current RAG pipelines to improve performance.

Find more information about LFM2-ColBERT-350M in our [blog post](http://www.liquid.ai/blog/lfm2-colbert-350m-one-model-to-embed-them-all).

> [!NOTE]
> 🚀 Try our demo: https://huggingface.co/spaces/LiquidAI/LFM2-ColBERT

## 📄 Model details

Late interaction retrievers like LFM2-ColBERT-350M are particularly interesting because they preserve much of the **expressivity** of re-rankers while retaining the **efficiency** of bi-encoders. 
In practice, they're used to both retrieve documents at scale (like bi-encoders) and rank them at the same time (like rerankers).

![image](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/5u2Zm_bIDHUtBJrDtT_vm.png)

We recommend using this model for various RAG use cases, such as:

- **E-commerce**: Find products across many languages with semantic search at scale.
- **On-device semantic search**: Ask questions to your phone in natural language to retrieve files, emails, and notes.
- **Enterprise knowledge assistants**: Retrieve internal legal, financial, and technical documents in different languages.

| Property              | [**LFM2-ColBERT-350M**](https://huggingface.co/LiquidAI/LFM2-ColBERT-350M/) | 
| --------------------- | ------------------------------ |
| **Total parameters**  | 353,322,752                    | 
| **Layers**            | 25 (18 conv + 6 attn + 1 dense)|
| **Context length**    | 32,768 tokens                  |
| **Vocabulary size**   | 65,536                         |
| **Training precision**| BF16                           |
| **License**           | LFM Open License v1.0          | 

**Document length:** 512 tokens

**Query length:** 32 tokens

**Output dimensionality:** 128 tokens

**Similarity function:** MaxSim

**Supported languages**: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish.

```
ColBERT(
  (0): Transformer({'max_seq_length': 511, 'do_lower_case': False}) with Transformer model: Lfm2Model 
  (1): Dense({'in_features': 1024, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
```

## 🏃 How to run

<a href="https://colab.research.google.com/drive/1tXSAXGpjuTvliuTrSSHDEcmIe48uolrD?usp=sharing"><img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/vlOyMEjwHa_b_LXysEu2E.png" width=120 alt="Colab link"></a>

First, install the PyLate and transformers library:

```bash
pip install -U pylate
```

### Retrieval

Use this model with PyLate to index and retrieve documents. The index uses [FastPLAID](https://github.com/lightonai/fast-plaid) for efficient similarity search.

#### Indexing documents

Load LFM2-ColBERT-350M and initialize the PLAID index, then encode and index your documents:

```python
from pylate import indexes, models, retrieve

# Step 1: Load the ColBERT model
model = models.ColBERT(
    model_name_or_path="LiquidAI/LFM2-ColBERT-350M",
)
model.tokenizer.pad_token = model.tokenizer.eos_token

# Step 2: Initialize the PLAID index
index = indexes.PLAID(
    index_folder="pylate-index",
    index_name="index",
    override=True,  # This overwrites the existing index if any
)

# Step 3: Encode the documents
documents_ids = ["1", "2", "3"]
documents = ["document 1 text", "document 2 text", "document 3 text"]

documents_embeddings = model.encode(
    documents,
    batch_size=32,
    is_query=False,  # Ensure that it is set to False to indicate that these are documents, not queries
    show_progress_bar=True,
)

# Step 4: Add document embeddings to the index by providing embeddings and corresponding ids
index.add_documents(
    documents_ids=documents_ids,
    documents_embeddings=documents_embeddings,
)
```

Note that you do not have to recreate the index and encode the documents every time. Once you have created an index and added the documents, you can re-use the index later by loading it:

```python
# To load an index, simply instantiate it with the correct folder/name and without overriding it
index = indexes.PLAID(
    index_folder="pylate-index",
    index_name="index",
)
```

#### Retrieving top-k documents for queries

Once the documents are indexed, you can retrieve the top-k most relevant documents for a given set of queries.
To do so, initialize the ColBERT retriever with the index you want to search in, encode the queries and then retrieve the top-k documents to get the top matches ids and relevance scores:

```python
# Step 1: Initialize the ColBERT retriever
retriever = retrieve.ColBERT(index=index)

# Step 2: Encode the queries
queries_embeddings = model.encode(
    ["query for document 3", "query for document 1"],
    batch_size=32,
    is_query=True,  #  # Ensure that it is set to False to indicate that these are queries
    show_progress_bar=True,
)

# Step 3: Retrieve top-k documents
scores = retriever.retrieve(
    queries_embeddings=queries_embeddings,
    k=10,  # Retrieve the top 10 matches for each query
)
```

### Reranking
If you only want to use LFM2-ColBERT-350M to perform reranking on top of your first-stage retrieval pipeline without building an index, you can simply use rank function and pass the queries and documents to rerank:

```python
from pylate import rank, models

queries = [
    "query A",
    "query B",
]

documents = [
    ["document A", "document B"],
    ["document 1", "document C", "document B"],
]

documents_ids = [
    [1, 2],
    [1, 3, 2],
]

model = models.ColBERT(
    model_name_or_path="LiquidAI/LFM2-ColBERT-350M",
)

queries_embeddings = model.encode(
    queries,
    is_query=True,
)

documents_embeddings = model.encode(
    documents,
    is_query=False,
)

reranked_documents = rank.rerank(
    documents_ids=documents_ids,
    queries_embeddings=queries_embeddings,
    documents_embeddings=documents_embeddings,
)
```

## 📈 Performance

### Accuracy

We extended the NanoBEIR benchmark to include Japanese and Korean languages. We open-sourced this dataset on Hugging Face at [LiquidAI/nanobeir-multilingual-extended](https://huggingface.co/datasets/LiquidAI/nanobeir-multilingual-extended) for reproducibility. 
On this NanoBEIR benchmark, LFM2-ColBERT-350M displays significantly stronger multilingual capabilities (especially in German, Arabic, Korean, and Japanese) while maintaining English performance.

![image](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/ARs78eGhBagN_VO3VQJCD.png)

Even more interestingly, LFM2-ColBERT-350M is an excellent cross-lingual retriever. This means that it is capable of retrieving documents based on queries from other languages. This is ideal for client-facing applications, like in e-commerce, where a description might be in English but the query is in another language.

LFM2-ColBERT-350M works especially well for English, French, Spanish, Italian, Portuguese, and German, as shown with these NDCG@10 scores on NanoBEIR:

<table style="font-size: 14px;">
<thead>
<tr>
<th style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">Doc / Query</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">AR</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">DE</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">EN</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">ES</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">FR</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">IT</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">JA</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">KO</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">PT</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 700;">AVG</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">AR</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad4a6;">0.490</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f5a08c;">0.288</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98;">0.339</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6a88f;">0.303</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6aa90;">0.304</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f59f8b;">0.286</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fac19e;">0.357</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98;">0.338</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6a48d;">0.291</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98; font-weight: 700;">33.30%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">DE</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde6b8;">0.383</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c6e8af;">0.563</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c1e6ad;">0.547</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f4efcd;">0.498</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8f2d1;">0.502</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f0ebca;">0.489</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd6a8;">0.424</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddcad;">0.368</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ede8c8;">0.486</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcf6d5; font-weight: 700;">47.33%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">EN</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd9ab;">0.416</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c3e7ae;">0.554</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #9edf9e;">0.661</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c6e8af;">0.553</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #cae9b1;">0.551</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e4eec3;">0.522</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde3b3;">0.477</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde0b0;">0.395</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #dbecbd;">0.535</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb; font-weight: 700;">51.82%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">ES</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd8aa;">0.412</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6;">0.514</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #b0e3a4;">0.578</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c6e8af;">0.563</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c1e6ad;">0.547</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.529</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde0b0;">0.436</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde0b0;">0.394</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c1e6ad;">0.547</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6; font-weight: 700;">50.21%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">FR</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd7a9;">0.408</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.527</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #b5e4a7;">0.573</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #cae9b1;">0.552</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c3e7ae;">0.564</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e0edc0;">0.537</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fee5b5;">0.450</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddeb0;">0.388</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c4e7af;">0.549</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb; font-weight: 700;">50.53%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">IT</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde0b0;">0.395</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.512</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c3e7ae;">0.554</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #dbecbd;">0.535</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #dbecbd;">0.535</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d2e9b7;">0.543</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde2b2;">0.439</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddeaf;">0.386</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.529</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcf6d5; font-weight: 700;">49.20%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">JA</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde4b4;">0.375</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcdaac;">0.365</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd6a8;">0.409</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fabf9d;">0.358</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8b396;">0.345</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f9b697;">0.337</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #cae9b1;">0.557</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb;">0.491</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b094;">0.330</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd3a4; font-weight: 700;">39.63%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">KO</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7af93;">0.326</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f59f8b;">0.274</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ab90;">0.310</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f5a18c;">0.282</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f49c8a;">0.265</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f49d8a;">0.266</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde1b1;">0.440</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.527</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f49e8b;">0.271</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6a98f; font-weight: 700;">32.89%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">PT</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd6a8;">0.402</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb;">0.499</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c6e8af;">0.558</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c4e7af;">0.545</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.528</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d7eabb;">0.529</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fde0b0;">0.436</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddcad;">0.382</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c1e6ad;">0.547</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcf6d5; font-weight: 700;">49.17%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 700;">AVG</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd2a3; font-weight: 700;">40.07%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #feedc1; font-weight: 700;">45.51%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6; font-weight: 700;">50.32%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f1eecf; font-weight: 700;">46.54%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcf6d5; font-weight: 700;">46.00%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fee6b6; font-weight: 700;">44.86%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fee5b5; font-weight: 700;">44.62%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd3a5; font-weight: 700;">40.78%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #feedbe; font-weight: 700;">45.38%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0;"></td>
</tr>
</tbody>
</table>

In comparison, GTE-ModernColBERT-v1 consistently gets lower scores when documents and queries are not in the same language:

<table style="font-size: 14px;">
<thead>
<tr>
<th style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">Doc / Query</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">AR</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">DE</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">EN</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">ES</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">FR</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">IT</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">JA</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">KO</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">PT</th>
<th style="text-align: center; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 700;">AVG</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">AR</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98;">0.309</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f29488;">0.089</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39789;">0.107</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f29488;">0.089</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39688;">0.094</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39588;">0.092</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f18d85;">0.070</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.049</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f29488;">0.087</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39789; font-weight: 700;">10.96%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">DE</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.039</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f4efcd;">0.499</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.454</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fbe1b0;">0.362</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddcad;">0.393</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fce0b0;">0.367</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ad91;">0.133</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f08a84;">0.061</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcdaac;">0.361</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98; font-weight: 700;">29.65%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">EN</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.042</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddcad;">0.408</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #9edf9e;">0.680</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6;">0.446</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb;">0.484</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd9ab;">0.420</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b295;">0.167</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f18d85;">0.073</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6;">0.438</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd6a8; font-weight: 700;">35.08%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">ES</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.044</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fce0b0;">0.360</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb;">0.485</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d2e9b7;">0.525</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e4eec3;">0.465</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.437</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ae92;">0.149</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f08a84;">0.061</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #eff2cb;">0.487</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad19f; font-weight: 700;">33.48%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">FR</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.044</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fce1b1;">0.381</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f1eecf;">0.505</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.455</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #c1e6ad;">0.546</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcd9ab;">0.428</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6af92;">0.136</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f08983;">0.057</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e4eec3;">0.467</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad29f; font-weight: 700;">33.35%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">IT</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.043</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fce0b0;">0.369</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6;">0.449</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e8f0c6;">0.446</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.451</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f0ebca;">0.516</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ae92;">0.143</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8883;">0.054</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.448</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad3a1; font-weight: 700;">32.36%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">JA</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.031</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b295;">0.169</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f9bc99;">0.250</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b295;">0.172</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b396;">0.177</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b295;">0.169</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.459</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f08983;">0.059</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6af92;">0.165</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b194; font-weight: 700;">18.35%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">KO</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.030</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ad91;">0.134</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b295;">0.169</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f5aa90;">0.127</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6ad91;">0.133</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f5ab90;">0.125</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39688;">0.090</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fce0b0;">0.368</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f5a98f;">0.124</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f59f8b; font-weight: 700;">14.45%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 500;">PT</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #ef8783;">0.043</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fcdaac;">0.368</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f1eecf;">0.479</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f4efcd;">0.492</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e4eec3;">0.467</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #e7efc6;">0.448</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f6af92;">0.138</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f08a84;">0.062</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #d2e9b7;">0.530</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad29f; font-weight: 700;">33.63%</td>
</tr>
<tr>
<td style="text-align: left; padding: 8px; background: #fafafa; border: 1px solid #e0e0e0; font-weight: 700;">AVG</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f19188; font-weight: 700;">6.94%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f8ba98; font-weight: 700;">30.84%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fddcad; font-weight: 700;">39.75%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fbd8a9; font-weight: 700;">34.59%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fbdaab; font-weight: 700;">35.68%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fad29f; font-weight: 700;">33.35%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f7b396; font-weight: 700;">16.53%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #f39689; font-weight: 700;">9.37%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0; background-color: #fbd8a9; font-weight: 700;">34.24%</td>
<td style="text-align: center; padding: 8px; border: 1px solid #e0e0e0;"></td>
</tr>
</tbody>
</table>

This makes retrieval a lot more reliable and can replace architectures with multiple models with a single, unified retriever.

### Inference speed

Despite being more than twice as big, LFM2-ColBERT-350M demonstrates throughput performance on par with GTE-ModernColBERT-v1 for query and document encoding across various batch sizes.

Query encoding was evaluated using realistic query patterns from datasets like MS MARCO and Natural Questions.

![image](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/P2seQD9MdKHykrm35Yvp_.png)

Document encoding was measured on realistic documents with varying lengths and domains.

![image](https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/naj9300CQfikdW4i15xEc.png)

## 📬 Contact

If you are interested in custom solutions with edge deployment, please contact [our sales team](https://www.liquid.ai/contact).

Please cite the PyLate library if you use it for inference or training:

```bibtex
@misc{PyLate,
title={PyLate: Flexible Training and Retrieval for Late Interaction Models},
author={Chaffin, Antoine and Sourty, Raphaël},
url={https://github.com/lightonai/pylate},
year={2024}
}
```