You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/knng/README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ Given $N$ high-dimensional vectors, the goal of k-NNG construction (self-join) i
11
11
12
12
The approach demonstrates **Mode 4 (`evp-rerank`)**, which achieves state-of-the-art trade-offs between construction speed and neighbor recall ($\ge 88\%$):
13
13
14
-
1.**EVP Quantization**: Feature vectors are converted to compact sparse EVP-bit representations using `deglib.optimization.EvpQuantizer` (`--non-zeros 512`).
14
+
1.**EVP Quantization**: Feature vectors are converted to compact sparse EVP-bit representations using `deglib.optimization.EvpQuantizer` (`--non-zeros 700`).
15
15
2.**DEG Construction**: A dynamic exploration graph is constructed using DEG's `GraphBuilder` with the `EVP_InnerProduct` metric for fast quantized distance computation.
16
16
3.**Graph Exploration**: Exploration for vertex $i$ walks the DEG graph neighborhood using fast EVP bit-level inner product distances to collect candidates (`evpK = 50`).
17
-
4.**FP16 Candidate Reranking**: Exact inner-product distances are computed using `deglib_cpp.floats_to_fp16` and `deglib_cpp.fp16_to_floats` for candidate sets to produce final $k$-nearest neighbor edges.
17
+
4.**FP16 Candidate Reranking**: Candidate sets are reranked with exact half-precision inner-product distances via `deglib.search.rerank` (using an `FP16_InnerProduct` space) to produce final $k$-nearest neighbor edges.
18
18
19
19
## Prerequisites: Building the Python Library (`deglib`)
Copy file name to clipboardExpand all lines: examples/mips/README.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,18 +22,18 @@ We use a 5-step pipeline that reduces MIPS to $L_2$ graph search while retaining
22
22
A `DynamicExplorationGraph` is constructed using `GraphBuilder` in $(d+1)$-dimensional `Metric.FP32_L2` space ($K_{\text{graph}} = 32, K_{\text{ext}} = 64$).
23
23
24
24
4.**FP16 Feature Swapping & `ReadOnlyGraph`**:
25
-
The original $d$-dimensional FP32 database vectors are converted to 16-bit half-precision floats (`deglib.floats_to_fp16`). The graph topology built in step 3 is converted to a `ReadOnlyGraph` with `Metric.FP16_InnerProduct` space by passing the FP16 feature buffer (`graph.to_readonly(feature_space=..., custom_features=...)`).
25
+
The original $d$-dimensional FP32 database vectors are converted to 16-bit half-precision floats (`deglib.distances.floats_to_fp16`). The graph topology built in step 3 is converted to a `ReadOnlyGraph` with `Metric.FP16_InnerProduct` space by passing the FP16 feature buffer (`graph.to_readonly(feature_space=..., custom_features=...)`).
26
26
27
27
5.**SIMD FP16 Inner Product Search**:
28
-
Query vectors are converted to FP16 (`deglib.floats_to_fp16`) and searched on the `ReadOnlyGraph` using fast SIMD FP16 inner product distance routines ($\varepsilon_{\text{search}} = 0.18$, max distance evaluation budget sweep: `6000, 6500, 7000, 7500, 8000, 9000`).
28
+
Query vectors are converted to FP16 (`deglib.distances.floats_to_fp16`) and searched on the `ReadOnlyGraph` using fast SIMD FP16 inner product distance routines ($\varepsilon_{\text{search}} = 0.18$, max distance evaluation budget sweep: `6000, 6500, 7000, 7500, 8000, 9000`).
29
29
30
30
---
31
31
32
32
## Dataset
33
33
34
34
This example benchmarks on the **SISAP 2026 `llama-dev`** dataset (Llama embeddings):
0 commit comments