Skip to content
yangzhPublic

About

Sparse binary hypervectors and associated learners.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

2 watching

Forks

Repository files navigation

hv

Docs PyPI Python License

Public release of sparse binary hypervectors and associated learners, powered by the kongming-rs-hv package.

Installation

pip install kongming-rs-hv

Supports Linux, macOS, and Windows on Python 3.10–3.14.

Featured: the Dependency Parser

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.

Documentation

Full documentation is available at yangzh.github.io/hv, including:

Try Online

Platform Link
Browser — parse a sentence in WebAssembly, no install yangzh.github.io/hv/demo/wasm
Colab — tutorial walkthrough Open In Colab
Colab — hypervector storage Open In Colab
Colab — VSA LISP interpreter Open In Colab
Binder Binder

Applications

Runnable scripts under examples/ including:

See the examples index for walkthroughs.

Community

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.

References

Yang, Zhonghao (2023). Cognitive modeling and learning with sparse binary hypervectors. arXiv:2310.18316 [cs.AI]

License

The Python source code, examples, and documentation in this repository are licensed under the MIT License.

About

Sparse binary hypervectors and associated learners.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages