AcceleratedHNSWParams
Java package: com.nvidia.cuvs.lucene
Public Members
getWriterThreads
Get the cuVS writer threads parameter
Returns
cuVS writer threads parameter
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:147
getIntermediateGraphDegree
Get the intermediate graph degree
Returns
the graph degree parameter
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:156
getGraphdegree
Get the graph degree
Returns
the graph degree parameter
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:165
getHnswLayers
Get the number of HNSW layers
Returns
the number of HNSW layers
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:174
getMaxConn
Get the max connection parameter
Returns
the max connection parameter
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:183
getBeamWidth
Get the beam width parameter
Returns
the beam width parameter
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:192
getCagraGraphBuildAlgo
Get the CAGRA graph build algorithm
Returns
the CAGRA graph build algorithm
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:201
getCuVSIvfPqParams
Get the instance of CuVSIvfPqParams
Returns
the instance of CuVSIvfPqParams
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:210
getNumMergeWorkers
Get the number of merge workers set to be used in the fallback mechanism
Returns
the number of merge workers
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:219
getMergeExec
Get the instance of the ExecutorService to be used in the fallback mechanism
Returns
the instance of the ExecutorService
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:228
getStrategy
Get the chosen strategy:
When HEURISTIC [Default] is chosen, the CAGRA build algorithm and its indexing parameters are automatically chosen based on the size of the data set When CUSTOM is chosen, the build algorithm and its parameters (either defaults or overridden values with the use of With* methods) is used internally
Returns
get the chosen Strategy
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:240
getCuvsDistanceType
Get the cuvs distance type
Returns
the distance type
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:249
getNNDescentNumIterations
get the number of Iterations to run if building with NN_DESCENT
Returns
the number of iterations for NN_DESCENT
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:258
getHnswHeuristicType
Get the heuristic cuVS applies when deriving the CAGRA build parameters from maxConn and
beamWidth. Only consulted under the Strategy#HEURISTIC strategy.
Returns
the HnswHeuristicType to hand to cuVS
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:268
withWriterThreads
Set the number of cuVS writer threads while building the index
Valid range - Minimum: MIN_WRITER_THREADS, Maximum: MAX_WRITER_THREADS
Default value - DEFAULT_WRITER_THREADS
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:333
withIntermediateGraphDegree
Set the intermediate graph degree to use while building CAGRA index
Valid range - Minimum: MIN_INT_GRAPH_DEG, Maximum: MAX_INT_GRAPH_DEG
Default value - DEFAULT_INT_GRAPH_DEGREE
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:346
withGraphDegree
Set the graph degree to use while building CAGRA index
Valid range - Minimum: MIN_GRAPH_DEG, Maximum: MAX_GRAPH_DEG
Default value - DEFAULT_GRAPH_DEGREE
With the CUSTOM strategy, the degree cuVS builds (this value, lowered to the intermediate
graph degree if that is smaller) must be at most 2 * maxConn: the graph is written as
an HNSW graph, which holds at most 2 * maxConn neighbors per node on level 0.
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:363
withHNSWLayer
Set the number of HNSW layers to construct while building the HNSW index
Valid range - Minimum: MIN_HNSW_LAYERS, Maximum: MAX_HNSW_LAYERS
Default value - DEFAULT_HNSW_LAYERS
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:376
withMaxConn
Set the HNSW max connections parameter (M)
Valid range - Minimum: MIN_MAX_CONN, Maximum: MAX_MAX_CONN
Default value - DEFAULT_MAX_CONN
The CPU fallback builds the graph with it, every segment records it as its M, and it
bounds the GPU-built graph: at most 2 * maxConn neighbors per node on level 0 (with
the CUSTOM strategy, the graph degree must not exceed that) and at most maxConn on
the upper layers.
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:394
withBeamWidth
Set the beam width parameter while building HNSW index with fallback mechanism
Valid range - Minimum: MIN_BEAM_WIDTH, Maximum: MAX_BEAM_WIDTH
Default value - DEFAULT_BEAM_WIDTH
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:407
withCagraGraphBuildAlgo
Set the CAGRA graph build algorithm to use Default value - NN_DESCENT
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:419
withCuVSIvfPqParams
Set the instance of CuVSIvfPqParams
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:430
withNumMergeWorkers
Set the number of merge workers to be used with the fallback mechanism
Default value - DEFAULT_NUM_MERGE_WORKERS
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:442
withMergeExecutorService
Set the merge executor service to be used in the fallback mechanism Default value an instance with one thread
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:454
withStrategy
Set the chosen strategy:
When HEURISTIC [Default] is chosen, the CAGRA build algorithm and its indexing parameters are automatically chosen based on the size of the data set When CUSTOM is chosen, the build algorithm and its parameters (either defaults or overridden values with the use of With* methods) is used internally
Valid options - HEURISTIC, CUSTOM Default value - HEURISTIC
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:471
withCuvsDistanceType
Set the CuvsDistanceType
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:482
withNNDescentNumIterations
Set the number of Iterations to run if building with NN_DESCENT
Valid range - Minimum: MIN_NN_DESCENT_NUM_ITERATIONS, Maximum: MAX_NN_DESCENT_NUM_ITERATIONS
Default value - DEFAULT_NN_DESCENT_NUM_ITERATIONS
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:496
withHnswHeuristicType
Set the heuristic cuVS applies when deriving the CAGRA build parameters from maxConn and
beamWidth. Only consulted under the Strategy#HEURISTIC strategy.
Default value - SAME_GRAPH_FOOTPRINT, which targets a CAGRA graph of the same on-disk size as the equivalent HNSW graph (graph degree = 2 * maxConn).
Parameters
Returns
instance of Builder
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:511
build
Create an instance of AcceleratedHNSWParams
Returns
instance of AcceleratedHNSWParams
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:584
Source: java/cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/AcceleratedHNSWParams.java:17