IVFPQ

Usage

python3 ivfpq_generate_model.py -d <dim> -c <coarse centroid num> -s <sub quantizers num> -q <pq_centroids_num> -p <process_id> -pool <pool_size>

Parameter

<dim>: feature vector dimension (D).

<coarse centroid num>: number of L1 cluster centroids.

<sub quantizers num>: PQ segment number (M).

<pq_centroids_num>: number of PQ cluster centroids.

<process_id>: ID of the process for batch generating operator multi-process scheduling tasks.

<pool_size>: size of the process pool for multi-process scheduling of operators generated in batches.

Description

Run the command to obtain a group of operator model files. You need to modify the parameters in the command.

Restrictions

  • dim ∈ {64, 128, 256, 384, 512, 1024, 2048}
  • coarse centroid num ∈ {1024, 2048, 4096, 8192, 16384}
  • The value of pq_centroids_num must be a multiple of 16 and cannot exceed 256. The default value is recommended.
  • subQuantizers ∈ {8, 16, 32, 64, 128}, and dim/subQuantizers must be a multiple of 4, 8, or 16.
  • 0 ≤ pool_size ≤ 32