Preset and option reference for the ./xfaiss.sh bench command.
./xfaiss.sh bench <preset> [options...]
Presets
IVF-Flat
Preset
Description
flat-sift1m
IVF-Flat on SIFT-1M
flat-gist1m
IVF-Flat on GIST-1M
flat-sift100m
IVF-Flat on SIFT-100M
flat-deep100m
IVF-Flat on Deep-100M
flat-7m-d1024-l2-query-fixed
IVF-Flat on 7M-d1024 (L2, Query-Fixed)
flat-7m-d1024-l2-cluster-fixed
IVF-Flat on 7M-d1024 (L2, Cluster-Fixed) [experimental]
flat-7m-d1024-ip-query-fixed
IVF-Flat on 7M-d1024 (IP, Query-Fixed)
flat-7m-d1024-ip-cluster-fixed
IVF-Flat on 7M-d1024 (IP, Cluster-Fixed) [experimental]
flat-fullscan-sift1m
IVF-Flat full scan (nprobe=nlist) on SIFT-1M
flat-fullscan-gist1m
IVF-Flat full scan (nprobe=nlist) on GIST-1M
IVF-RaBitQ
Preset
Description
rabitq-sift1m
IVF-RaBitQ on SIFT-1M
rabitq-gist1m
IVF-RaBitQ on GIST-1M
rabitq-sift100m
IVF-RaBitQ on SIFT-100M
rabitq-deep100m
IVF-RaBitQ on Deep-100M
KNN Exact
Preset
Description
knn-exact-sift1m
KNN Exact (MuIndexFlat) on SIFT-1M
knn-exact-gist1m
KNN Exact (MuIndexFlat) on GIST-1M
Options
Data
Option
Argument
Description
Default
--data-dir
DIR
Root data directory
/var/opt/xvector-data
--index
PATH
Index path override (IVF presets)
preset default
--base
PATH
Base vectors path override (KNN Exact presets)
preset default
--query
PATH
Query path override
preset default
--groundtruth-path
PATH
Ground-truth path override
preset default
Search
Option
Argument
Description
Default
--nprobe
N
Number of probes (IVF only)
128
--topk
N
Top-k results
100
--skip-cpu
(flag)
Skip CPU benchmark
off
--max-queries
N
Query count limit
all
--random-queries
N
Random query count
preset default
--search-iterations-on-mu
N
Repeat MU search N times
1
--search-iterations-on-cpu
N
Repeat CPU search N times
1
Search — IVF-Flat
Option
Argument
Description
Default
--flat-parallel-mode
M
MU parallel mode
preset default
--flat-parallel-mode values:
1 — QUERY_FIXED
2 — CLUSTER_LIST_FIXED — moves the query loop to inner to reduce the amount of memory transfer
Search — IVF-RaBitQ
Option
Argument
Description
Default
--rabitq-centered
(flag)
Centered quantization
on
--rabitq-qb
VALUES
qb values (e.g. 0,4,8 or 2-5)
0-8 (full sweep)
qb is the number of bits used to quantize the query vector. 0 disables query quantization (uses the original float query); higher values quantize the query into more bitplanes, improving recall at the cost of additional computation.
Search — KNN Exact
Option
Argument
Description
Default
--metric
M
Distance metric (L2 or IP)
L2
Device
Option
Argument
Description
Default
--deviceid
ID
Device ID
0
--numsub
N
Number of sub systems
24
--taskcount
N
Task count
preset default
--locality-mode
M
Locality mode: 0 = COMPACT, 1 = SPREAD
1 (SPREAD)
--locality-mode controls how the runtime schedules tasks across sub systems:
0: COMPACT — cluster-first allocation (intra-sub). Packs tasks onto fewer clusters within a sub before moving to the next.
1: SPREAD — sub-first allocation (inter-sub). Distributes tasks across all subs before filling any single sub.