Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)

project(RaBitQLib VERSION 0.8.2 LANGUAGES CXX)
project(RaBitQLib VERSION 0.8.3 LANGUAGES CXX)

include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ approximate nearest-neighbor search. See the [research papers](https://vectordb-

## News

- **v0.8.3:** provisional `rabitqlib.quant` module: rotate, quantize, pack and score
RaBitQ codes stored outside an index
([notes](https://vectordb-ntu.github.io/RaBitQ-Library/releases/0.8.3/)).
- **v0.8.2:** three lines to an index: the first `add` trains, `nbits` defaults to 7
and search settings are optional; faster IVF-RaBitQ `add`
([notes](https://vectordb-ntu.github.io/RaBitQ-Library/releases/0.8.2/)).
- **v0.8.1:** the default `num_threads=0` respects `OMP_NUM_THREADS`, fixing a macOS
crash alongside Faiss and PyTorch ([notes](https://vectordb-ntu.github.io/RaBitQ-Library/releases/0.8.1/)).
- **v0.8.0:** Faiss-style `train`, `add` and `search` for all Python indexes; 0.7 calls
stay as deprecated forms until 0.9 ([notes](https://vectordb-ntu.github.io/RaBitQ-Library/releases/0.8.0/)).

Earlier versions: [all releases](https://github.com/VectorDB-NTU/RaBitQ-Library/releases).

Expand Down Expand Up @@ -61,7 +62,7 @@ settings, and limitations.
### Python

```bash
python -m pip install --upgrade "rabitqlib>=0.8.2"
python -m pip install --upgrade "rabitqlib>=0.8.3"
```

Wheels support CPython 3.11–3.14 on Linux x86-64/ARM64, Windows x86-64,
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/cpp_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ The core example is built as the `core_example` CMake target. For the GIST bench

The [core quantization v1 API](rabitq/core_api.md) has a C++ source-compatibility contract.
Other C++ APIs may evolve, and no cross-version C++ binary ABI is promised.
Pin the `v0.8.2` release and include RaBitQ-Library as a Git submodule:
Pin the `v0.8.3` release and include RaBitQ-Library as a Git submodule:

```bash
git submodule add https://github.com/VectorDB-NTU/RaBitQ-Library.git third_party/rabitqlib
git submodule update --init --recursive
git -C third_party/rabitqlib checkout v0.8.2
git -C third_party/rabitqlib checkout v0.8.3
git add third_party/rabitqlib
```

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ estimation into your own <span class="nowrap">C++</span> search engine.</p>
</div>

```bash
python -m pip install "rabitqlib>=0.8.2"
python -m pip install "rabitqlib>=0.8.3"
```

[Installation and supported platforms](installation.md) ·
Expand Down Expand Up @@ -112,5 +112,5 @@ on your own dataset when choosing an index.
## Explore further

- [Algorithm overview](rabitq/rabitq.md) for the rotation, encoding, and scoring workflow.
- [RaBitQ Library 0.8.2 release notes](releases/0.8.2.md) for the latest changes and upgrade guidance.
- [RaBitQ Library 0.8.3 release notes](releases/0.8.3.md) for the latest changes and upgrade guidance.
- [Papers and citations](papers.md) for the original RaBitQ method, its multi-bit extension, and SymphonyQG.
8 changes: 4 additions & 4 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

Platform requirements and source installation for RaBitQ Library **0.8.2**.
Platform requirements and source installation for RaBitQ Library **0.8.3**.
For the first Python example, see [Quick Start](quick_start.md).

## Requirements
Expand Down Expand Up @@ -40,7 +40,7 @@ build can use scalar kernels without the FastScan CPU baseline.
## Python wheels

```bash
python -m pip install "rabitqlib>=0.8.2"
python -m pip install "rabitqlib>=0.8.3"
```

For changes from 0.6.0, see the [0.7.0 upgrade notes](releases/0.7.0.md).
Expand All @@ -61,11 +61,11 @@ importing those classes. Array shapes and parameter ranges are still checked at

## Get the source

For Python source builds or C++ use, obtain the 0.8.2 checkout once. With Git
For Python source builds or C++ use, obtain the 0.8.3 checkout once. With Git
installed, run:

```bash
git clone --branch v0.8.2 --depth 1 https://github.com/VectorDB-NTU/RaBitQ-Library.git
git clone --branch v0.8.3 --depth 1 https://github.com/VectorDB-NTU/RaBitQ-Library.git
cd RaBitQ-Library
```

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/quick_start.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Quick start

Build, search, save and reload a small IVF-RaBitQ index with Python. This guide describes
**0.8.2** and uses synthetic data, so no dataset download is required. Coming from 0.7?
**0.8.3** and uses synthetic data, so no dataset download is required. Coming from 0.7?
See the [migration guide](python_migration.md).
For C++, go directly to [C++ integration](cpp_integration.md).

## Install

```bash
python -m pip install "rabitqlib>=0.8.2"
python -m pip install "rabitqlib>=0.8.3"
```

Wheels support CPython 3.11–3.14 on Linux x86-64/ARM64, Windows x86-64 and
Expand Down
62 changes: 62 additions & 0 deletions docs/docs/releases/0.8.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# RaBitQ Library 0.8.3

This release adds `rabitqlib.quant`, a provisional Python module with the
quantization building blocks behind the indexes. Use it to store RaBitQ codes in
your own database or file format and to score them with your own candidate
selection, without building an index. Existing APIs, defaults, results and index
files are unchanged.

```python
from rabitqlib import quant

rot = quant.Rotator(dim, seed=42)
residuals = rot.rotate(data) - centroid # centroid in the rotated space
codes = quant.quantize(residuals, nbits=4)
factors = quant.code_factors(residuals, codes, nbits=4, metric="l2", centroid=centroid)
```

See [Python building blocks](../rabitq/quant_python.md) for encoding, two-stage
estimation with error bounds, refinement and FastScan.

## Python changes

- New module `rabitqlib.quant`, imported explicitly with
`from rabitqlib import quant`; `import rabitqlib` does not load it.
- Rotation: `Rotator` (seeded FHT-Kac or matrix rotation) with `rotate`,
`to_bytes`/`from_bytes`, copying and pickling; `padded_dim`.
- Encoding: `quantize`, `split` (prefix and extra bits), `code_factors`,
`pack_codes`/`unpack_codes`.
- Estimation: `Query` with `estimate_bitset`, `estimate_codes`, `refine`,
`refine_packed` and `set_centroid`; `query_terms` and `estimate_from_ip` for
inner products from your own kernel.
- FastScan: `pack_fastscan_blocks` and `Query.estimate_fastscan`, which need
AVX2 with FMA, AVX-512 or NEON.
- The module is provisional in the sense of
[PEP 411](https://peps.python.org/pep-0411/): any minor release may change it,
with a note in the release notes.
- Its byte formats (packed codes, factor records, FastScan blocks and rotator
blobs) are versioned from the start and frozen by golden files. Bytes of an
unknown version raise `quant.FormatError`, a subclass of `ValueError`.
- Every array-returning call accepts `out=` and `num_threads` (all CPUs by
default for build-side calls, one for scoring calls), and the GIL is released
during computation. Invalid inputs raise
`ValueError` and name the first failing row whatever the thread count; values
not representable in float32 raise `OverflowError`.

## C++ changes

- New provisional header `rabitqlib/core/provisional/quantize.hpp` with
`rabitqlib::quant::provisional::combined_code` and `code_factors`, which back
`rabitqlib.quant`. It is not part of the stable v1 API and may change in any
minor release.
- `quant::v1` results are unchanged.

## Upgrading

From 0.8.2, index file formats, the stable core API v1 and existing Python
signatures are unchanged; this release only adds the module and header above.
Rebuild C++ consumers with matching headers and libraries; no cross-version C++
binary ABI is promised.

When upgrading from 0.7, follow the [0.8.0 release notes](0.8.0.md) and the
[migration guide](../python_migration.md).
10 changes: 0 additions & 10 deletions docs/docs/releases/unreleased.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ nav:
- C++ Integration: cpp_integration.md
# Group by minor version: nested groups stay collapsed except the current page's.
- Release notes:
- Unreleased: releases/unreleased.md
- "0.8":
- "0.8.3": releases/0.8.3.md
- "0.8.2": releases/0.8.2.md
- "0.8.1": releases/0.8.1.md
- "0.8.0": releases/0.8.0.md
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "rabitqlib"
version = "0.8.2"
version = "0.8.3"
description = "Official RaBitQ library for vector quantization and approximate nearest-neighbor search"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
Loading