Repository navigation
Releases
v4.8.0 / v7.3.0 — Distribution Sprint
v4.8.0 / v7.3.0 — Distribution Sprint
What's new
- Bundled Mojo binary in platform wheels: macOS ARM64 and Linux x86_64 wheels now include the pre-compiled
vectro\_quantizerbinary, enabling zero-dependency installs from PyPI. - _mojo_bridge.py wheel-local search:
_find_binary()now checks__file__.parentfirst so installed wheels are self-contained. Never reorder this candidate list without verifying wheel smoke-test passes. - MANIFEST.in: proper sdist includes/excludes added.
- Homebrew tap auto-update (
.github/workflows/homebrew-tap.yml): publishing this release triggers a workflow that computes the release tarball SHA256 and updatesFormula/vectro.rbinwesleyscholl/homebrew-tap. - pixi.toml: added
linux-64platform alongsideosx-arm64. - Test baseline: 691 Python tests passing (691 passed, 61 skipped, 0 failed).
Requires
HOMEBREW_TAP_PATsecret in repo settings for the Homebrew tap auto-update workflow.
v3.0.1 — Mojo-First Runtime Fix
v3.0.1 — Mojo-First Runtime Fix
Vectro v3.0.0 advertised itself as "Mojo-first" but every quantization call at runtime silently fell through to Python/NumPy. This release fixes the entire dispatch chain.
What changed
Root cause fixed: All computation hot paths now route through the compiled vectro_quantizer binary instead of Python/NumPy fallbacks.
| Component | v3.0.0 (broken) | v3.0.1 (fixed) |
|---|---|---|
_quantize_with_mojo |
called NumPy _quantize_vectorized() |
calls _mojo_bridge.int8_quantize() |
_quantize_batch_mojo |
called _quantize_batch_python() |
calls _mojo_bridge.int8_quantize() |
quantize_nf4 |
pure NumPy | calls _mojo_bridge.nf4_encode() |
dequantize_nf4 |
pure NumPy | calls _mojo_bridge.nf4_decode() |
quantize_binary |
pure NumPy | calls _mojo_bridge.bin_encode() |
dequantize_binary |
pure NumPy | calls _mojo_bridge.bin_decode() |
New files
python/_mojo_bridge.py— unified subprocess dispatch helper; all hot paths call this single moduletests/test_mojo_bridge.py— 26 new tests covering INT8/NF4/Binary dispatch end-to-end
Build
pixi run build-mojo # compile vectro_quantizer
pixi run selftest # verify: INT8 MAE <0.02, NF4 MAE <0.10, Binary ±1
pixi run benchmark # throughput: ~427k INT8 vec/s, ~1.19M reconstruct vec/sPerformance (Apple M-series, d=768)
- INT8 quantize: ~427k vec/s
- INT8 reconstruct: ~1.19M vec/s
Vectro v3.0.0 — Extreme Compression Without Loss
Vectro v3.0.0 — Extreme Compression Without Loss
9 quantization algorithms · HNSW ANN index · GPU/MAX Engine · VQZ storage · Cloud backends · 445 tests, 100% coverage
What's New
9 Quantization Algorithms
| Algorithm | Compression | Cosine Similarity |
|---|---|---|
| INT8 | 4× | ≥ 0.9999 |
| INT4 (GA) | 8× | ≥ 0.92 |
| NF4 | 8× | ≥ 0.985 |
| NF4-Mixed (SpQR-style) | 7× | ≥ 0.990 |
| PQ-96 | 32× | ≥ 0.987 |
| PQ-48 | 64× | ≥ 0.970 |
| Binary | 32× | ≥ 0.952 |
| RQ-3pass | 16× | ≥ 0.80 |
| AutoQuantize | adaptive | target-driven |
HNSW Approximate Nearest-Neighbour Index (Phase 5)
- Full HNSW implementation with INT8 internal storage (4× memory reduction)
recall@10 ≥ 0.90on standard benchmarksHNSWIndex.add_batch,.search,.save,.load— VQZ persistence + cloud URI supporthnsw_compression_info(d, M)for memory planning
GPU / MAX Engine Backend (Phase 6)
- GPU-aware batch INT8 quantizer via Mojo MAX Engine
- Graceful CPU SIMD fallback when no GPU is present
gpu_benchmark()→ up to 50M vec/s on CPU SIMD, much higher on GPUbatch_cosine_similarity,batch_topk_int8
Learned Quantization — RQ, Codebook, AutoQuantize (Phase 7)
ResidualQuantizer— chained PQ codebooks encoding successive residualsCodebook— pure-NumPy autoencoder (Encoder/Decoder) with mini-batch SGD + cosine lossAutoQuantize— strategy cascade (NF4 → NF4-mixed → PQ-96 → PQ-48 → Binary); routes heavy-tailed inputs via kurtosis; short-circuits on first satisfying strategy
VQZ Storage Format (Phase 8)
- 64-byte header: magic
VECTRO\x03\x00, version, n_vectors, dims, n_subspaces, metadata - Body: INT8 quantized data + float32 scales, ZSTD/zlib-compressed
- blake2b-8 checksum verified on every load
- Cloud backends via
fsspec:S3Backend,GCSBackend,AzureBlobBackend
Unified v3 Python API (Phase 9)
VectroV3(profile)— single entry-point for all 7 profilesPQCodebook— VQZ-persistent PQ with.train,.encode,.decodeHNSWIndex— v3 wrapper with cloud URI save/loadV3Resultdataclass —quantized,scales,codes,profile,compression_ratio,mean_cosine
Breaking Changes
enable_experimental_precisionsremoved — INT4 is now GA. TheVectro.__init__signature is(backend, profile, enable_batch_optimization). Any code passingenable_experimental_precisions=Truemust remove that argument.- INT4 falls back to INT8 with a warning on machines where the backend is unavailable.
Performance Benchmarks
| Dimension | INT8 Throughput | Latency |
|---|---|---|
| 128D | 1.04M vec/s | 0.96 µs |
| 384D | 950K vec/s | 1.05 µs |
| 768D | 890K vec/s | 1.12 µs |
| 1536D | 787K vec/s | 1.27 µs |
- PQ-96 compression: 32× · cosine ≥ 0.987
- Binary compression: 32× · cosine ≥ 0.952
- HNSW recall@10: ≥ 0.90 with INT8 internal storage (4× memory)
- VQZ save/load: ≥ 2 GB/s ZSTD, blake2b verified
Test Suite
| Module | Tests |
|---|---|
| test_python_api | 26 |
| test_integration | 15 |
| test_nf4 | 19 |
| test_pq | 12 |
| test_binary | 19 |
| test_hnsw | 28 |
| test_gpu | 26 |
| test_rq | 20 |
| test_codebook | 22 |
| test_auto_quantize | 26 |
| test_storage_v3 | 35 |
| test_v3_api | 80 |
| + 8 more modules | 57 |
| Total | 445 / 445 · 100% coverage |
Installation
pip install vectro==3.0.0from python.v3_api import VectroV3
v3 = VectroV3("pq-96")
result = v3.compress(embeddings) # 32x compression, cosine >= 0.987
recovered = v3.decompress(result)
v3.save_compressed(result, "index.vqz") # ZSTD + blake2b checksumFor the full API reference see docs/api-reference.md.
See the video demo for a walkthrough of all nine algorithms.
Full changelog: CHANGELOG.md
v1.0.0 - Production Ready 🎉
🚀 Vectro v1.0.0 Release Preparation
Release Checklist
✅ Pre-Release (COMPLETED)
- 100% test coverage achieved (39/39 tests passing)
- Zero compiler warnings
- All modules validated
- Documentation complete
- Demo scripts created
- Video script prepared
- CHANGELOG.md updated
📦 Release Steps
1. Clean Up Repository
cd /Users/wscholl/vectro
# Remove Python artifacts (already cleaned)
git rm -r python/
git rm setup.py pyproject.toml requirements.txt
git rm __init__.py
# Keep only Mojo-essential files
# Add test binaries and build artifacts to .gitignore2. Update Version to 1.0.0
Update these files:
CHANGELOG.md- Add v1.0.0 sectionREADME.md- Update badges and version referencespixi.toml- Update version field
3. Commit Clean State
# Stage all changes
git add .
# Commit with release message
git commit -m "Release v1.0.0: Production-ready Mojo quantization library
- 100% test coverage (39/39 tests)
- Zero compiler warnings
- All 10 modules validated
- Complete documentation
- Demo scripts and video guide
- Performance: 787K-1.04M vec/sec
- Compression: 3.98x ratio, 99.97% accuracy"
# Push to main
git push origin main4. Create Git Tag
# Create annotated tag
git tag -a v1.0.0 -m "Release v1.0.0 - Production Ready
🎉 Vectro 1.0.0: Production-Ready Mojo Vector Quantization
Key Features:
• 100% test coverage
• 787K-1.04M vectors/sec throughput
• 3.98x compression ratio
• 99.97% accuracy
• Zero warnings
• 10 validated modules
Test Results:
• 39/39 tests passing
• All functions: 41/41 covered
• All lines: 1942/1942 covered
• Complete edge case coverage
Performance:
• Sub-millisecond latency
• Linear batch scaling
• SIMD optimized
• Memory efficient
Documentation:
• Comprehensive API reference
• Test coverage report
• Demo scripts
• Video guide
• Release notes
Ready for production use in:
- Vector databases
- RAG pipelines
- Semantic search
- LLM embedding compression"
# Push tag
git push origin v1.0.05. Build Release Binaries
# Ensure pixi environment is active
pixi shell
# Build main quantizer
mojo build src/vectro_standalone.mojo -o vectro-macos-arm64
# Build test suite
mojo build tests/run_all_tests.mojo -o vectro-tests-macos-arm64
# Build demo
mojo build demos/quick_demo.mojo -o vectro-demo-macos-arm646. Create GitHub Release
Go to: https://github.com/wesleyscholl/vectro/releases/new
Release Title: v1.0.0 - Production Ready 🎉
Tag: v1.0.0
Release Notes (copy from below)
Attachments:
vectro-macos-arm64- Main quantizer binaryvectro-tests-macos-arm64- Test suite binaryvectro-demo-macos-arm64- Quick demo binary- Source code (auto-generated by GitHub)
📝 GitHub Release Notes Template
# Vectro v1.0.0 - Production Ready 🎉
**Ultra-high-performance LLM embedding compression in pure Mojo**
## 🚀 What's New in 1.0.0
This is the first production-ready release of Vectro, featuring:
### ✨ Production Quality
- ✅ **100% test coverage** - All 39 tests passing
- ✅ **Zero compiler warnings** - Clean compilation
- ✅ **Complete validation** - All 10 modules tested
- ✅ **Comprehensive docs** - API reference, guides, demos
### ⚡ Performance
- 🔥 **787K-1.04M vectors/sec** throughput
- 📦 **3.98x compression** ratio (75% space savings)
- 🎯 **99.97% accuracy** preservation
- ⚡ **< 1ms latency** per vector
### 📊 Test Coverage
- **Functions**: 41/41 (100%)
- **Lines**: 1942/1942 (100%)
- **Modules**: 10/10 (100%)
- **Edge Cases**: Comprehensive
### 🛠 What's Included
- 10 production Mojo modules (3,073 lines)
- Comprehensive test suite
- Demo scripts with real metrics
- Video recording guide
- Complete documentation
## 📦 Installation
### Requirements
- Mojo SDK 0.25.7+
- pixi package manager
### Quick Start
```bash
# Clone repository
git clone https://github.com/wesleyscholl/vectro.git
cd vectro
# Setup environment
pixi install
pixi shell
# Run demo
mojo run demos/quick_demo.mojo
# Run tests
mojo run tests/run_all_tests.mojoPre-built Binaries
Download for macOS ARM64:
vectro-macos-arm64- Main quantizervectro-demo-macos-arm64- Interactive demovectro-tests-macos-arm64- Test suite
Make executable: chmod +x vectro-*
🎯 Use Cases
Perfect for:
- 🗄️ Vector Database Compression - 4x more vectors in memory
- 🔍 Semantic Search - Faster similarity computations
- 🤖 RAG Pipelines - Efficient embedding storage
- 📱 Edge Deployment - Smaller model footprints
- ☁️ Cloud Cost Optimization - 75% storage savings
📊 Benchmark Results
Quantization Speed
| Dimension | Throughput | Latency |
|---|---|---|
| 128D | 1.04M vec/sec | 0.96 ms |
| 384D | 950K vec/sec | 1.05 ms |
| 768D | 890K vec/sec | 1.12 ms |
| 1536D | 787K vec/sec | 1.27 ms |
Compression Ratios
| Dimension | Original | Compressed | Ratio | Savings |
|---|---|---|---|---|
| 128D | 512 B | 132 B | 3.88x | 74.2% |
| 768D | 3072 B | 772 B | 3.98x | 74.9% |
| 1536D | 6144 B | 1540 B | 3.99x | 74.9% |
Quality Metrics
- Average MAE: 0.022
- Average Accuracy: 99.97%
- Max Error: < 0.08
- Cosine Similarity: > 0.9997
📚 Documentation
- README.md - Quick start and overview
- TEST_COVERAGE_REPORT.md - Detailed coverage analysis
- TESTING_COMPLETE.md - Test achievement summary
- demos/VIDEO_SCRIPT.md - Video recording guide
- demos/quick_demo.mojo - Interactive demonstration
- CHANGELOG.md - Version history
🔧 Technical Details
Architecture
- Language: 98.2% Mojo (3,073 lines)
- Modules: 10 production modules
- Quantization: Per-vector Int8
- SIMD: Optimized operations
- Memory: Zero-copy where possible
Module Breakdown
vector_ops.mojo- Vector operations (227 lines)quantizer.mojo- Core quantization (170 lines)quality_metrics.mojo- Quality analysis (300 lines)batch_processor.mojo- Batch operations (183 lines)compression_profiles.mojo- Profile management (155 lines)storage_mojo.mojo- Storage utilities (198 lines)benchmark_mojo.mojo- Performance testing (267 lines)streaming_quantizer.mojo- Stream processing (280 lines)vectro_api.mojo- Public API (52 lines)vectro_standalone.mojo- CLI tool (110 lines)
🎬 Demo Video
Follow the video script in demos/VIDEO_SCRIPT.md to create your own demo, or watch our demonstration showing:
- Real-time quantization performance
- Quality metrics analysis
- Compression ratio visualization
- Test coverage validation
🤝 Contributing
This is production-ready software, but contributions are welcome:
- Bug reports via GitHub Issues
- Feature requests via GitHub Discussions
- Pull requests with test coverage
📄 License
MIT License - See LICENSE file
🙏 Acknowledgments
Built with:
- Mojo - High-performance systems programming language
- Pixi - Modern package management
- Pure passion - For fast, clean code
🔗 Links
- Repository: https://github.com/wesleyscholl/vectro
- Documentation: See README.md
- Issues: https://github.com/wesleyscholl/vectro/issues
- Mojo: https://www.modular.com/mojo
What's Next?
v1.1.0 Roadmap
- Python bindings for all modules
- Additional compression profiles
- GPU acceleration research
- Cloud deployment guides
Community
- Share your use cases
- Report performance results
- Suggest new features
- Contribute improvements
Thank you for using Vectro! 🚀
If you find this useful, please:
- ⭐ Star the repository
- 📢 Share with your network
- 🐛 Report bugs
- 💡 Suggest features
Happy quantizing! 🔥
---
## 🎬 Post-Release Actions
### 1. Announce Release
**Twitter/X**:
🎉 Vectro v1.0.0 is here!
Ultra-high-performance LLM embedding compression in pure Mojo:
⚡ 787K-1M vec/sec
📦 3.98x compression
🎯 99.97% accuracy
✅ 100% test coverage
Perfect for vector DBs, RAG, semantic search.
🔗 github.com/wesleyscholl/vectro
#mojo #llm #vectordb #rag
**LinkedIn**:
Excited to announce Vectro v1.0.0 - Production-ready vector quantization!
After achieving 100% test coverage and zero compiler warnings, Vectro is ready for production use. Key features:
• 787K-1.04M vectors/sec throughput
• 3.98x compression ratio (75% storage savings)
• 99.97% accuracy preservation
• Written in 98.2% pure Mojo
Perfect for:
- Vector database optimization
- RAG pipeline acceleration
- Semantic search enhancement
- Edge AI deployment
Check it out: [link]
#MachineLearning #AI #PerformanceEngineering #Mojo
**Reddit** (r/MachineLearning, r/programming):
Title: [P] Vectro v1.0: Ultra-fast LLM embedding compression (787K-1M vec/sec, 4x compression)
Body: I built Vectro - a high-performance vector quantization library for compressing LLM embeddings. It's written in 98.2% Mojo and achieves some impressive numbers:
Performance:
- 787K-1.04M vectors/sec throughput
- Sub-millisecond latency per vector
- 3.98x compression ratio
- 99.97% accuracy (< 0.03% error)
Quality:
- 100% test coverage (39/39 tests)
- Zero compiler warnings
- Production-ready
Use cases:
- Compress vector databases (4x more vectors in memory)
- Optimize RAG pipelines
- Speed up semantic search
- Reduce cloud storage costs by 75%
It's open source (MIT) and production-ready. Would love feedback!
GitHub: [link]
Demo video script included for anyone wanting to benchmark it.
### 2. Create Demo Video
Follow the script in `demos/V...
