Training-free ordinal & sign quantization for compressed vector retrieval
Project description
ordvec (Python)
Python bindings for ordvec — a
training-free ordinal & sign vector-quantization library for compressed
nearest-neighbour retrieval over high-dimensional embeddings. Pure-Rust core,
zero system dependencies; SIMD-accelerated at runtime (AVX-512 / AVX2 / scalar).
import numpy as np
import ordvec
q = ordvec.RankQuant(1024, 2) # 1024-dim, 2 bits/coord
q.add(np.random.randn(10_000, 1024).astype(np.float32))
# asymmetric: full-precision float queries vs bucketed docs (recommended)
scores, ids = q.search_asymmetric(np.random.randn(8, 1024).astype(np.float32), k=10)
Classes
| Class | Purpose |
|---|---|
Rank |
Full-precision rank vectors (u16 per coordinate). |
RankQuant |
Bucketed ranks, bits ∈ {1, 2, 4}; symmetric + asymmetric (float-query LUT) scoring. |
Bitmap |
Top-bucket bitmap per document; popcount(Q AND D) candidate scoring. |
SignBitmap |
Sign bitmap for sign-cosine candidate generation. |
Installation
pip install ordvec
Wheels target CPython 3.10+ (abi3). Building from source needs a Rust toolchain (MSRV 1.89) and maturin.
Provenance & license
The ordvec Python bindings were developed within turbovec, factored out
into this standalone package. turbovec
(MIT, by Ryan Codrai) is credited as
the origin project.
Dual-licensed under either of MIT or Apache-2.0 at your option.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ordvec-0.2.0.tar.gz.
File metadata
- Download URL: ordvec-0.2.0.tar.gz
- Upload date:
- Size: 211.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b37065499397245b893d52fc2a4dc9b6f91c255dd223d1f8348b3870c1c7550c
|
|
| MD5 |
7bef51656a42d0fb4d1cde3042ea2e6e
|
|
| BLAKE2b-256 |
80553b9ddc7efed96e937310455dd2496ece00665b1baac0128987ce41e51687
|
Provenance
The following attestation bundles were made for ordvec-0.2.0.tar.gz:
Publisher:
release-python.yml on Fieldnote-Echo/ordvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ordvec-0.2.0.tar.gz -
Subject digest:
b37065499397245b893d52fc2a4dc9b6f91c255dd223d1f8348b3870c1c7550c - Sigstore transparency entry: 1634158408
- Sigstore integration time:
-
Permalink:
Fieldnote-Echo/ordvec@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fieldnote-Echo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ordvec-0.2.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: ordvec-0.2.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 374.9 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d61d97d0fcc58f4ba18527caab2b420d5c5782ec79c375647cf7e10af0bdc0a0
|
|
| MD5 |
97ab658d50c2cdba452a4ab942b6e526
|
|
| BLAKE2b-256 |
053437f46fefaa03e451062f5725f59f421dc08d25c0b7f90b2a65667c56c865
|
Provenance
The following attestation bundles were made for ordvec-0.2.0-cp310-abi3-win_amd64.whl:
Publisher:
release-python.yml on Fieldnote-Echo/ordvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ordvec-0.2.0-cp310-abi3-win_amd64.whl -
Subject digest:
d61d97d0fcc58f4ba18527caab2b420d5c5782ec79c375647cf7e10af0bdc0a0 - Sigstore transparency entry: 1634158415
- Sigstore integration time:
-
Permalink:
Fieldnote-Echo/ordvec@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fieldnote-Echo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ordvec-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ordvec-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 490.3 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b439141db8e12178c8a5275f914e0afec48ab466c416290e2cf9e0383e1192fc
|
|
| MD5 |
a2a7b80f16fd11acb9c97ce0b55ec9a8
|
|
| BLAKE2b-256 |
a83194c069398ef6e116b7db29709560c5f893c028a834f408681932ae019afc
|
Provenance
The following attestation bundles were made for ordvec-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-python.yml on Fieldnote-Echo/ordvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ordvec-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
b439141db8e12178c8a5275f914e0afec48ab466c416290e2cf9e0383e1192fc - Sigstore transparency entry: 1634158425
- Sigstore integration time:
-
Permalink:
Fieldnote-Echo/ordvec@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fieldnote-Echo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ordvec-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: ordvec-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 460.5 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c66a679b3c5612fc95311e0f353554b789487d64315690529586a36c0ff2c391
|
|
| MD5 |
49a646b23962b6aa5552d9cc3d7936b6
|
|
| BLAKE2b-256 |
763e27a712d24ce70574f28c4fe25b5083ccf7710ed65a91d82fb7dea94760df
|
Provenance
The following attestation bundles were made for ordvec-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release-python.yml on Fieldnote-Echo/ordvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ordvec-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
c66a679b3c5612fc95311e0f353554b789487d64315690529586a36c0ff2c391 - Sigstore transparency entry: 1634158429
- Sigstore integration time:
-
Permalink:
Fieldnote-Echo/ordvec@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fieldnote-Echo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ordvec-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: ordvec-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 423.0 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5ea57ecf3f2f604c89d940d897ad9c221b14782a7e7a8e1c4d2db7a27cf1335
|
|
| MD5 |
97179c22e74a2666585ed6bd64836dff
|
|
| BLAKE2b-256 |
89d4f94f129d14f6330eeb76e1ea75a794e42427ef0b685dd9e7c43d4a6d45bd
|
Provenance
The following attestation bundles were made for ordvec-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release-python.yml on Fieldnote-Echo/ordvec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ordvec-0.2.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
d5ea57ecf3f2f604c89d940d897ad9c221b14782a7e7a8e1c4d2db7a27cf1335 - Sigstore transparency entry: 1634158422
- Sigstore integration time:
-
Permalink:
Fieldnote-Echo/ordvec@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Fieldnote-Echo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@d2b2b1083bcdced991ef4a404e360dcbdcc5b6b6 -
Trigger Event:
workflow_dispatch
-
Statement type: