VSTAR

Currently, the VSTAR retrieving supports only the Atlas inference product, which involves the generation of the VSTAR service operator model file (vstar_generate_models.py). For details, see VSTAR.

The operator generation environment must be the same as the codebook generation environment. For details, see Overview.

Generating the VSTAR Service Operator Model File

Usage

python3 vstar_generate_models.py --dim <dim> --nlistL1 <nlist1> --subDimL1 <sub_dim1> --nProbeL1 <nprobe1> --nProbeL2 <nprobe2> --segmentNumL3 <segment> --pool <pool_size>

Parameter

<dim>: feature vector dimension. The default value is 256.

<nlist1>: number of level-1 cluster centroids. The default value is 1024.

<nprobe1>: number of level-1 candidate buckets for each computing on during retrieval. The default value is 72.

<nprobe2>: number of level-2 candidate buckets for each computing during retrieval. The default value is [64, 296].

<sub_dim1>: dimension size after level-1 dimension reduction during retrieval. The default value is 32.

<segment>: number of data segments to be searched for from nprobe2. The default value is [512, 1000, 1504].

<pool_size>: size of the process pool for multi-process scheduling of operators generated in batches. The default value is 16.

--help | -h: help information.

Description

After running this command, you can obtain a group of AI Core and AICPU operator model files used for VSTAR retrieval. You need to modify the parameters in the command.

Restrictions

  • dim ∈ {128, 256, 512, 1024}
  • nlist1 ∈ {256, 512, 1024}
  • sub_dim1 ∈ {32, 64, 128} The value of sub_dim1 must be less than that of dim.
  • nprobe1 ∈ (16, nlist1] nprobe1 is a list of the int type, and the value in the list must be an integer multiple of 8.
  • nprobe2 ∈ (16, nprobe1 * n] When dim is 1024, n is 16. For other dimensions, n is 32. nprobe2 is a list of the int type, and the value in the list must be an integer multiple of 8.
  • segment ∈ (100, 5000] segment is a list of the int type, and the value must be an integer multiple of 8.
  • pool_size ∈ [1, 32]. Before running the script, ensure that the maximum number of processes supported by the host is properly set.