You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Torchhd is a Python library for *Hyperdimensional Computing* (also known as *Vector Symbolic Architectures*).
17
+
Torchhd is a Python library for _Hyperdimensional Computing_ (also known as _Vector Symbolic Architectures_).
18
18
19
-
***Easy-to-use:** Torchhd makes it painless to develop a wide range of Hyperdimensional Computing (HDC) applications and algorithms. For someone new to the field, we provide Pythonic abstractions and examples to get you started fast. For the experienced researchers, we made the library modular by design, giving you endless flexibility to prototype new ideas in no-time.
20
-
***Performant:** The library is build on top of the high-performance [PyTorch](https://pytorch.org/) library, giving you optimized tensor execution without the headaches. Moreover, PyTorch makes it effortless to accelerate your code on a GPU.
19
+
-**Easy-to-use:** Torchhd makes it painless to develop a wide range of Hyperdimensional Computing (HDC) applications and algorithms. For someone new to the field, we provide Pythonic abstractions and examples to get you started fast. For the experienced researchers, we made the library modular by design, giving you endless flexibility to prototype new ideas in no-time.
20
+
-**Performant:** The library is build on top of the high-performance [PyTorch](https://pytorch.org/) library, giving you optimized tensor execution without the headaches. Moreover, PyTorch makes it effortless to accelerate your code on a GPU.
This example is from the paper [What We Mean When We Say "What's the Dollar of Mexico?": Prototypes and Mapping in Concept Space](https://redwood.berkeley.edu/wp-content/uploads/2020/05/kanerva2010what.pdf) by Kanerva. It first creates hypervectors for all the symbols that are used in the computation, i.e., the variables for `country`, `capital`, and `currency` and their values for both countries. These hypervectors are then combined to make a single hypervector for each country using a hash table structure. A hash table encodes key-value pairs as: `k1 * v1 + k2 * v2 + ... + kn * vn`. The hash tables are then bound together to form their combined representation which is finally queried by binding with the Dollar hypervector to obtain the approximate Mexican Peso hypervector. The similarity output shows that the Mexican Peso hypervector is indeed the most similar one.
88
88
89
89
## Supported HDC/VSA models
90
+
90
91
Currently, the library supports the following HDC/VSA models:
@@ -109,8 +110,9 @@ We are always looking for people that want to contribute to the library. If you
109
110
### Documentation
110
111
111
112
To build the documentation locally do the following:
112
-
1. Use `pip install -r docs/requirements.txt` to install the required packages.
113
-
2. Use `sphinx-build -b html docs build` to generate the html documentation in the `/build` directory.
113
+
114
+
1. Use `pip install -r docs/requirements.txt` to install the required packages.
115
+
2. Use `sphinx-build -b html docs build` to generate the html documentation in the `/build` directory.
114
116
115
117
To create a clean build, remove the `/build` and `/docs/generated` directories.
116
118
@@ -123,6 +125,7 @@ To create a clean build, remove the `/build` and `/docs/generated` directories.
123
125
### Running tests
124
126
125
127
To run the unit tests located in [`torchhd/tests`](https://github.com/hyperdimensional-computing/torchhd/tree/main/torchhd/tests) do the following:
128
+
126
129
1. Use `pip install -r dev-requirements.txt` to install the required development packages.
127
130
2. Then run the tests using just `pytest`.
128
131
@@ -134,7 +137,6 @@ This library is [MIT licensed](https://github.com/hyperdimensional-computing/tor
134
137
135
138
To add the license to all source files, first install [`licenseheaders`](https://github.com/johann-petrak/licenseheaders) and then use `licenseheaders -t ./LICENSE -d ./torchhd`.
136
139
137
-
138
140
## Cite
139
141
140
142
Consider citing [our paper](https://jmlr.org/papers/v24/23-0300.html) published in the Journal of Machine Learning Research (JMLR) if you use Torchhd in your work:
0 commit comments