Skip to content

Commit

Permalink
v1.11: Binary quantization usage recommendation (#3027)
Browse files Browse the repository at this point in the history
  • Loading branch information
guimachiavelli authored Oct 17, 2024
1 parent 8fb4fd6 commit 16b2f60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions learn/indexing/indexing_best_practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,13 @@ If you have followed the previous tips in this guide and are still experiencing
Indexing is a memory-intensive and multi-threaded operation. The more memory and processor cores available, the faster Meilisearch will index new documents. When trying to improve indexing speed, using a machine with more processor cores is more effective than increasing RAM.

Due to how Meilisearch works, it is best to avoid HDDs (Hard Disk Drives) as they can easily become performance bottlenecks.

## Enable binary quantization when using AI-powered search

If you are experiencing performance issues when indexing documents for AI-powered search, consider enabling [binary quantization](/reference/api/settings#binaryquantized) for your embedders. Binary quantization compresses vectors by representing each dimension with 1-bit values. This reduces the relevancy of semantic search results, but greatly improves performance.

Binary quantization works best with large datasets containing more than 1M documents and using models with more than 1400 dimensions.

<Capsule intent="danger" title="Binary quantization is an irreversible process">
**Activating binary quantization is irreversible.** Once enabled, Meilisearch converts all vectors and discards all vector data that does fit within 1-bit. The only way to recover the vectors' original values is to re-vectorize the whole index in a new embedder.
</Capsule>
4 changes: 3 additions & 1 deletion reference/api/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,9 @@ This field is incompatible with all other embedders.

##### `binaryQuantized`

When set to `true`, compresses vectors by representing each of its dimensions with 1-bit values. This reduces relevancy of semantic search results, but greatly reduces database size.
When set to `true`, compresses vectors by representing each dimension with 1-bit values. This reduces the relevancy of semantic search results, but greatly reduces database size.

This option can be useful when working with large Meilisearch projects. Consider activating it if your project contains more than one million documents and uses models with more than 1400 dimensions.

<Capsule intent="danger" title="Binary quantization is an irreversible process">
**Activating `binaryQuantized` is irreversible.** Once enabled, Meilisearch converts all vectors and discards all vector data that does fit within 1-bit. The only way to recover the vectors' original values is to re-vectorize the whole index in a new embedder.
Expand Down

0 comments on commit 16b2f60

Please sign in to comment.