Public release of sparse binary hypervectors and associated learners, powered by the kongming-rs-hv package.
pip install kongming-rs-hvSupports Linux, macOS, and Windows on Python 3.10–3.14.
The library's flagship application: a multilingual dependency parser (English + Chinese) in which the entire language model is a hypervector substrate — 19 MB on disk for both languages, trained in a single pass, in minutes, on a laptop, with no GPUs and no gradients. Decoding is Viterbi retrieval over superposed states, and every decision along the way is an integer you can print and inspect.
Start with the Overview, then Training, Decoding, and the measured Evaluations.
Full documentation is available at yangzh.github.io/hv, including:
- Concepts — hypervectors, models, composites, operators, constant-time near-neighbor search
- Dependency Parser — a multilingual parser whose language model is a 19 MB hypervector substrate
- API Reference — Python, Go, and Rust side by side
- Python Quick Start — installation, examples, and notebooks
- Notebook Quick Start — cell-by-cell Jupyter walkthrough
- PDF download
| Platform | Link |
|---|---|
| Browser — parse a sentence in WebAssembly, no install | yangzh.github.io/hv/demo/wasm |
| Colab — tutorial walkthrough | |
| Colab — hypervector storage | |
| Colab — VSA LISP interpreter | |
| Binder |
Runnable scripts under examples/ including:
- Mexican Dollar: analogical reasoning;
- Word Indexer: suffix-queryable word indexing;
- Bulk Storage: storage benchmarks;
- Operators from Scratch: the math underneath the library;
- LISP Interpreter: where every value is a hypervector.
See the examples index for walkthroughs.
Questions, ideas, or feedback? Visit GitHub Discussions for announcements, Q&A, and general conversation. For bugs, please use Issues.
For private inquiries, use the contact form.
Yang, Zhonghao (2023). Cognitive modeling and learning with sparse binary hypervectors. arXiv:2310.18316 [cs.AI]
The Python source code, examples, and documentation in this repository are licensed under the MIT License.