You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge feat/v0.3.0-remaining-fixes: resolve all 6 remaining criticisms
- Rotation/QJL matrix caching
- Codes consolidation after rebuild
- ADC memory-efficient search mode
- Real-data distribution benchmarks
- README honest claims with query performance data
- Version bump to 0.3.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
*Note: Pure Python/NumPy implementation. C++ libraries (FAISS, ScaNN) are significantly faster at scale. TurboQuant's advantages are zero-preprocessing, high recall, and minimal dependencies.*
255
+
256
+
### Recall on Different Distributions
257
+
258
+
Evaluated against exact float32 brute-force ground truth (N=5,000, d=384):
*Isotropic matches TurboQuant's theoretical assumptions. Real embeddings typically fall between clustered and anisotropic. Benchmarks on synthetic distributions — real embedding recall may vary.*
267
+
243
268
### Limitations and Transparency
244
269
245
270
-**`TurboQuantIndex` uses brute-force search** — O(N*d) per query. For datasets > 100K vectors, use `IVFTurboQuantIndex`
246
271
-**Rotation matrix overhead** — each index stores a d*d float32 matrix (e.g., 9MB for d=1536). Use `stats()` to see `effective_compression_ratio`
247
272
-**Recall benchmarks above use random unit vectors** — real embeddings with semantic clustering may show different recall characteristics
248
-
-**Runtime memory** — the reconstructed float32 matrix is held in RAM for search; compressed storage savings apply to disk persistence
273
+
-**Runtime memory** — by default, the reconstructed float32 matrix is held in RAM for search. Use `memory_efficient=True` to enable ADC search directly on compressed codes (trades speed for ~8x less RAM)
249
274
250
275
## API Reference
251
276
@@ -255,11 +280,12 @@ High-level vector search index with TurboQuant compression.
255
280
256
281
```python
257
282
TurboQuantIndex(
258
-
dimension: int, # Vector dimension (e.g., 384 for MiniLM)
259
-
num_bits: int=4, # Bits per coordinate (2-8)
260
-
metric: str="cosine", # Similarity metric
261
-
use_qjl: bool=False, # Enable QJL for unbiased inner products
262
-
seed: int=42, # Random seed for reproducibility
283
+
dimension: int, # Vector dimension (e.g., 384 for MiniLM)
284
+
num_bits: int=4, # Bits per coordinate (2-8)
285
+
metric: str="cosine", # Similarity metric
286
+
use_qjl: bool=False, # Enable QJL for unbiased inner products
287
+
seed: int=42, # Random seed for reproducibility
288
+
memory_efficient: bool=False, # ADC search on compressed codes (less RAM)
**3,781 tests** covering mathematical properties, edge cases, stress scenarios, and end-to-end workflows. See **[TESTING.md](TESTING.md)** for full documentation of every test category, parametric ranges, and paper claim verification mapping.
385
+
**3,823 tests** covering mathematical properties, edge cases, stress scenarios, and end-to-end workflows. See **[TESTING.md](TESTING.md)** for full documentation of every test category, parametric ranges, and paper claim verification mapping.
358
386
359
387
```bash
360
-
# Run all tests (3,781 parametrized test cases)
388
+
# Run all tests (3,823 parametrized test cases)
361
389
pip install -e ".[dev]"
362
390
pytest tests/ -v
363
391
@@ -375,7 +403,7 @@ python examples/benchmark.py
375
403
376
404
## Paper Verification
377
405
378
-
All six core claims from the TurboQuant paper ([arXiv:2504.19874](https://arxiv.org/abs/2504.19874)) are **empirically verified** by our test suite (3,781 tests). See **[PAPER_VERIFICATION.md](PAPER_VERIFICATION.md)** for the full verification report with theorem references, reproduction instructions, and detailed statistical results.
406
+
All six core claims from the TurboQuant paper ([arXiv:2504.19874](https://arxiv.org/abs/2504.19874)) are **empirically verified** by our test suite (3,823 tests). See **[PAPER_VERIFICATION.md](PAPER_VERIFICATION.md)** for the full verification report with theorem references, reproduction instructions, and detailed statistical results.
379
407
380
408
### Claim 1: MSE within 2.72x of Shannon Limit (Theorem 1)
0 commit comments