diff --git a/benchmarks/experiments/QUANTIZATION.md b/benchmarks/experiments/QUANTIZATION.md index b262e82f250..be8a7d6999d 100644 --- a/benchmarks/experiments/QUANTIZATION.md +++ b/benchmarks/experiments/QUANTIZATION.md @@ -10,7 +10,7 @@ The quantization survey of DECISIONS #131 item 8 (CAMPAIGN.md section 7 row 42), | engine (pin) | ships | our arm today | int8 arm | source | |---|---|---|---|---| -| ArcadeDB (26.10.1 at the re-pin) | `LSM_VECTOR` quantization `NONE`, `INT8`, `BINARY`, `PRODUCT` | fp32 and INT8, embedded and served | exists | adapter (`l3d_dense._QUANT_DDL`, the engine's own error text for anything else) | +| ArcadeDB (26.10.1 at the re-pin) | `LSM_VECTOR` quantization `NONE`, `INT8`, `BINARY`, `PRODUCT` | fp32 and INT8, embedded and served (no `PRODUCT` arm: the SQL search scores candidates with the full-precision vectors, so PQ saves no memory there, [ArcadeData/arcadedb#10514](https://github.com/ArcadeData/arcadedb/issues/10514)) | exists | adapter (`l3d_dense._QUANT_DDL`, the engine's own error text for anything else) | | Qdrant v1.19.1 | scalar (int8), product, binary, turbo | fp32 and scalar int8 (quantile 0.99, always_ram, rescore at search) | exists | image: `qdrant_client.models` in `dbbench:client` lists `ScalarQuantization` (`int8`), `ProductQuantization`, `BinaryQuantization`, `TurboQuantization` | | Milvus v3.0.1 | HNSW (fp32), `HNSW_SQ` (`sq_type` SQ8 and others), `HNSW_PQ`, `HNSW_PRQ`, IVF variants | HNSW fp32 and `HNSW_SQ` SQ8 | exists | adapter (both arms build on the image); docs for the rest | | sqlite-vec 0.1.9 | `float32`, `int8`, `bit` column types, `vec_quantize_int8()` | fp32 and int8 | exists | image: `dbbench:dense` | diff --git a/bindings/python/docs/api/database.md b/bindings/python/docs/api/database.md index 089eea8d9c5..92156689448 100644 --- a/bindings/python/docs/api/database.md +++ b/bindings/python/docs/api/database.md @@ -1004,8 +1004,10 @@ specifically need that surface. `beamWidth` in HNSW (JVector). - `quantization` (str | None): `"INT8"` (recommended), `"BINARY"`, `"PRODUCT"` for PQ, or `None` for full precision (default: `"INT8"`). Prefer `"INT8"` for current - production usage in these bindings; `"PRODUCT"`/PQ is currently not recommended for - production workloads. In current ArcadeDB engine builds, `"PRODUCT"` also requires + production usage in these bindings; `"PRODUCT"`/PQ is not recommended: in current engine builds the SQL search + (`vectorNeighbors`) scores candidates with the full-precision vectors, so PQ gives no + search speedup, and the index files are larger than with `None` because the engine writes + PQ codes that it does not read ([ArcadeDB #10514](https://github.com/ArcadeData/arcadedb/issues/10514)). In current ArcadeDB engine builds, `"PRODUCT"` also requires enough indexed vectors per bucket for PQ training. For tiny corpora, set `pq_clusters` explicitly to a small value or prefer another quantization mode. - `encoding` (str | None): Optional storage encoding for the document property. @@ -1029,6 +1031,7 @@ specifically need that surface. the number of indexed vectors available for PQ training in a bucket. - `pq_center_globally` (bool | None): PQ global centering flag. Requires `quantization="PRODUCT"`. - `pq_training_limit` (int | None): PQ training sample cap. Requires `quantization="PRODUCT"`. + Current engine builds ignore it ([ArcadeDB #10514](https://github.com/ArcadeData/arcadedb/issues/10514)). - `build_graph_now` (bool): If `True` (default), eagerly builds/loads the vector graph immediately after index creation. Set to `False` to defer graph preparation to first query. **Returns:** diff --git a/bindings/python/docs/guide/vectors.md b/bindings/python/docs/guide/vectors.md index 643099aa2b4..e89aaaadc0b 100644 --- a/bindings/python/docs/guide/vectors.md +++ b/bindings/python/docs/guide/vectors.md @@ -331,7 +331,10 @@ rows = db.query( - In current ArcadeDB engine builds, PRODUCT/PQ also needs enough indexed vectors per bucket for training. For very small corpora, set `pq_clusters` to a value no larger than the number of indexed vectors in that bucket, or use `INT8`, `BINARY`, or `None`. -- `"PRODUCT"`/PQ is currently not recommended for production workloads in these bindings. +- `"PRODUCT"`/PQ is not recommended in these bindings: current engine builds score SQL search + (`vectorNeighbors`) candidates with the full-precision vectors, so PQ gives no search speedup, + and the index files are larger than with `None` because PQ codes are written that nothing reads + ([ArcadeDB #10514](https://github.com/ArcadeData/arcadedb/issues/10514)). - SQL quantization helpers: `vector.quantizeInt8` / `vector.dequantizeInt8` and `vector.quantizeBinary` / `vector.dequantizeBinary(v[, low, high])`. Binary quantization keeps only the sign of each element; dequantize reconstructs it as diff --git a/bindings/python/src/arcadedb_embedded/core.py b/bindings/python/src/arcadedb_embedded/core.py index dd3d98423ea..da63b38b0a7 100644 --- a/bindings/python/src/arcadedb_embedded/core.py +++ b/bindings/python/src/arcadedb_embedded/core.py @@ -1199,6 +1199,7 @@ def create_vector_index( In current ArcadeDB engine builds, PRODUCT also requires enough indexed vectors per bucket for PQ training; for tiny corpora, set `pq_clusters` explicitly to a small value or prefer INT8/BINARY/NONE. + PRODUCT is not recommended; see ArcadeDB #10514. encoding: Optional storage encoding for the underlying vector property. Use "INT8" when the document property stores pre-quantized bytes in a `BINARY` property. When using INT8 encoding, set quantization to "NONE"