Skip to content

Add WARM to the streaming track - #357

Open
dcondrey wants to merge 8 commits into
harsha-simhadri:mainfrom
dcondrey:streaming/warm
Open

dcondrey wants to merge 8 commits into
harsha-simhadri:mainfrom
dcondrey:streaming/warm

Conversation

@dcondrey

@dcondrey dcondrey commented Nov 6, 2026 •

Copy link
Copy Markdown

false
561f9fe
Adds neurips23/streaming/warm (algorithm key warm). Source: https://github.com/writerslogic/warm (Apache-2.0), pinned to WARM main commit 1cdeab8dac2949922725fe9664aa5953e6add40b by the single ARG WARM_COMMIT in neurips23/streaming/warm/Dockerfile. The wheel is built with --features python,experimental on a pinned Rust 1.99.0 toolchain.

Files: Dockerfile, config.yaml, warm.py (Warm(BaseStreamingANN)), streaming_io.py, and the CI entry (warm on random-xs).

Algorithm

For msturing-30M-clustered, config.yaml selects "mode": "partition", which uses writerslogic_warm.PartitionIndex:

  • Until 1,000,000 vectors are live, search is exact brute force.
  • At the first search past that point the index trains an IVF-style partition with 5,000 lists. Each vector is placed in its nearest list and, when a second list qualifies, also in a spill list chosen by a SOAR-style loss. Each placement stores a 50-subvector product-quantized residual with 4-bit codes, laid out in blocks for a 4-bit lookup-table (fast-scan) kernel.
  • Search probes a number of lists scaled by the current live size (the base nprobe is multiplied by a factor from 1.4 at 2M live rows or fewer down to 0.6 at 10M or more). It scans the 4-bit codes with the threshold test fused into the kernel; on AVX-512 VBMI+VNNI CPUs eight queries share each code block. It then reorders the top 1,000 candidates exactly in f32.
  • The centres and codebook are retrained during the run when the list imbalance passes 1.7 after at least 4,000,000 inserts since the last training. A retrain is warm-started from the current centres (3 Lloyd iterations on a 1,000,000-row sample) with rebalancing of near-empty centres, then re-places every live row. These are the binding's defaults; config.yaml does not set them.

Deletes and storage

PartitionIndex.delete does not tombstone (src/core/qgraph/partition.rs at the pinned commit, delete, lines 1076-1109). For each deleted id it removes the row's entries from its lists by swap-remove (remove, lines 788-816): the last code of the list is moved into the vacated position, the list shrinks, and the code block is truncated when it empties. The row's slot is pushed on a free list (line 1106) and reused by a later insert (line 993). The full-precision row array is not shrunk: it is sized to the peak number of simultaneously live rows, and freed slots are reused rather than returned to the allocator. The lists, and therefore the scan cost, cover only live points. The structure is not sized to the full set of 30M points.

Configuration

config.yaml for msturing-30M-clustered has one build configuration and one search configuration:

  • build: {"mode":"partition", "lists":5000, "train_at":1000000, "reorder":1000, "T":8}
  • search: {"nprobe":925}

The graph mode (R/L/alpha, UpdatableIndex) stays available for the other datasets in config.yaml; their entries are unchanged.

Dataset override: importing warm.py replaces the harness's msturing-10M-clustered and msturing-30M-clustered dataset classes with subclasses whose get_data_in_range reads only the requested rows of the .fbin (after strict header and size checks). The organisers may drop streaming_io.py and the DATASETS.update call without affecting the index.

Measured results (not the organisers' evaluation)

Three Docker-mode runs of the final runbook on msturing-30M-clustered, nprobe 925, reorder 1000 (this PR's config.yaml), on GCP n2-custom-8-16384 (Intel Xeon Ice Lake @ 2.60 GHz, 8 vCPU, AVX-512), us-east4, 8 GiB container memory limit. This is Google Cloud, not the organisers' Azure Standard_D8lds_v5 VM, so the numbers are not official and are not a leaderboard placement.

Harness: this branch at 561f9fe with config.yaml at nprobe 925 and two local edits to benchmark/runner.py for measurement only (container memory limit forced to 8 GiB; container wait timeout raised from 1 h to 3 h so an overrun would be recorded instead of killed). All 1,280 steps completed with exit 0 in every run.

run WARM commit in the image mean recall@10 step-time total run.py wall insert / search / delete
r1b 5e2893f0 (WARM perf/stream-np head) 0.998548 3,324.5 s 3,329 s 197.1 / 3,092.1 / 35.3 s
r2b 5e2893f0 0.998548 3,378.8 s 3,383 s 193.1 / 3,149.2 / 36.4 s
r3 (run at the submitted pin) 1cdeab8d (ARG WARM_COMMIT in this PR's Dockerfile) 0.998548 3,388.7 s 3,392 s 194.7 / 3,157.4 / 36.5 s

Notes:

  • r3 is the image built by install.py from this PR's Dockerfile at this head (build log confirms the checkout of 1cdeab8d; numpy 1.26.4, scipy 1.10.1 in the image). WARM 1cdeab8d is the commit on WARM main that merged the perf/stream-np change (perf: Run the streaming partition tier's gemm on AVX-512 and select probes and candidates on packed integer keys writerslogic/warm#463); r1b and r2b used the pre-merge branch head.
  • Recall is the harness's compute_metrics_all_runs mean over the 640 search steps, recomputed from the saved result files.
  • Previous pin and config (0f81061b, nprobe 830) in Docker mode on the same host class: 3,563.1 s step-time total, one run, recall not exported. The Azure E8bds_v5 Docker runs reported earlier in this PR (e176d557, nprobe 830: 3,238.3 s and 3,242.7 s at 0.998038) are unchanged; nprobe 925 and the newer pin were not run on Azure.
  • The three GCP runs ran on different VMs or at different times and span 64 s of step-time total (3,324.5 to 3,388.7 s); all are listed. r3 finished 8 s inside a 3,400 s mark and 208 s inside the 3,600 s limit. Three data points, not a guarantee.
  • The container cgroup memory peak reads at the 8 GiB limit because it includes page cache; no OOM kill in any run.
  • The newer wheel depends on numpy>=1.26, which replaced the harness image's pinned NumPy 1.24.2 and broke scipy 1.10.1 at import in the first attempts; the Dockerfile now ends with pip3 install "numpy>=1.26,<2" (comment in the file).
  • For reference, neurips23/README.md quotes DiskANN at 0.883 on this runbook.
  • Raw results: WARM benchmarks/results/bigann_streaming_final_runbook_icelake_v2.json (r1b, r2b; perf: Run the streaming partition tier's gemm on AVX-512 and select probes and candidates on packed integer keys writerslogic/warm#463).

CI

Fork CI on an earlier head (https://github.com/dcondrey/big-ann-benchmarks/actions/runs/42456893463):

  • The neurips23-streaming-warm image builds and Warm instantiates.
  • The random-xs step then fails with FileNotFoundError: 'neurips23/streaming/simple_runbook.yaml', the harness's default runbook path in benchmark/runner.py.
  • Every streaming entry in that run fails the same way (diskann, puck, pyanns, cufe, hwtl_sdu_anns_stream).

Not checked

  • Timing on the Standard_D8lds_v5 evaluation VM, and any Azure run at nprobe 925 or at the new pin.
  • A CI run on this head.

@dcondrey
dcondrey marked this pull request as ready for review November 12, 2026 23:26
@dcondrey

Copy link
Copy Markdown
Author

Repinned WARM to the v0.7.4 tag (005c27d42450bc9f606061af0ee7fdc3dea09181). WARM's public history was rewritten, so the commit pinned before no longer resolves and the image build would fail at git checkout. The wrapper's calls and config parameters were checked against v0.7.4 and are unchanged. The numbers quoted above were measured at the earlier commit and have not been re-run at v0.7.4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant