| Crates.io | embeddenator-vsa |
| lib.rs | embeddenator-vsa |
| version | 0.20.1 |
| created_at | 2026-01-09 22:18:33.836524+00 |
| updated_at | 2026-01-25 18:27:53.2103+00 |
| description | Vector Symbolic Architecture operations for sparse ternary representations |
| homepage | |
| repository | https://github.com/tzervas/embeddenator-vsa |
| max_upload_size | |
| id | 2032990 |
| size | 7,831,171 |
Vector Symbolic Architecture (VSA) operations for sparse and dense balanced ternary representations.
Independent component extracted from the Embeddenator monolithic repository. Part of the Embeddenator workspace.
Phase 2A Component Extraction - Production-ready independent component.
Current Version: v0.20.0-alpha.1
Repository: https://github.com/tzervas/embeddenator-vsa
✅ Core VSA Operations: Bundle, bind, permute
✅ Bitsliced Ternary: Optimized 2-bits-per-trit representation
✅ Sparse & Dense: Adaptive representation (SparseVec / PackedTritVec)
✅ SIMD-Ready: Word-level parallelism with auto-vectorization
✅ Well-Tested: 53 tests passing (unit + integration + doc tests)
📋 Explicit SIMD: Planned for v0.21.0 (AVX2, NEON)
📋 GPU Acceleration: Planned for v1.1.0 (CUDA, OpenCL)
use embeddenator_vsa::{SparseVec, ReversibleVSAConfig};
// Encode data to hypervectors
let config = ReversibleVSAConfig::default();
let vec1 = SparseVec::encode_data(b"hello", &config, None);
let vec2 = SparseVec::encode_data(b"world", &config, None);
// Bundle (superposition)
let bundled = vec1.bundle(&vec2);
// Bind (association)
let bound = vec1.bind(&vec2);
// Compute similarity
let similarity = vec1.cosine(&vec2);
println!("Similarity: {:.3}", similarity);
[dependencies]
embeddenator-vsa = { git = "https://github.com/tzervas/embeddenator-vsa", tag = "v0.1.0" }
# Build
cargo build
# Run tests
cargo test
# Run tests with all features
cargo test --all-features
# Check code quality
cargo clippy --all-features -- -D warnings
# For cross-repo work, use Cargo patches:
# Add to Cargo.toml:
# [patch."https://github.com/tzervas/embeddenator-vsa"]
# embeddenator-vsa = { path = "../embeddenator-vsa" }
SparseVec: For sparse vectors (< 25% density)
PackedTritVec: For dense vectors (≥ 25% density)
See Ternary Representation Guide for detailed comparison.
Note: Performance characteristics are theoretical and depend on hardware, data patterns, and compiler optimizations. Run
cargo benchto measure on your specific system.
See IMPLEMENTATION_PLAN.md for complete roadmap.
See CONTRIBUTING.md for contribution guidelines.
MIT