All notable changes to Vectro+ will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
vectro pipelineCLI subcommand — compress → HNSW index → batch search end-to-end pipelineStreamIter/iter_stream()invectro_libfor lazy, zero-copy VECTRO+STREAM1 file iterationPyStreamIterPyO3 binding exposing the streaming iterator to PythonEmbeddingDataset.stream_from_file(path)static method on the Python dataset classstream_embeddings(path)convenience wrapper invectro_plus- WASM entry points:
cosine_similarity()andquantize_batch()invectro_lib/src/wasm.rs wasm-bindgenconditional dependency invectro_lib/Cargo.toml- All
rayonparallel calls gated with#[cfg(not(target_arch = "wasm32"))]sequential fallbacks scripts/convert_glove_to_stream1.py— converts GloVe.txtfile toVECTRO+STREAM1binary formatpython/tests/test_streaming.py— integration tests for the streaming APIjs/test.js— Node.js WASM smoke testsStreamIterclass stub inpython/vectro_plus/__init__.pyistream_embeddingstype stub in__init__.pyi
vectro_lib/Cargo.toml: added[lib] crate-type = ["cdylib", "rlib"]forwasm-packcompatibilityvectro_lib/Cargo.toml: rayon moved to[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
python/vectro_plus/__init__.py—except ImportErrorfallback path now defines stub classes (Embedding,EmbeddingDataset,SearchIndex,QuantizedIndex) and stub functions (compress_embeddings,analyze_compression_quality,benchmark_search_performance) so that type annotations and pytest collection do not crash withNameErrorwhen the Rust extension is unavailable (e.g. CI beforematurin developruns)
BENCHMARKS.md— hardware-stamped benchmark results for the v1.4.0 milestone- HNSW M=16 ef_s=50: recall@10 = 0.920 ✅ (gate ≥ 0.90), 8 066 QPS, 0.12 ms latency on M3 16GB
- PQ m=8 k=256: 0.218 recall on random synthetic data (expected; documented limitation)
- Documents PQ recall ≥ 0.90 on structured data is validated by
test_pq_recall_at_10_gate
benchmarks/results/2026-04-14T07-29-40-bench-gt.json— timestamped result artifactscripts/run_benchmark.sh— fixed binary name fromvectro→vectro_clivectro_cli/src/main.rs— bench-gt synthetic generator restored to deterministic xorshift64 (random 128-d vectors; gives realistic HNSW recall ≥ 0.98 and honest PQ baseline)
PySearchIndex::search_vectornow raisesValueErrorwhentop_k == 0or query dimension mismatches index dimensionPyQuantizedIndex::search_vectorsame validation — consistent behaviour across both index typesPySearchIndexandPyQuantizedIndexnow store and expose adimfield (Python getter)PyQuantizedIndex::from_datasetandcompress_embeddingsupdated to compute and propagatedimcreate_indexandcreate_quantized_index(Python) raiseValueErroron empty input arrays- Fixes three
TestErrorHandlingtests that previously received silent empty results instead of exceptions
vectro_lib/src/nf4.rs— 4-bit NormalFloat quantization (Nf4Quantizer)- QLoRA-paper 16-level codebook; compile-time
THRESHOLDSfor O(1)partition_pointlookup - Per-vector abs-max scaling; packed 2 nibbles/byte; ~8× compression; cosine ≥ 0.98 at d=768
decode_single()for single-record deserialization inEmbeddingDataset::load()
- QLoRA-paper 16-level codebook; compile-time
vectro_lib/src/rq.rs— Residual Quantizer (ResidualQuantizer)- Multi-pass Lloyd's k-means on raw (un-normalised) residuals;
rayon-parallel subspace training - Adaptive zero-padding when
dim % m != 0; ~16–192× compression
- Multi-pass Lloyd's k-means on raw (un-normalised) residuals;
vectro_lib/src/auto_quantize.rs— Automatic format selection (auto_select_format)- Kurtosis-based routing: Gaussian → NF4→RQ→PQ→Scalar; heavy-tailed → PQ→RQ→NF4→Scalar
- Returns first format meeting
target_cosine ≥ 0.97ANDtarget_compression ≥ 8× QuantFormatenum (Nf4 | Rq | Pq | Scalar | Stream) withDisplayAutoQuantizeResultcarries the trainedProductQuantizerorResidualQuantizerwhen selected
EmbeddingDataset::load()now detects and decodesVECTRO+NF4STREAM1\nandVECTRO+RQSTREAM1\nheaders- NF4 stream record layout:
(id, packed: Vec<u8>, scale: f32)per vector - RQ stream record layout:
(id, codes: Vec<Vec<u8>>)per vector (one code slice per pass)
--format nf4— encode to NF4 4-bit stream--format rq— encode to Residual Quantizer stream--format auto— evaluate and select best format automatically--rq-passes N— number of residual passes (default 2)--rq-subspaces N— RQ subspaces per pass (default 8)
ProductQuantizer::compression_ratio()— new method returning(dim × 4) / m; used byauto_quantize
- NF4 cosine similarity ≥ 0.98 at dim=768 (contract: ≥ 0.98) ✅
- RQ cosine similarity ≥ 0.75 on 100 training vectors (contract: ≥ 0.75) ✅
- RQ compression ratio ≥ 30× (contract: ≥ 16×) ✅
- δ recall@10 vs vectro Python reference: pending GloVe-100d evaluation run
pyproject.tomlreplacessetup.pyas the authoritative build configuration- Build backend:
maturin>=1.5,<2.0; compiled extension lands atvectro_plus.vectro_py python-source = "python"— all Python source inpython/is packaged automatically- Supports Python 3.8–3.12;
abi3-py38stable ABI
python/vectro_plus/__init__.pyi— comprehensive PEP 561 stubs for the full public APIEmbedding,EmbeddingDataset,SearchIndex,QuantizedIndexcompress_embeddings,analyze_compression_quality,benchmark_search_performanceVectroConfig,create_index,create_quantized_index,search_similar,batch_searchload_embeddings_from_array,generate_quality_report,save_index,load_indexinfo,version,__version__,__author__,__description__
.github/workflows/ci.yml— runs on every push/PR:cargo test+cargo clippy -- -D warningson ubuntu-latestmaturin develop+pytest python/tests/on ubuntu-latest × macos-latest × Python 3.9/3.11/3.12
.github/workflows/release.yml— triggered onv*tags:- Builds manylinux x86_64 + aarch64 wheels via
PyO3/maturin-action@v1 - Builds macOS arm64 + x86_64 wheels
- Builds source distribution (
maturin sdist) - Publishes all artifacts to PyPI via OIDC trusted publishing
- Builds manylinux x86_64 + aarch64 wheels via
setup.py— superseded bypyproject.toml+ Maturin
vectro_lib,vectro_cli,vectro_pybumped to version 1.5.0__version__in the Rust extension updated to"1.5.0"__version__fallback in__init__.pyupdated to"1.5.0"
- Ground-truth recall@k and QPS evaluation for all search algorithms
- Evaluates brute-force (exact), HNSW, and PQ over the same query set
- Synthetic data generation:
--vectors N --dim Dwith deterministic xorshift64 PRNG (seed0xdeadbeef_cafebabe) — fully CI-reproducible, no randomness - External dataset support:
--dataset <path>(any Vectro binary format or JSONL) --save-reportwrites timestamped JSON tobenchmarks/results/- Soft recall gates: recall@10 ≥ 0.90 for HNSW and PQ (warns on failure, full table always printed)
pub fn recall_at_k(exact: &[String], approx: &[String], k: usize) -> f64- Set-intersection formula:
|approx_top_k ∩ exact_top_k| / k - Includes doc-test
scripts/run_benchmark.sh— build release binary and runbench-gtwith configurable paramsBENCHMARKS.md— methodology, parameter documentation, result tables, and JSON report schema
vectro_libversion bumped to 1.4.0vectro_cliversion bumped to 1.4.0
- Hierarchical Navigable Small World (HNSW) ANN index —
HnswIndexpublic struct HnswIndex::build(data, m, ef_construction, ef_search)— batch build, O(N·M·log N) averageHnswIndex::insert(&mut self, embedding)— incremental single-vector insertHnswIndex::search(query, k)→Vec<(String, f32)>sorted descending by cosine similarityHnswIndex::search_with_ef(query, k, ef)— explicit beam-width override at query timeHnswIndex::save(path)/HnswIndex::load(path)— bincode serialization; save/load roundtrip verified- Cosine similarity via L2-normalization on insert; inner product of unit vectors
- Custom xorshift64 PRNG for reproducible layer assignments — no external
randdep - Default parameters: M=16, ef_construction=200, ef_search=50
- Recall gate:
test_recall_at_10_gateenforces recall@10 ≥ 0.95 (1000 vectors, dim=64, 100 queries) pub use hnsw::HnswIndexre-exported fromvectro_libcrate root
vectro index build <dataset> <output>— build and persist HNSW index to disk--m N(default 16),--ef-construction N(default 200),--ef-search N(default 50)
vectro index search <query> --index <path>— ANN search against a saved index--top-k N(default 10),--ef Nto override search beam width at query time
POST /api/index/build— build HNSW from currently loaded embeddings; optional{"m", "ef_construction", "ef_search"}bodyPOST /api/index/search— ANN search; same{"query", "k"}body asPOST /api/search
hnsw_build_1kandhnsw_search_1kCriterion benchmarks added toquant_bench.rs
vectro_libandvectro_clibumped to version1.3.0
- Product Quantization (PQ) compression module —
vectro_lib/src/pq.rs ProductQuantizerstruct: train/encode/decode/search in a single serializable type- Compression: ≥ 16× vs raw f32 (e.g. 768d m=8 → 32× compression)
- Recall gate: recall@10 ≥ 0.90 enforced by test
test_pq_recall_at_10_gate - ADC search: Asymmetric Distance Computation for sub-linear approximate cosine search
- K-means training: deterministic centroid init, rayon-parallel per-subspace Lloyd's
- Vectors L2-normalized before encode/train; centroids L2-normalized after each update
EmbeddingDataset::load()readsVECTRO+PQSTREAM1files transparently
vectro compress --format pqwrites PQSTREAM1 output--pq-subspaces N(default 8): encoded bytes per vector; must dividedim--pq-centroids K(default 256): centroids per subspace (1–256)--format scalar/--format streamremain available;--quantizekept for back-compat
pq_encode,pq_decode,pq_adc_topkCriterion benchmarks inquant_bench.rs
QSTREAM.md— addedVECTRO+PQSTREAM1format specification
- Native Python bindings using PyO3 for zero-copy NumPy integration
- Complete Python package (
vectro_plus) with high-level API - Comprehensive Python test suite with quality analysis tools
- Performance benchmarking utilities directly from Python
- Example scripts and documentation for Python workflows
PyEmbedding,PyEmbeddingDataset- Core data structures with Pythonic interfacePySearchIndex,PyQuantizedIndex- Fast search indices with NumPy integrationcompress_embeddings()- One-line compression and indexinganalyze_compression_quality()- Quality metrics and compression analysisbenchmark_search_performance()- Performance profiling and timing tools
- Advanced setup.py with Cargo extension building
- Automatic Rust compilation during Python package installation
- Cross-platform support for Python packaging on macOS/Linux/Windows
- Build helper scripts for streamlined development workflow
- PyO3 configuration optimized for performance and memory safety
- Upgraded test coverage from 89 to 93 comprehensive tests
- Enhanced error handling with Python-friendly error messages
- Improved documentation with extensive Python integration examples
- Version synchronization across all crates and Python package
- API consistency between Rust core and Python wrapper interfaces
- Memory management optimized for Python/Rust interoperability
- Type safety with comprehensive PyO3 wrapper implementations
- ID-to-index mapping for efficient search result translation
- Comprehensive Python examples integrated into README
- Step-by-step installation guide for Python bindings
- Quality analysis tutorials showing compression trade-offs
- Performance benchmarking guide with interpretation examples
- Zero-copy operations between NumPy arrays and Rust data structures
- Efficient serialization using PyO3 and ndarray integration
- Thread-safe Python bindings supporting Python's GIL requirements
- Memory-efficient implementations with proper resource management
Migration Notes:
- Existing Rust API unchanged - full backward compatibility
- New Python package requires PyO3 and NumPy dependencies
- Python API mirrors Rust functionality with Pythonic conventions
- Expanded Test Coverage - Increased from 68.64% to 77.64% (+9%)
- Added 55 new unit tests for helper functions
- Added 6 new integration tests for compression workflows
- Comprehensive tests for delta calculation, JSON parsing, and data loading
- Total test count: 93 tests (all passing)
- Enhanced Test Documentation - Updated TEST_COVERAGE_REPORT.md with latest metrics
- Helper Function Tests - Complete coverage for:
- Delta percentage calculations
- JSON parsing utilities
- Benchmark name extraction
- Format delta HTML output
- Dataset loading with fallbacks
- Improved test reliability with comprehensive edge case coverage
- Better code quality metrics for production deployment
- Enhanced testing infrastructure for future maintainability
- Project Status & Roadmap - Added comprehensive status section to README
- v1.1 roadmap: Advanced quantization, GPU acceleration, Python bindings
- v1.2 roadmap: Distributed search, real-time streaming, cloud deployment
- v2.0 roadmap: Auto-tuning, federated learning, enterprise features
- Contribution Guidelines - Enhanced community participation guidance
- Next Steps Documentation - Clear guidance for developers, data engineers, and researchers
- Updated README with production-ready status badges
- Enhanced documentation structure with roadmap sections
- Improved feature documentation and examples
Vectro+ has achieved production-ready status with comprehensive features, optimized performance, and complete documentation.
- ✅ Complete Feature Set - Compression, quantization, search, web UI, REST API
- ✅ High Performance - Parallel processing, SIMD optimizations, streaming support
- ⚡ Fast Search - Sub-millisecond cosine similarity queries
- 📦 Efficient Compression - 75-90% size reduction with quantization
- 🌐 Web Dashboard - Beautiful interactive UI with real-time search
- 🔌 REST API - Production-ready HTTP endpoints
- 📊 Benchmarking - Criterion integration with HTML reports
- 🎨 Beautiful CLI - Progress bars, colored output, streaming logs
- 📖 Complete Documentation - Comprehensive guides and examples
Compression Performance:
- 10K × 128d: 180ms (5 MB dataset)
- 100K × 768d: 3.2s (300 MB dataset)
- 1M × 768d: 34s (3 GB dataset)
Search Performance:
- Top-10 search: 45-156 μs
- Top-100 search: 420 μs - 1.8 ms
- Parallel indexing enabled
Compression Ratios:
- Regular format (STREAM1): Original size preserved
- Quantized format (QSTREAM1): 75-90% size reduction
- Quality: Minimal accuracy loss (<0.5%)
-
Embedding Management
Embeddingstruct with ID and vector data- Support for arbitrary dimensions
- Efficient memory layout
-
Dataset Operations
Datasetstruct for collections of embeddings- Parallel processing with Rayon
- Batch operations
-
Search Index
SearchIndexfor fast similarity search- Cosine similarity computation
- Top-K results with configurable K
- Batch query support
-
Quantization
QuantizedIndexfor compressed storage- Scalar quantization (Int8)
- Per-dimension quantization tables
- Reconstruction with minimal error
-
Binary Formats
- STREAM1: Full precision format
- QSTREAM1: Quantized compressed format
- Streaming read/write support
- Bincode serialization
-
Compress Command
- Stream large datasets from JSONL
- Parallel pipeline processing
- Progress bars with ETA
- Optional quantization flag
- Multiple format support
-
Search Command
- Load compressed datasets
- Parse query vectors from CSV
- Top-K similarity search
- Formatted results output
-
Benchmark Command
- Criterion integration
- HTML report generation
- Summary tables with delta tracking
- Save reports to custom locations
- Open reports in browser
-
Serve Command (NEW in 1.0.0)
- Web server with Axum framework
- REST API endpoints
- Interactive dashboard UI
- Real-time search
- Drag-and-drop upload
- CORS support
- Health checks
-
📊 Dashboard
- Real-time statistics
- Dataset info display
- Performance metrics
- Beautiful gradient design
-
🔍 Search Interface
- Interactive query input
- Instant results
- Top-K configuration
- Result visualization
-
📤 Dataset Management
- Upload embeddings
- Load compressed datasets
- Format validation
- Progress tracking
-
Web Server (
servecommand)- HTTP server with Axum
- REST API for search and stats
- Interactive web dashboard
- Real-time search interface
- Static file serving
- CORS support
-
REST API Endpoints
GET /health- Health checkGET /api/stats- Dataset statisticsPOST /api/search- Search embeddingsPOST /api/upload- Upload datasetsPOST /api/load- Load compressed files
-
Enhanced CLI
- Progress bars with
indicatif - Colored output
- Streaming logs
- ETA calculations
- Progress bars with
-
Benchmark Improvements
- HTML report auto-generation
- Summary tables in terminal
- Delta tracking vs baseline
- Custom report locations
-
Documentation
- DEMO.md - Comprehensive examples
- QSTREAM.md - Binary format specification
- QUICKSTART_VIDEO.md - Video recording guide
- VIDEO_DEMO.md - Presentation scripts
- VISUAL_GUIDE.md - Web UI walkthrough
-
Parallel Processing
- Multi-threaded compression pipeline
- Rayon-based parallelism
- Configurable worker threads
- Optimal CPU utilization
-
Error Handling
- Comprehensive error types with
anyhow - Graceful error messages
- User-friendly CLI feedback
- Comprehensive error types with
-
Performance Optimizations
- SIMD operations where applicable
- Zero-copy operations
- Efficient memory allocation
- Streaming I/O for large files
vectro-plus/
├── vectro_lib/ # Core library
│ ├── src/lib.rs # Embedding, Dataset, SearchIndex, QuantizedIndex
│ └── benches/ # Criterion benchmarks
├── vectro_cli/ # CLI application
│ ├── src/
│ │ ├── lib.rs # Compression pipeline
│ │ └── main.rs # CLI commands + web server
│ └── tests/ # Integration tests
└── docs/ # Documentation
Comprehensive Test Coverage: 77.18% (504/653 lines)
- ✅ vectro_lib: 100% coverage (176/176 lines) - PERFECT
- ✅ vectro_cli/lib.rs: 100% coverage (129/129 lines) - PERFECT
- ✅ server.rs: 92.4% coverage (97/105 lines) - EXCELLENT
- ✅ main.rs: 42.0% coverage (102/243 lines) - Infrastructure-limited
Test Suite:
- 89 Total Tests (all passing)
- 71 Unit Tests
- 18 Integration Tests
- Core library tests
- CLI integration tests
- Quantization roundtrip tests
- Search accuracy tests
- Format compatibility tests
- Server integration tests
- Bench command infrastructure tests
Test Categories:
vectro_lib: 18 unit tests
vectro_cli/lib.rs: 4 unit tests
vectro_cli/main.rs: 49 unit tests
integration_cli: 5 tests
integration_compress: 1 test
integration_quantize: 1 test
integration_bench: 8 tests
integration_server: 3 tests
Total: 89 tests passing ✅
-
Core:
ndarray- N-dimensional arraysrayon- Data parallelismserde+bincode- Serializationnalgebra- Linear algebraanyhow- Error handling
-
CLI:
clap- Command-line parsingindicatif- Progress barsserde_json- JSON parsingcsv- CSV parsing
-
Web:
axum- Web frameworktokio- Async runtimetower-http- HTTP middleware
-
Benchmarking:
criterion- Statistical benchmarks
Ready for production use in:
- 🗄️ Vector Database Optimization - Compress embeddings by 75%+
- 🤖 RAG Pipeline Acceleration - Faster retrieval with smaller indexes
- 🔍 Semantic Search - Sub-millisecond similarity queries
- 📱 Edge Deployment - Smaller model footprints
- ☁️ Cloud Cost Reduction - 75-90% storage savings
- 🌐 Web Applications - REST API for integration
None - initial 1.0.0 release.
This is the first stable release. Installation:
# Build from source
git clone https://github.com/yourorg/vectro-plus
cd vectro-plus
cargo build --release
# Binary location
./target/release/vectro_cliFirst working version of Vectro+ with core functionality.
- Basic compression pipeline
- STREAM1 format support
- Quantization (QSTREAM1)
- Cosine similarity search
- CLI with compress and search commands
- Demo scripts
- Basic documentation
- Functional compression
- Search working
- Single-threaded processing
- Basic progress indicators
Enhanced Performance:
- GPU acceleration research
- Advanced SIMD optimizations
- Distributed processing support
Additional Features:
- Python bindings
- Additional quantization methods (PQ, OPQ)
- Approximate nearest neighbor algorithms
- Streaming search support
Cloud Integration:
- Docker containers
- Kubernetes deployment guides
- Cloud storage integration (S3, GCS, Azure)
Ecosystem:
- Vector database integrations (Qdrant, Weaviate, Pinecone)
- LangChain/LlamaIndex adapters
- OpenAI embedding format support
- Hugging Face integration
Monitoring:
- Prometheus metrics
- Distributed tracing
- Performance profiling tools
- 1.0.0 (2025-10-29) - Production ready
- 0.1.0 (2025-10-15) - Initial development release
- Homepage: https://github.com/yourorg/vectro-plus
- Documentation: See README.md and docs/
- Issues: https://github.com/yourorg/vectro-plus/issues
For detailed usage examples, see DEMO.md and QUICKSTART_VIDEO.md.