Skip to content

Commit 5a92938

Browse files
minor fixes svs-compression.md
1 parent 4c13384 commit 5a92938

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

content/develop/ai/search-and-query/vectors/svs-compression.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ categories:
99
- oss
1010
- kubernetes
1111
- clients
12-
description: Vector compression and quantization for efficient memory usage and search performance
13-
linkTitle: Vector Compression & Quantization
14-
title: Vector Compression and Quantization Techniques
12+
description: Intel scalable vector search (SVS) LVQ and LeanVec compression
13+
linkTitle: Intel SVS compression
14+
title: Intel scalable vector search (SVS) compression
1515
weight: 2
1616
---
1717

18-
Efficient management of high-dimensional vector data is crucial for scalable search and retrieval. Advanced methods for vector compression and quantization—such as LVQ (Locally-Adaptive Vector Quantization) and LeanVec—can dramatically optimize memory usage and improve search speed, without sacrificing too much accuracy. This page describes practical approaches to compressing and quantizing vectors for scalable search.
18+
Intel's SVS (Scalable Vector Search) introduces two advanced vector compression techniques—LVQ and LeanVec—designed to optimize memory usage and search performance. These methods compress high-dimensional vectors while preserving the geometric relationships essential for accurate similarity search.
1919

2020
{{< warning >}}
21-
Some advanced vector compression features may depend on hardware or Intel's proprietary optimizations. On platforms without these capabilities, generic compression methods will be used, possibly with reduced performance.
21+
Intel's proprietary LVQ and LeanVec optimizations are not available on Redis Open Source. On non-Intel platforms and Redis Open Source platforms, `SVS-VAMANA` with `COMPRESSION` will fall back to Intel’s basic, 8-bit scalar quantization implementation: all values in a vector are scaled using the global minimum and maximum, and then each dimension is quantized independently into 256 levels using 8-bit precision.
2222
{{< /warning >}}
2323

2424
## Compression and Quantization Techniques
@@ -57,42 +57,46 @@ Some advanced vector compression features may depend on hardware or Intel's prop
5757
| LeanVec8x8 | Improved recall when LeanVec4x8 is insufficient | LeanVec dimensionality reduction might reduce recall |
5858
| LVQ4x8 | Improved recall when LVQ4x4 is insufficient | Slightly worse memory savings |
5959

60-
## Two-Level Compression
60+
## Two-level compression
6161

62-
Both LVQ and LeanVec support multi-level compression schemes. The first level compresses each vector to capture its main structure, while the second encodes residual errors for more precise re-ranking.
62+
Both LVQ and LeanVec support two-level compression schemes. LVQ's two-level compression works by first quantizing each vector individually to capture its main structure, then encoding the residual error&mdash;the difference between the original and quantized vector&mdash;using a second quantization step. This allows fast search using only the first level, with the second level used for re-ranking to boost accuracy when needed.
6363

64-
This two-level approach enables:
64+
Similarly, LeanVec uses a two-level approach: the first level reduces dimensionality and applies LVQ to speed up candidate retrieval, while the second level applies LVQ to the original high-dimensional vectors for accurate re-ranking.
65+
66+
Note that the original full-precision embeddings are never used by either LVQ or LeanVec, as both operate entirely on compressed representations.
67+
68+
This two-level approach allows for:
6569

6670
* Fast candidate retrieval using the first-level compressed vectors.
67-
* High-accuracy re-ranking using second-level residuals.
71+
* High-accuracy re-ranking using the second-level residuals.
6872

69-
The naming convention reflects the number of bits per dimension at each compression level.
73+
The naming convention used for the configurations reflects the number of bits allocated per dimension at each level of compression.
7074

71-
### Naming convention: LVQ<B₁>x<B₂> or LeanVec<B₁>x<B₂>
75+
### Naming convention: LVQ<B₁>x<B₂>
7276

73-
* **B₁:** Bits per dimension for first-level quantization.
74-
* **B₂:** Bits per dimension for second-level quantization (residual encoding).
77+
* **B₁:** Number of bits per dimension used in the first-level quantization.
78+
* **B₂:** Number of bits per dimension used in the second-level quantization (residual encoding).
7579

7680
#### Examples
7781

7882
* **LVQ4x8:**
7983
* First level: 4 bits per dimension.
8084
* Second level: 8 bits per dimension.
81-
* Total: 12 bits per dimension (across two stages).
85+
* Total: 12 bits per dimension (used across two stages).
8286
* **LVQ8:**
83-
* Single-level compression.
87+
* Single-level compression only.
8488
* 8 bits per dimension.
8589
* No second-level residuals.
86-
* **LeanVec4x8:**
87-
* Dimensionality reduction followed by LVQ4x8 scheme.
8890

89-
## Learning Compression Parameters from Vector Data
91+
Same notation is used for LeanVec.
92+
93+
## Learning compression parameters from vector data
9094

91-
The effectiveness of LVQ and LeanVec compression relies on adapting to the structure of input vectors. Learning parameters directly from data leads to more accurate and efficient search.
95+
The strong performance of LVQ and LeanVec stems from their ability to adapt to the structure of the input vectors. By learning compression parameters directly from the data, they achieve more accurate representations with fewer bits.
9296

93-
### Practical Considerations
97+
### What does this mean in practice?
9498

95-
* **Initial Training Requirement:**
96-
A minimum number of representative vectors is needed during index initialization to train the compression parameters (see [TRAINING_THRESHOLD]({{< relref "/develop/ai/search-and-query/vectors/svs-training.md" >}})).
97-
* **Handling Data Drift:**
98-
If incoming vector characteristics change significantly over time (data distribution shift), compression quality may degradea general limitation of all data-dependent methods.
99+
* **Initial training requirement:**
100+
A minimum number of representative vectors is required during index initialization to train the compression parameters (see the [TRAINING_THRESHOLD]({{< relref "/develop/ai/search-and-query/vectors/#svs-vamana-index" >}}) parameter). A random sample from the dataset typically works well.
101+
* **Handling data drift:**
102+
If the characteristics of incoming vectors change significantly over time (that is, a data distribution shift), compression quality may degrade. This is a general limitation of all data-dependent compression methods,not just LVQ and LeanVec. When the data no longer resembles the original training sample, the learned representation becomes less effective.

0 commit comments

Comments
 (0)