[package]
edition = "2021"
rust-version = "1.75"
name = "bitpolar"
version = "0.3.3"
authors = ["BitPolar Contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "BitPolar: near-optimal vector quantization with zero training overhead — 3-bit precision, provably unbiased inner products (ICLR 2026)"
homepage = "https://github.com/mmgehlot/bitpolar"
readme = "README.md"
keywords = [
"quantization",
"vector-search",
"kv-cache",
"compression",
"machine-learning",
]
categories = [
"algorithms",
"science",
"compression",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/mmgehlot/bitpolar"
[features]
alloc = []
default = [
"std",
"serde-support",
]
ffi = []
parallel = ["dep:rayon"]
serde-support = [
"dep:serde",
"dep:serde_json",
]
simd = []
std = ["dep:nalgebra"]
tracing-support = ["dep:tracing"]
[lib]
name = "bitpolar"
path = "src/lib.rs"
[[example]]
name = "integration_adaptive"
path = "examples/integration_adaptive.rs"
[[example]]
name = "integration_tiered_storage"
path = "examples/integration_tiered_storage.rs"
[[example]]
name = "llm_kv_cache"
path = "examples/llm_kv_cache.rs"
[[example]]
name = "llm_multi_head_cache"
path = "examples/llm_multi_head_cache.rs"
[[example]]
name = "pattern_federated_search"
path = "examples/pattern_federated_search.rs"
[[example]]
name = "pattern_multi_tenant"
path = "examples/pattern_multi_tenant.rs"
[[example]]
name = "search_brute_force"
path = "examples/search_brute_force.rs"
[[example]]
name = "search_oversampled"
path = "examples/search_oversampled.rs"
[[example]]
name = "search_vector_database"
path = "examples/search_vector_database.rs"
[[test]]
name = "conformance_test"
path = "tests/conformance_test.rs"
[[test]]
name = "integration_test"
path = "tests/integration_test.rs"
[[test]]
name = "property_test"
path = "tests/property_test.rs"
[[bench]]
name = "dataset_bench"
path = "benches/dataset_bench.rs"
harness = false
[[bench]]
name = "quantization_bench"
path = "benches/quantization_bench.rs"
harness = false
[[bench]]
name = "search_bench"
path = "benches/search_bench.rs"
harness = false
[dependencies.libm]
version = "0.2"
[dependencies.nalgebra]
version = "0.34"
features = ["std"]
optional = true
default-features = false
[dependencies.rand]
version = "0.8"
[dependencies.rand_chacha]
version = "0.3"
[dependencies.rand_distr]
version = "0.4"
[dependencies.rayon]
version = "1.10"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tracing]
version = "0.1"
optional = true
[dev-dependencies.approx]
version = "0.5"
[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.serde_json]
version = "1"