Rust module: cuvs::ivf_pq::index_params
Source: rust/cuvs/src/ivf_pq/index_params.rs
Source: rust/cuvs/src/ivf_pq/index_params.rs:11
Source: rust/cuvs/src/ivf_pq/index_params.rs:12
Methods
Returns a new IndexParams
Source: rust/cuvs/src/ivf_pq/index_params.rs:18
The number of clusters used in the coarse quantizer.
Source: rust/cuvs/src/ivf_pq/index_params.rs:27
DistanceType to use for building the index
Source: rust/cuvs/src/ivf_pq/index_params.rs:35
The number of iterations searching for kmeans centers during index building.
Source: rust/cuvs/src/ivf_pq/index_params.rs:43
The number of iterations searching for kmeans centers during index building.
Source: rust/cuvs/src/ivf_pq/index_params.rs:51
If kmeans_trainset_fraction is less than 1, then the dataset is subsampled, and only n_samples * kmeans_trainset_fraction rows are used for training.
Source: rust/cuvs/src/ivf_pq/index_params.rs:61
The bit length of the vector element after quantization.
Source: rust/cuvs/src/ivf_pq/index_params.rs:69
The dimensionality of a the vector after product quantization. When zero, an optimal value is selected using a heuristic. Note pq_dim * pq_bits must be a multiple of 8. Hint: a smaller ‘pq_dim’ results in a smaller index size and better search performance, but lower recall. If ‘pq_bits’ is 8, ‘pq_dim’ can be set to any number, but multiple of 8 are desirable for good performance. If ‘pq_bits’ is not 8, ‘pq_dim’ should be a multiple of 8. For good performance, it is desirable that ‘pq_dim’ is a multiple of 32. Ideally, ‘pq_dim’ should be also a divisor of the dataset dim.
Source: rust/cuvs/src/ivf_pq/index_params.rs:85
Source: rust/cuvs/src/ivf_pq/index_params.rs:92
Memory layout of the IVF-PQ list data.
Source: rust/cuvs/src/ivf_pq/index_params.rs:103
Apply a random rotation matrix on the input data and queries even
if dim % pq_dim == 0. Note: if dim is not multiple of pq_dim,
a random rotation is always applied to the input data and queries
to transform the working space from dim to rot_dim, which may
be slightly larger than the original space and and is a multiple
of pq_dim (rot_dim % pq_dim == 0). However, this transform is
not necessary when dim is multiple of pq_dim (dim == rot_dim,
hence no need in adding “extra” data columns / features). By
default, if dim == rot_dim, the rotation transform is
initialized with the identity matrix. When
force_random_rotation == True, a random orthogonal transform
Source: rust/cuvs/src/ivf_pq/index_params.rs:121
The max number of data points to use per PQ code during PQ codebook training. Using more data
points per PQ code may increase the quality of PQ codebook but may also increase the build
time. The parameter is applied to both PQ codebook generation methods, i.e., PER_SUBSPACE and
PER_CLUSTER. In both cases, we will use pq_book_size * max_train_points_per_pq_code training
points to train each codebook.
Source: rust/cuvs/src/ivf_pq/index_params.rs:133
After training the coarse and fine quantizers, we will populate the index with the dataset if add_data_on_build == true, otherwise the index is left empty, and the extend method can be used to add new vectors to the index.
Source: rust/cuvs/src/ivf_pq/index_params.rs:144
Source: rust/cuvs/src/ivf_pq/index_params.rs:14