Skip to content

Zvec 0.7.0: quantization, RaBitQ, per-index search params, group-by, export - #3

Merged
TheAli711 merged 26 commits into
mainfrom
feat/zvec-0.7.0
Sep 19, 2026
Merged

TheAli711 merged 26 commits into
mainfrom
feat/zvec-0.7.0

Conversation

@TheAli711

Copy link
Copy Markdown
Owner

Upgrades the engine to Zvec 0.7.0 and exposes its new capabilities, plus concurrency fixes found along the way. Intended for v0.2.0 (contains breaking changes — see below).

Upgrade

  • Require zvec>=0.7.0. Fixes the mmap empty-id bug (Failed to find target chunk): 9,279 errors → 0 on the smoke benchmark, recall back to no-mmap parity.
  • Shutdown explicitly close()s every collection (releases Zvec's on-disk lock immediately — helps rolling restarts).
  • optimize holds the shared lock, so searches keep flowing: 8 queries in 2.1 s (max 2,112 ms) before → 2,609 queries (max 19 ms) after.

Features

  • Quantization params (quantize_type fp16/int8/int4, enable_rotate) on hnsw/flat/ivf — opt-in; measured on SIFT1M it costs disk, memory and recall without a speed gain, documented as such.
  • hnsw_rabitq / ivf_rabitq index types (Linux x86_64 servers; clean 422 elsewhere).
  • use_soar for IVF.
  • Search params for every index type (ef, nprobe, radius, is_linear, is_using_refiner, scale_factor).
  • POST /collections/{name}/search/group-by.
  • GET /collections/{name}/export — NDJSON snapshot stream, re-importable, doesn't block writes, in-band error line if cut short.

Fixes

  • Collection names validated against Zvec's 3–64 char limit (were misreported as 409).
  • drop() waits for in-flight requests; queued requests never run on a destroyed/closed handle.
  • Background recovery can no longer resurrect a dropped collection.
  • Export cursor released immediately on client disconnect.

Breaking changes

  • Unknown/mistyped keys in index params → 422; in search params → 400 (previously ignored — e.g. ef on a flat/ivf field).
  • Collection names must be 3–64 chars (names outside that never worked in the engine).

Tests & benchmarks

  • New tests for every feature/fix incl. concurrency races (drop/close vs optimize, export vs drop/close/disconnect, recovery vs drop). Every commit passes ruff/mypy/pytest individually; full suite also passes on linux/amd64 (RaBitQ path).
  • Benchmarks: --quantize/--rotate, quant sweep, optimize-load; fixed SIFT1M download (403) and inproc runner locking.

🤖 Generated with Claude Code

TheAli711 and others added 26 commits September 19, 2026 09:05
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…index params

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…p mapping schema errors to 409

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… is_linear, ...)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…on a dead handle

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ith 403

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…uring optimize

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ecture, and examples

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@TheAli711
TheAli711 merged commit 4179bcc into main Sep 19, 2026
9 checks passed
@TheAli711
TheAli711 deleted the feat/zvec-0.7.0 branch September 19, 2026 06:59
TheAli711 added a commit that referenced this pull request Sep 24, 2026
Zvec 0.7.0: quantization, RaBitQ, per-index search params, group-by, export
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