For the main path, pass "ivfflat" or "ivfpq" directly to the
algo argument of cuda_ml_knn(); cuda.ml then lets the backend
choose the index parameters. Use these constructors only when those
parameters need to be set explicitly.
Value
A KNN algorithm specification to pass to the algo argument of
cuda_ml_knn().
Details
Both algorithms partition the training data into nlist cells and
search nprobe cells for each query. IVFFlat stores the original
vectors and therefore needs only those two parameters. IVFPQ also compresses
vectors using product quantization, so it additionally requires the number
of subquantizers (m) and the bits allocated to each subquantizer
(n_bits). The distinct constructors keep the required parameters for
each algorithm explicit.