faiss 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +18 -18
- data/README.md +1 -1
- data/lib/faiss/version.rb +1 -1
- data/vendor/faiss/Clustering.cpp +318 -53
- data/vendor/faiss/Clustering.h +39 -11
- data/vendor/faiss/DirectMap.cpp +267 -0
- data/vendor/faiss/DirectMap.h +120 -0
- data/vendor/faiss/IVFlib.cpp +24 -4
- data/vendor/faiss/IVFlib.h +4 -0
- data/vendor/faiss/Index.h +5 -24
- data/vendor/faiss/Index2Layer.cpp +0 -1
- data/vendor/faiss/IndexBinary.h +7 -3
- data/vendor/faiss/IndexBinaryFlat.cpp +5 -0
- data/vendor/faiss/IndexBinaryFlat.h +3 -0
- data/vendor/faiss/IndexBinaryHash.cpp +492 -0
- data/vendor/faiss/IndexBinaryHash.h +116 -0
- data/vendor/faiss/IndexBinaryIVF.cpp +160 -107
- data/vendor/faiss/IndexBinaryIVF.h +14 -4
- data/vendor/faiss/IndexFlat.h +2 -1
- data/vendor/faiss/IndexHNSW.cpp +68 -16
- data/vendor/faiss/IndexHNSW.h +3 -3
- data/vendor/faiss/IndexIVF.cpp +72 -76
- data/vendor/faiss/IndexIVF.h +24 -5
- data/vendor/faiss/IndexIVFFlat.cpp +19 -54
- data/vendor/faiss/IndexIVFFlat.h +1 -11
- data/vendor/faiss/IndexIVFPQ.cpp +49 -26
- data/vendor/faiss/IndexIVFPQ.h +9 -10
- data/vendor/faiss/IndexIVFPQR.cpp +2 -2
- data/vendor/faiss/IndexIVFSpectralHash.cpp +2 -2
- data/vendor/faiss/IndexLSH.h +4 -1
- data/vendor/faiss/IndexPreTransform.cpp +0 -1
- data/vendor/faiss/IndexScalarQuantizer.cpp +8 -1
- data/vendor/faiss/InvertedLists.cpp +0 -2
- data/vendor/faiss/MetaIndexes.cpp +0 -1
- data/vendor/faiss/MetricType.h +36 -0
- data/vendor/faiss/c_api/Clustering_c.cpp +13 -7
- data/vendor/faiss/c_api/Clustering_c.h +11 -5
- data/vendor/faiss/c_api/IndexIVF_c.cpp +7 -0
- data/vendor/faiss/c_api/IndexIVF_c.h +7 -0
- data/vendor/faiss/c_api/IndexPreTransform_c.cpp +21 -0
- data/vendor/faiss/c_api/IndexPreTransform_c.h +32 -0
- data/vendor/faiss/demos/demo_weighted_kmeans.cpp +185 -0
- data/vendor/faiss/gpu/GpuCloner.cpp +4 -0
- data/vendor/faiss/gpu/GpuClonerOptions.cpp +1 -1
- data/vendor/faiss/gpu/GpuDistance.h +93 -0
- data/vendor/faiss/gpu/GpuIndex.h +7 -0
- data/vendor/faiss/gpu/GpuIndexFlat.h +0 -10
- data/vendor/faiss/gpu/GpuIndexIVF.h +1 -0
- data/vendor/faiss/gpu/StandardGpuResources.cpp +8 -0
- data/vendor/faiss/gpu/test/TestGpuIndexFlat.cpp +49 -27
- data/vendor/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +110 -2
- data/vendor/faiss/gpu/utils/DeviceUtils.h +6 -0
- data/vendor/faiss/impl/AuxIndexStructures.cpp +17 -0
- data/vendor/faiss/impl/AuxIndexStructures.h +14 -3
- data/vendor/faiss/impl/HNSW.cpp +0 -1
- data/vendor/faiss/impl/PolysemousTraining.h +5 -5
- data/vendor/faiss/impl/ProductQuantizer-inl.h +138 -0
- data/vendor/faiss/impl/ProductQuantizer.cpp +1 -113
- data/vendor/faiss/impl/ProductQuantizer.h +42 -47
- data/vendor/faiss/impl/index_read.cpp +103 -7
- data/vendor/faiss/impl/index_write.cpp +101 -5
- data/vendor/faiss/impl/io.cpp +111 -1
- data/vendor/faiss/impl/io.h +38 -0
- data/vendor/faiss/index_factory.cpp +0 -1
- data/vendor/faiss/tests/test_merge.cpp +0 -1
- data/vendor/faiss/tests/test_pq_encoding.cpp +6 -6
- data/vendor/faiss/tutorial/cpp/5-Multiple-GPUs.cpp +1 -0
- data/vendor/faiss/utils/distances.cpp +4 -5
- data/vendor/faiss/utils/distances_simd.cpp +0 -1
- data/vendor/faiss/utils/hamming.cpp +85 -3
- data/vendor/faiss/utils/hamming.h +20 -0
- data/vendor/faiss/utils/utils.cpp +0 -96
- data/vendor/faiss/utils/utils.h +0 -15
- metadata +11 -3
- data/lib/faiss/ext.bundle +0 -0
@@ -45,13 +45,13 @@ TEST(PQEncoderGeneric, encode) {
|
|
45
45
|
|
46
46
|
// NOTE(hoss): Necessary scope to ensure trailing bits are flushed to mem.
|
47
47
|
{
|
48
|
-
faiss::
|
48
|
+
faiss::PQEncoderGeneric encoder(codes.get(), nbits);
|
49
49
|
for (const auto& v : values) {
|
50
50
|
encoder.encode(v & mask);
|
51
51
|
}
|
52
52
|
}
|
53
53
|
|
54
|
-
faiss::
|
54
|
+
faiss::PQDecoderGeneric decoder(codes.get(), nbits);
|
55
55
|
for (int i = 0; i < nsubcodes; ++i) {
|
56
56
|
uint64_t v = decoder.decode();
|
57
57
|
EXPECT_EQ(values[i] & mask, v);
|
@@ -66,12 +66,12 @@ TEST(PQEncoder8, encode) {
|
|
66
66
|
const uint64_t mask = 0xFF;
|
67
67
|
std::unique_ptr<uint8_t[]> codes(new uint8_t[nsubcodes]);
|
68
68
|
|
69
|
-
faiss::
|
69
|
+
faiss::PQEncoder8 encoder(codes.get(), 8);
|
70
70
|
for (const auto& v : values) {
|
71
71
|
encoder.encode(v & mask);
|
72
72
|
}
|
73
73
|
|
74
|
-
faiss::
|
74
|
+
faiss::PQDecoder8 decoder(codes.get(), 8);
|
75
75
|
for (int i = 0; i < nsubcodes; ++i) {
|
76
76
|
uint64_t v = decoder.decode();
|
77
77
|
EXPECT_EQ(values[i] & mask, v);
|
@@ -85,12 +85,12 @@ TEST(PQEncoder16, encode) {
|
|
85
85
|
const uint64_t mask = 0xFFFF;
|
86
86
|
std::unique_ptr<uint8_t[]> codes(new uint8_t[2 * nsubcodes]);
|
87
87
|
|
88
|
-
faiss::
|
88
|
+
faiss::PQEncoder16 encoder(codes.get(), 16);
|
89
89
|
for (const auto& v : values) {
|
90
90
|
encoder.encode(v & mask);
|
91
91
|
}
|
92
92
|
|
93
|
-
faiss::
|
93
|
+
faiss::PQDecoder16 decoder(codes.get(), 16);
|
94
94
|
for (int i = 0; i < nsubcodes; ++i) {
|
95
95
|
uint64_t v = decoder.decode();
|
96
96
|
EXPECT_EQ(values[i] & mask, v);
|
@@ -359,7 +359,7 @@ void knn_inner_product (const float * x,
|
|
359
359
|
size_t d, size_t nx, size_t ny,
|
360
360
|
float_minheap_array_t * res)
|
361
361
|
{
|
362
|
-
if (
|
362
|
+
if (nx < distance_compute_blas_threshold) {
|
363
363
|
knn_inner_product_sse (x, y, d, nx, ny, res);
|
364
364
|
} else {
|
365
365
|
knn_inner_product_blas (x, y, d, nx, ny, res);
|
@@ -379,7 +379,7 @@ void knn_L2sqr (const float * x,
|
|
379
379
|
size_t d, size_t nx, size_t ny,
|
380
380
|
float_maxheap_array_t * res)
|
381
381
|
{
|
382
|
-
if (
|
382
|
+
if (nx < distance_compute_blas_threshold) {
|
383
383
|
knn_L2sqr_sse (x, y, d, nx, ny, res);
|
384
384
|
} else {
|
385
385
|
NopDistanceCorrection nop;
|
@@ -643,7 +643,6 @@ static void range_search_sse (const float * x,
|
|
643
643
|
float radius,
|
644
644
|
RangeSearchResult *res)
|
645
645
|
{
|
646
|
-
FAISS_THROW_IF_NOT (d % 4 == 0);
|
647
646
|
|
648
647
|
#pragma omp parallel
|
649
648
|
{
|
@@ -693,7 +692,7 @@ void range_search_L2sqr (
|
|
693
692
|
RangeSearchResult *res)
|
694
693
|
{
|
695
694
|
|
696
|
-
if (
|
695
|
+
if (nx < distance_compute_blas_threshold) {
|
697
696
|
range_search_sse<true> (x, y, d, nx, ny, radius, res);
|
698
697
|
} else {
|
699
698
|
range_search_blas<true> (x, y, d, nx, ny, radius, res);
|
@@ -708,7 +707,7 @@ void range_search_inner_product (
|
|
708
707
|
RangeSearchResult *res)
|
709
708
|
{
|
710
709
|
|
711
|
-
if (
|
710
|
+
if (nx < distance_compute_blas_threshold) {
|
712
711
|
range_search_sse<false> (x, y, d, nx, ny, radius, res);
|
713
712
|
} else {
|
714
713
|
range_search_blas<false> (x, y, d, nx, ny, radius, res);
|
@@ -28,15 +28,13 @@
|
|
28
28
|
|
29
29
|
#include <vector>
|
30
30
|
#include <memory>
|
31
|
-
#include <stdlib.h>
|
32
31
|
#include <stdio.h>
|
33
32
|
#include <math.h>
|
34
|
-
#include <assert.h>
|
35
|
-
#include <limits.h>
|
36
33
|
|
37
34
|
#include <faiss/utils/Heap.h>
|
38
35
|
#include <faiss/impl/FaissAssert.h>
|
39
36
|
#include <faiss/utils/utils.h>
|
37
|
+
#include <faiss/impl/AuxIndexStructures.h>
|
40
38
|
|
41
39
|
static const size_t BLOCKSIZE_QUERY = 8192;
|
42
40
|
|
@@ -487,6 +485,30 @@ void bitvec_print (const uint8_t * b, size_t d)
|
|
487
485
|
}
|
488
486
|
|
489
487
|
|
488
|
+
void bitvec_shuffle (size_t n, size_t da, size_t db,
|
489
|
+
const int *order,
|
490
|
+
const uint8_t *a,
|
491
|
+
uint8_t *b)
|
492
|
+
{
|
493
|
+
for(size_t i = 0; i < db; i++) {
|
494
|
+
FAISS_THROW_IF_NOT (order[i] >= 0 && order[i] < da);
|
495
|
+
}
|
496
|
+
size_t lda = (da + 7) / 8;
|
497
|
+
size_t ldb = (db + 7) / 8;
|
498
|
+
|
499
|
+
#pragma omp parallel for if(n > 10000)
|
500
|
+
for (size_t i = 0; i < n; i++) {
|
501
|
+
const uint8_t *ai = a + i * lda;
|
502
|
+
uint8_t *bi = b + i * ldb;
|
503
|
+
memset (bi, 0, ldb);
|
504
|
+
for(size_t i = 0; i < db; i++) {
|
505
|
+
int o = order[i];
|
506
|
+
uint8_t the_bit = (ai[o >> 3] >> (o & 7)) & 1;
|
507
|
+
bi[i >> 3] |= the_bit << (i & 7);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
|
511
|
+
}
|
490
512
|
|
491
513
|
|
492
514
|
|
@@ -530,6 +552,7 @@ void hammings_knn(
|
|
530
552
|
{
|
531
553
|
hammings_knn_hc(ha, a, b, nb, ncodes, order);
|
532
554
|
}
|
555
|
+
|
533
556
|
void hammings_knn_hc (
|
534
557
|
int_maxheap_array_t * ha,
|
535
558
|
const uint8_t * a,
|
@@ -613,7 +636,66 @@ void hammings_knn_mc(
|
|
613
636
|
}
|
614
637
|
}
|
615
638
|
}
|
639
|
+
template <class HammingComputer>
|
640
|
+
static
|
641
|
+
void hamming_range_search_template (
|
642
|
+
const uint8_t * a,
|
643
|
+
const uint8_t * b,
|
644
|
+
size_t na,
|
645
|
+
size_t nb,
|
646
|
+
int radius,
|
647
|
+
size_t code_size,
|
648
|
+
RangeSearchResult *res)
|
649
|
+
{
|
616
650
|
|
651
|
+
#pragma omp parallel
|
652
|
+
{
|
653
|
+
RangeSearchPartialResult pres (res);
|
654
|
+
|
655
|
+
#pragma omp for
|
656
|
+
for (size_t i = 0; i < na; i++) {
|
657
|
+
HammingComputer hc (a + i * code_size, code_size);
|
658
|
+
const uint8_t * yi = b;
|
659
|
+
RangeQueryResult & qres = pres.new_result (i);
|
660
|
+
|
661
|
+
for (size_t j = 0; j < nb; j++) {
|
662
|
+
int dis = hc.hamming (yi);
|
663
|
+
if (dis < radius) {
|
664
|
+
qres.add(dis, j);
|
665
|
+
}
|
666
|
+
yi += code_size;
|
667
|
+
}
|
668
|
+
}
|
669
|
+
pres.finalize ();
|
670
|
+
}
|
671
|
+
}
|
672
|
+
|
673
|
+
void hamming_range_search (
|
674
|
+
const uint8_t * a,
|
675
|
+
const uint8_t * b,
|
676
|
+
size_t na,
|
677
|
+
size_t nb,
|
678
|
+
int radius,
|
679
|
+
size_t code_size,
|
680
|
+
RangeSearchResult *result)
|
681
|
+
{
|
682
|
+
|
683
|
+
#define HC(name) hamming_range_search_template<name> (a, b, na, nb, radius, code_size, result)
|
684
|
+
|
685
|
+
switch(code_size) {
|
686
|
+
case 4: HC(HammingComputer4); break;
|
687
|
+
case 8: HC(HammingComputer8); break;
|
688
|
+
case 16: HC(HammingComputer16); break;
|
689
|
+
case 32: HC(HammingComputer32); break;
|
690
|
+
default:
|
691
|
+
if (code_size % 8 == 0) {
|
692
|
+
HC(HammingComputerM8);
|
693
|
+
} else {
|
694
|
+
HC(HammingComputerDefault);
|
695
|
+
}
|
696
|
+
}
|
697
|
+
#undef HC
|
698
|
+
}
|
617
699
|
|
618
700
|
|
619
701
|
|
@@ -39,6 +39,7 @@ namespace faiss {
|
|
39
39
|
* General bit vector functions
|
40
40
|
**************************************************/
|
41
41
|
|
42
|
+
struct RangeSearchResult;
|
42
43
|
|
43
44
|
void bitvec_print (const uint8_t * b, size_t d);
|
44
45
|
|
@@ -65,6 +66,14 @@ void bitvecs2fvecs (
|
|
65
66
|
|
66
67
|
void fvec2bitvec (const float * x, uint8_t * b, size_t d);
|
67
68
|
|
69
|
+
/** Shuffle the bits from b(i, j) := a(i, order[j])
|
70
|
+
*/
|
71
|
+
void bitvec_shuffle (size_t n, size_t da, size_t db,
|
72
|
+
const int *order,
|
73
|
+
const uint8_t *a,
|
74
|
+
uint8_t *b);
|
75
|
+
|
76
|
+
|
68
77
|
/***********************************************
|
69
78
|
* Generic reader/writer for bit strings
|
70
79
|
***********************************************/
|
@@ -171,6 +180,17 @@ void hammings_knn_mc (
|
|
171
180
|
int32_t *distances,
|
172
181
|
int64_t *labels);
|
173
182
|
|
183
|
+
/** same as hammings_knn except we are doing a range search with radius */
|
184
|
+
void hamming_range_search (
|
185
|
+
const uint8_t * a,
|
186
|
+
const uint8_t * b,
|
187
|
+
size_t na,
|
188
|
+
size_t nb,
|
189
|
+
int radius,
|
190
|
+
size_t ncodes,
|
191
|
+
RangeSearchResult *result);
|
192
|
+
|
193
|
+
|
174
194
|
/* Counting the number of matches or of cross-matches (without returning them)
|
175
195
|
For use with function that assume pre-allocated memory */
|
176
196
|
void hamming_count_thres (
|
@@ -214,102 +214,6 @@ void matrix_qr (int m, int n, float *a)
|
|
214
214
|
}
|
215
215
|
|
216
216
|
|
217
|
-
/***************************************************************************
|
218
|
-
* Kmeans subroutine
|
219
|
-
***************************************************************************/
|
220
|
-
|
221
|
-
// a bit above machine epsilon for float16
|
222
|
-
|
223
|
-
#define EPS (1 / 1024.)
|
224
|
-
|
225
|
-
/* For k-means, compute centroids given assignment of vectors to centroids */
|
226
|
-
int km_update_centroids (const float * x,
|
227
|
-
float * centroids,
|
228
|
-
int64_t * assign,
|
229
|
-
size_t d, size_t k, size_t n,
|
230
|
-
size_t k_frozen)
|
231
|
-
{
|
232
|
-
k -= k_frozen;
|
233
|
-
centroids += k_frozen * d;
|
234
|
-
|
235
|
-
std::vector<size_t> hassign(k);
|
236
|
-
memset (centroids, 0, sizeof(*centroids) * d * k);
|
237
|
-
|
238
|
-
#pragma omp parallel
|
239
|
-
{
|
240
|
-
int nt = omp_get_num_threads();
|
241
|
-
int rank = omp_get_thread_num();
|
242
|
-
// this thread is taking care of centroids c0:c1
|
243
|
-
size_t c0 = (k * rank) / nt;
|
244
|
-
size_t c1 = (k * (rank + 1)) / nt;
|
245
|
-
const float *xi = x;
|
246
|
-
size_t nacc = 0;
|
247
|
-
|
248
|
-
for (size_t i = 0; i < n; i++) {
|
249
|
-
int64_t ci = assign[i];
|
250
|
-
assert (ci >= 0 && ci < k + k_frozen);
|
251
|
-
ci -= k_frozen;
|
252
|
-
if (ci >= c0 && ci < c1) {
|
253
|
-
float * c = centroids + ci * d;
|
254
|
-
hassign[ci]++;
|
255
|
-
for (size_t j = 0; j < d; j++)
|
256
|
-
c[j] += xi[j];
|
257
|
-
nacc++;
|
258
|
-
}
|
259
|
-
xi += d;
|
260
|
-
}
|
261
|
-
|
262
|
-
}
|
263
|
-
|
264
|
-
#pragma omp parallel for
|
265
|
-
for (size_t ci = 0; ci < k; ci++) {
|
266
|
-
float * c = centroids + ci * d;
|
267
|
-
float ni = (float) hassign[ci];
|
268
|
-
if (ni != 0) {
|
269
|
-
for (size_t j = 0; j < d; j++)
|
270
|
-
c[j] /= ni;
|
271
|
-
}
|
272
|
-
}
|
273
|
-
|
274
|
-
/* Take care of void clusters */
|
275
|
-
size_t nsplit = 0;
|
276
|
-
RandomGenerator rng (1234);
|
277
|
-
for (size_t ci = 0; ci < k; ci++) {
|
278
|
-
if (hassign[ci] == 0) { /* need to redefine a centroid */
|
279
|
-
size_t cj;
|
280
|
-
for (cj = 0; 1; cj = (cj + 1) % k) {
|
281
|
-
/* probability to pick this cluster for split */
|
282
|
-
float p = (hassign[cj] - 1.0) / (float) (n - k);
|
283
|
-
float r = rng.rand_float ();
|
284
|
-
if (r < p) {
|
285
|
-
break; /* found our cluster to be split */
|
286
|
-
}
|
287
|
-
}
|
288
|
-
memcpy (centroids+ci*d, centroids+cj*d, sizeof(*centroids) * d);
|
289
|
-
|
290
|
-
/* small symmetric pertubation. Much better than */
|
291
|
-
for (size_t j = 0; j < d; j++) {
|
292
|
-
if (j % 2 == 0) {
|
293
|
-
centroids[ci * d + j] *= 1 + EPS;
|
294
|
-
centroids[cj * d + j] *= 1 - EPS;
|
295
|
-
} else {
|
296
|
-
centroids[ci * d + j] *= 1 - EPS;
|
297
|
-
centroids[cj * d + j] *= 1 + EPS;
|
298
|
-
}
|
299
|
-
}
|
300
|
-
|
301
|
-
/* assume even split of the cluster */
|
302
|
-
hassign[ci] = hassign[cj] / 2;
|
303
|
-
hassign[cj] -= hassign[ci];
|
304
|
-
nsplit++;
|
305
|
-
}
|
306
|
-
}
|
307
|
-
|
308
|
-
return nsplit;
|
309
|
-
}
|
310
|
-
|
311
|
-
#undef EPS
|
312
|
-
|
313
217
|
|
314
218
|
|
315
219
|
/***************************************************************************
|
data/vendor/faiss/utils/utils.h
CHANGED
@@ -65,21 +65,6 @@ int fvec_madd_and_argmin (size_t n, const float *a,
|
|
65
65
|
void reflection (const float * u, float * x, size_t n, size_t d, size_t nu);
|
66
66
|
|
67
67
|
|
68
|
-
/** For k-means: update stage.
|
69
|
-
*
|
70
|
-
* @param x training vectors, size n * d
|
71
|
-
* @param centroids centroid vectors, size k * d
|
72
|
-
* @param assign nearest centroid for each training vector, size n
|
73
|
-
* @param k_frozen do not update the k_frozen first centroids
|
74
|
-
* @return nb of spliting operations to fight empty clusters
|
75
|
-
*/
|
76
|
-
int km_update_centroids (
|
77
|
-
const float * x,
|
78
|
-
float * centroids,
|
79
|
-
int64_t * assign,
|
80
|
-
size_t d, size_t k, size_t n,
|
81
|
-
size_t k_frozen);
|
82
|
-
|
83
68
|
/** compute the Q of the QR decomposition for m > n
|
84
69
|
* @param a size n * m: input matrix and output Q
|
85
70
|
*/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faiss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -107,7 +107,6 @@ files:
|
|
107
107
|
- ext/faiss/ext.cpp
|
108
108
|
- ext/faiss/extconf.rb
|
109
109
|
- lib/faiss.rb
|
110
|
-
- lib/faiss/ext.bundle
|
111
110
|
- lib/faiss/index.rb
|
112
111
|
- lib/faiss/index_binary.rb
|
113
112
|
- lib/faiss/kmeans.rb
|
@@ -118,6 +117,8 @@ files:
|
|
118
117
|
- vendor/faiss/AutoTune.h
|
119
118
|
- vendor/faiss/Clustering.cpp
|
120
119
|
- vendor/faiss/Clustering.h
|
120
|
+
- vendor/faiss/DirectMap.cpp
|
121
|
+
- vendor/faiss/DirectMap.h
|
121
122
|
- vendor/faiss/IVFlib.cpp
|
122
123
|
- vendor/faiss/IVFlib.h
|
123
124
|
- vendor/faiss/Index.cpp
|
@@ -132,6 +133,8 @@ files:
|
|
132
133
|
- vendor/faiss/IndexBinaryFromFloat.h
|
133
134
|
- vendor/faiss/IndexBinaryHNSW.cpp
|
134
135
|
- vendor/faiss/IndexBinaryHNSW.h
|
136
|
+
- vendor/faiss/IndexBinaryHash.cpp
|
137
|
+
- vendor/faiss/IndexBinaryHash.h
|
135
138
|
- vendor/faiss/IndexBinaryIVF.cpp
|
136
139
|
- vendor/faiss/IndexBinaryIVF.h
|
137
140
|
- vendor/faiss/IndexFlat.cpp
|
@@ -169,6 +172,7 @@ files:
|
|
169
172
|
- vendor/faiss/MatrixStats.h
|
170
173
|
- vendor/faiss/MetaIndexes.cpp
|
171
174
|
- vendor/faiss/MetaIndexes.h
|
175
|
+
- vendor/faiss/MetricType.h
|
172
176
|
- vendor/faiss/OnDiskInvertedLists.cpp
|
173
177
|
- vendor/faiss/OnDiskInvertedLists.h
|
174
178
|
- vendor/faiss/VectorTransform.cpp
|
@@ -185,6 +189,8 @@ files:
|
|
185
189
|
- vendor/faiss/c_api/IndexIVF_c.h
|
186
190
|
- vendor/faiss/c_api/IndexLSH_c.cpp
|
187
191
|
- vendor/faiss/c_api/IndexLSH_c.h
|
192
|
+
- vendor/faiss/c_api/IndexPreTransform_c.cpp
|
193
|
+
- vendor/faiss/c_api/IndexPreTransform_c.h
|
188
194
|
- vendor/faiss/c_api/IndexShards_c.cpp
|
189
195
|
- vendor/faiss/c_api/IndexShards_c.h
|
190
196
|
- vendor/faiss/c_api/Index_c.cpp
|
@@ -222,6 +228,7 @@ files:
|
|
222
228
|
- vendor/faiss/demos/demo_imi_pq.cpp
|
223
229
|
- vendor/faiss/demos/demo_ivfpq_indexing.cpp
|
224
230
|
- vendor/faiss/demos/demo_sift1M.cpp
|
231
|
+
- vendor/faiss/demos/demo_weighted_kmeans.cpp
|
225
232
|
- vendor/faiss/gpu/GpuAutoTune.cpp
|
226
233
|
- vendor/faiss/gpu/GpuAutoTune.h
|
227
234
|
- vendor/faiss/gpu/GpuCloner.cpp
|
@@ -276,6 +283,7 @@ files:
|
|
276
283
|
- vendor/faiss/impl/HNSW.h
|
277
284
|
- vendor/faiss/impl/PolysemousTraining.cpp
|
278
285
|
- vendor/faiss/impl/PolysemousTraining.h
|
286
|
+
- vendor/faiss/impl/ProductQuantizer-inl.h
|
279
287
|
- vendor/faiss/impl/ProductQuantizer.cpp
|
280
288
|
- vendor/faiss/impl/ProductQuantizer.h
|
281
289
|
- vendor/faiss/impl/ScalarQuantizer.cpp
|