Skip to content

Commit 6e99006

Browse files
committed
Fix up text for num_partitions / target_partition_size defaults
1 parent 313a1c6 commit 6e99006

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/indexing/vector-index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Learn how to configure, build, and search LanceDB vector indexes, including buil
115115
| Parameter | Description |
116116
| :--- | :--- |
117117
| `distance_type` | Default is `l2`, others available are `cosine` and `dot`.
118-
| `num_partitions` | The number of IVF partitions constructed (corresponds to the $k$ in $k$-means clustering). If unset, it is derived from `target_partition_size` (see below) rather than from `sqrt(num_rows)`. |
119-
| `target_partition_size` | An alternative IVF sizing knob that derives the partition count by setting the number of rows per partition: `num_partitions = clamp(num_rows / target_partition_size, 1, 4096)`. `num_partitions` takes precedence over `target_partition_size` if both are set. If neither is set, `target_partition_size` itself defaults per index type: `4096` for `IVF_FLAT` and `IVF_RQ`, `8192 = 2^13` for `IVF_PQ` and `IVF_SQ`, and `1,048,576 = 2^20` for the IVF-HNSW-family indexes. |
118+
| `num_partitions` | The number of IVF partitions constructed (corresponds to the $k$ in $k$-means clustering). This takes precedence over `target_partition_size` if both are set. |
119+
| `target_partition_size` | An alternative IVF sizing knob that derives the partition count by setting the number of rows per partition: `num_partitions = clamp(num_rows / target_partition_size, 1, 4096)`. `num_partitions` takes precedence over `target_partition_size` if both are set. If neither is set the number of partitions is automatically calculated based on the number of rows and the index type. |
120120
| `num_sub_vectors` | Applies to `IVF_PQ`; defaults to `dimension // 16` (or `dimension // 8` if not a multiple of 16). Larger values produce better recall and slower search. |
121121
| `max_iterations` | Maximum number of k-means training iterations, for every IVF/HNSW index type. Default `50`. Increase for larger datasets or to improve training quality. |
122122
| `sample_rate` | Number of k-means training samples per partition, for every IVF/HNSW index type. Default `256`. Higher values increase both accuracy and training time. |

0 commit comments

Comments
 (0)