This repository has been archived by the owner on Jun 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
algos.yaml
355 lines (355 loc) · 12.8 KB
/
algos.yaml
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
float:
any:
dolphinn:
constructor: FloatSubprocess
base-args: [["install/lib-dolphinn/fr-dolphinn"]]
run-groups:
base:
args: { "r" : [3, 4], "numpoints" : [10, 50, 100, 200, 1000, 2000, 10000, 20000, 40000, 100000]}
DolphinnPy:
constructor: DolphinnPy
run-groups:
base:
args: [[10, 50, 100, 200, 1000, 2000, 10000, 20000, 40000, 100000]]
faiss-lsh:
# @constructor specifies the name of the Python constructor for this
# algorithm's wrapper. Only the constructors explicitly specified in
# ann_benchmarks/algorithms/constructors.py are available.
constructor: FaissLSH
run-groups:
base:
# When @args is a list, the result is the Cartesian product of all of
# the things it contains; entries that aren't a list will be treated
# as lists of length one.
args: [[32, 64, 128, 256, 512, 1024, 2048, 4096]]
# This run group will produce eight algorithm instances:
# FaissLSH(32), FaissLSH(64), and so on up to FaissLSH(4096).
faiss-ivf:
constructor: FaissIVF
base-args: ["@metric"]
run-groups:
base:
args: [[5, 10, 20, 50, 100, 200, 400, 800, 1000],
[1, 2, 3, 4, 5, 8, 10, 20, 50, 100, 200]]
faiss-gpu:
constructor: FaissGPU
run-groups:
base:
args: [[32, 64, 128, 256, 512, 1024, 2048, 4096], [100, 200]]
# lshf:
# constructor: LSHF
# # The @base-args list specifies arguments that should always be prepended
# # to the constructor's argument list. (The special value "@metric", when
# # it occurs somewhere in that argument list, will be replaced with the
# # name of the distance metric; "@dimension" will be replaced with an
# # integer specifying the length of a data point.)
# base-args: ["@metric"]
# run-groups:
# five-estimators:
# args: [5, [10, 20]]
# # This run group will produce two algorithm instances:
# # LSHF("angular", 5, 10) and LSHF("angular", 5, 20).
# ten-estimators:
# args: [10, [20, 50]]
# # This run group will produce two more algorithm instances:
# # LSHF("angular", 10, 20) and LSHF("angular", 10, 50).
# twenty-estimators:
# args: [20, 100]
# # Finally, this run group will only produce one:
# # LSHF("angular", 20, 100).
flann:
constructor: FLANN
base-args: ["@metric"]
run-groups:
flann:
args: [[0.2, 0.5, 0.7, 0.8, 0.9, 0.95, 0.97, 0.98, 0.99, 0.995]]
# panns:
# constructor: PANNS
# base-args: ["@metric"]
# run-groups:
# five-trees:
# args: [5, 20]
# ten-trees:
# args: [10, [10, 50]]
# hundred-candidates:
# args: [[10, 20, 40], 100]
annoy:
constructor: Annoy
base-args: ["@metric"]
run-groups:
annoy:
args: [[100, 200, 400], [100, 200, 400, 1000, 2000, 4000, 10000,
20000, 40000, 100000, 200000, 400000]]
# This run group produces (3 * 12 =) 36 algorithm instances:
# Annoy("angular", 100, 100), Annoy("angular", 100, 200), and so on
# up to Annoy("angular", 400, 400000).
nearpy:
constructor: NearPy
base-args: ["@metric"]
run-groups:
nearpy:
args: [[10, 12, 14, 16], [5, 10, 20, 40]]
extra:
args: [16, [5, 10, 15, 20, 25, 30, 40]]
bruteforce:
constructor: BruteForce
base-args: ["@metric"]
run-groups:
empty:
args: []
bruteforce-blas:
constructor: BruteForceBLAS
base-args: ["@metric"]
run-groups:
empty:
args: []
ball:
constructor: BallTree
base-args: ["@metric"]
run-groups:
ball:
args: &treeargs [[10, 20, 40, 100, 200, 400, 1000]]
kd:
constructor: KDTree
base-args: ["@metric"]
run-groups:
ball:
args: *treeargs
bruteforce0(nmslib):
constructor: NmslibNewIndex
base-args: ["@metric"]
run-groups:
base:
args: ["seq_search", {"copyMem": 0}]
BallTree(nmslib):
constructor: NmslibNewIndex
base-args: ["@metric", "vptree"]
run-groups:
base:
# When @args is a dictionary, algorithm instances will be generated
# by taking the Cartesian product of all of its values.
args: {"tuneK": 10, "desiredRecall": [0.99, 0.97, 0.95, 0.9, 0.85, 0.8,
0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]}
# This run group produces thirteen algorithm instances:
# NmslibNewIndex("angular", "vptree", {"tuneK": 10,
# "desiredRecall": 0.99}), NmslibNewIndex("angular", "vptree",
# {"tuneK": 10, "desiredRecall": 0.97}), and so on up to
# NmslibNewIndex("angular", "vptree", {"tuneK": 10, "desiredRecall":
# 0.1}).
euclidean:
kgraph:
constructor: KGraph
base-args: ["@metric"]
run-groups:
kgraph:
args: [[1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
{'reverse': -1}, True] # XXX: hard-codes save_index as True
hnsw(nmslib):
constructor: NmslibReuseIndex
base-args: ["@metric", "hnsw"]
run-groups:
M-32:
# If a run group has an array called @arg-groups instead of one
# called @args, then every element in that array will be separately
# expanded before then taking the Cartesian product of all of those
# expansions.
#
# Yes, this is a bit of a hack, but some constructors are weird.
# (This one used to require that dictionaries be encoded as lists
# of environment variable-style strings -- ["M=32", "post=2",
# "efConstruction=400"] -- which didn't work with this at all...)
arg-groups:
- {"M": 32, "post": 2, "efConstruction": 400}
- True # XXX: hard-codes save_index as True
- {"ef": [20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160, 200,
300, 400]}
M-20:
arg-groups:
- {"M": 20, "post": 2, "efConstruction": 400}
- True
- {"ef": [2, 5, 10, 15, 20, 30, 40, 50, 70, 80, 120, 200, 400]}
M-12:
arg-groups:
- {"M": 12, "post": 0, "efConstruction": 400}
- True
- {"ef": [1, 2, 5, 10, 15, 20, 30, 40, 50, 70, 80, 120]}
M-4:
arg-groups:
- {"M": 4, "post": 0, "efConstruction": 400}
- True
- {"ef": [1, 2, 5, 10, 20, 30, 50, 70, 90, 120]}
M-8:
arg-groups:
- {"M": 8, "post": 0, "efConstruction": 400}
- True
- {"ef": [1, 2, 5, 10, 20, 30, 50, 70, 90, 120, 160]}
MP-lsh(lshkit):
constructor: NmslibNewIndex
base-args: ["@metric", "lsh_multiprobe"]
run-groups:
base:
args: {"desiredRecall": [0.99, 0.97, 0.95, 0.9, 0.85, 0.8, 0.7, 0.6, 0.5,
0.4, 0.3, 0.2, 0.1], "H": 1200001, "T": 10, "L": 50, "tuneK": 10}
SW-graph(nmslib):
constructor: NmslibReuseIndex
base-args: ["@metric", "sw-graph"]
run-groups:
NN-10:
arg-groups:
- {"NN": 10, "efConstruction": 400, "initIndexAttempts": 1}
- True
- {"efSearch": [800, 400, 200, 100, 50, 30, 20, 15, 10],
"initSearchAttempts": 1}
NN-5:
arg-groups:
- {"NN": 5, "efConstruction": 400, "initIndexAttempts": 1}
- True
- {"efSearch": [30, 25, 20, 15, 10, 5, 4, 3, 2, 1],
"initSearchAttempts": 1}
angular:
kgraph:
constructor: KGraph
base-args: ["@metric"]
run-groups:
kgraph:
args: [[1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
{'reverse': -1, "K": 200, "L": 300, "S": 20}, False]
hnsw(nmslib):
constructor: NmslibReuseIndex
base-args: ["@metric", "hnsw"]
run-groups:
M-48:
arg-groups:
- {"M": 48, "post": 2, "efConstruction": 800}
- True # XXX: hard-codes save_index as True
- {"ef": [50, 70, 90, 120, 160, 200, 400, 600, 700, 800, 1000,
1400, 1600, 2000]}
M-32:
arg-groups:
- {"M": 32, "post": 2, "efConstruction": 800}
- True
- {"ef": [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160,
200, 300, 400, 600, 700, 800, 1000, 1200, 1400, 1600, 2000]}
M-20:
arg-groups:
- {"M": 20, "post": 0, "efConstruction": 800}
- True
- {"ef": [2, 5, 10, 15, 20, 30, 40, 50, 70, 80]}
M-12:
arg-groups:
- {"M": 12, "post": 0, "efConstruction": 800}
- True
- {"ef": [1, 2, 5, 10, 15, 20, 30, 40, 50, 70, 80]}
SW-graph(nmslib):
constructor: NmslibReuseIndex
base-args: ["@metric", "sw-graph"]
run-groups:
NN-30:
arg-groups:
- {"NN": 30, "efConstruction": 800, "initIndexAttempts": 1}
- True
- {"efSearch": [700, 650, 550, 450, 350, 275, 200, 150, 120, 80,
50, 30], "initSearchAttempts": 1}
NN-15:
arg-groups:
- {"NN": 15, "efConstruction": 800, "initIndexAttempts": 1}
- True
- {"efSearch": [80, 50, 30, 20], "initSearchAttempts": 1}
NN-3:
arg-groups:
- {"NN": 3, "efConstruction": 800, "initIndexAttempts": 1}
- True
- {"efSearch": [120, 80, 60, 40, 20, 10, 8, 4, 2],
"initSearchAttempts": 1}
rpforest:
constructor: RPForest
run-groups:
base:
args: [[3, 5, 10, 20, 40, 100, 200, 400],
[3, 5, 10, 20, 40, 100, 200, 400]]
falconn:
constructor: FALCONN
base-args: ["@metric", 16]
run-groups:
base:
L: &l [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 21, 24, 27,
30, 33, 37, 41, 46, 51, 57, 63, 70, 77, 85, 94, 104, 115, 127,
140, 154, 170, 188, 207, 228, 251, 277, 305, 336, 370, 408, 449,
494, 544, 599, 659, 725, 798, 878, 966, 1063, 1170, 1287, 1416]
args: [*l]
bit:
hamming:
mih:
constructor: BitSubprocessPrepared
base-args: [["install/lib-mih/build/mihwrapper"]]
run-groups:
base:
# Not that MIH assumes that 5 <= bitlength/chunks <= 37 and segfaults otherwise.
# The r parameter denotes a reordering with n / r steps. If r is 0, no reordering
# takes places. Note that MIH requires either r = 0 or r >= 2.
args: { "r" : [0, 2], "chunks" : [14] }
annoy-hamming:
constructor: BitSubprocessPrepared
base-args: [["install/lib-annoy-hamming/fr-annoy-hamming"]]
run-groups:
base:
args: {"num_trees" : [1, 2, 5, 10, 20, 50, 100], "search_k" : [50, 100, 200, 400, 2000, 4000, 10000] }
bitsampling:
constructor: BitSubprocessPrepared
base-args: [["install/lib-bitsampling/build/wrapper/bitsampling-wrapper"]]
run-groups:
base:
args: {"d" : 256, "l" : [1,5,10,20,50], "k" : [17, 19, 25, 31], "m" : [0]}
falconn:
constructor: FALCONN
base-args: ["@metric", 16]
run-groups:
base:
args: [*l]
kgraph:
constructor: KGraph
base-args: ["@metric"]
run-groups:
kgraph:
args: [[1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
{'reverse': -1, "K": 200, "L": 300, "S": 20}, False]
hnsw(nmslib):
constructor: NmslibReuseIndex
base-args: ["@metric", "hnsw"]
run-groups:
M-48:
arg-groups:
- {"M": 48, "post": 2, "efConstruction": 800}
- True # XXX: hard-codes save_index as True
- {"ef": [50, 70, 90, 120, 160, 200, 400, 600, 700, 800, 1000,
1400, 1600, 2000]}
M-32:
arg-groups:
- {"M": 32, "post": 2, "efConstruction": 800}
- True
- {"ef": [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160,
200, 300, 400, 600, 700, 800, 1000, 1200, 1400, 1600, 2000]}
M-20:
arg-groups:
- {"M": 20, "post": 0, "efConstruction": 800}
- True
- {"ef": [2, 5, 10, 15, 20, 30, 40, 50, 70, 80]}
M-12:
arg-groups:
- {"M": 12, "post": 0, "efConstruction": 800}
- True
- {"ef": [1, 2, 5, 10, 15, 20, 30, 40, 50, 70, 80]}
int:
jaccard:
bf:
constructor: BruteForceBLAS
base-args: ["@metric"]
run-groups:
base:
args: {}
datasketch:
constructor: DataSketch
base-args: ["@metric"]
run-groups:
base:
args: [[16, 32, 64, 128],[5, 10, 20, 40]]