Skip to content

Commit

Permalink
Update SSD_index.md
Browse files Browse the repository at this point in the history
Added cosine as one of the supported distance metrics.
  • Loading branch information
gopalrs authored Jul 29, 2024
1 parent a2a0f69 commit f390fed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflows/SSD_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To generate an SSD-friendly index, use the `apps/build_disk_index` program.
The arguments are as follows:

1. **--data_type**: The type of dataset you wish to build an index on. float(32 bit), signed int8 and unsigned uint8 are supported.
2. **--dist_fn**: There are two distance functions supported: minimum Euclidean distance (l2) and maximum inner product (mips).
2. **--dist_fn**: Three distance functions are supported: cosine distance, minimum Euclidean distance (l2) and maximum inner product (mips).
3. **--data_file**: The input data over which to build an index, in .bin format. The first 4 bytes represent number of points as an integer. The next 4 bytes represent the dimension of data as an integer. The following `n*d*sizeof(T)` bytes contain the contents of the data one data point in time. `sizeof(T)` is 1 for byte indices, and 4 for float indices. This will be read by the program as int8_t for signed indices, uint8_t for unsigned indices or float for float indices.
4. **--index_path_prefix**: the index will span a few files, all beginning with the specified prefix path. For example, if you provide `~/index_test` as the prefix path, build generates files such as `~/index_test_pq_pivots.bin, ~/index_test_pq_compressed.bin, ~/index_test_disk.index, ...`. There may be between 8 and 10 files generated with this prefix depending on how the index is constructed.
5. **-R (--max_degree)** (default is 64): the degree of the graph index, typically between 60 and 150. Larger R will result in larger indices and longer indexing times, but better search quality.
Expand Down

0 comments on commit f390fed

Please sign in to comment.