Explore ML in Cairo 1.0
Build neural network models in Cairo 1.0 to perform inference.
The calculations are performed using i33
values, and the outcomes are quantized into 8 bits based on the ONNX standard for symmetric quantization.
Installation
Follow the auditless/cairo-template
instructions.
How to use it?
Build
Build the code.
$ make build
Test
Run the tests in src/tests
:
$ make test
Features
Layers
- Linear
- Conv2d
- MaxPool2d
Activations
- ReLu
- Softmax
Math
Matrix
- Matrix representation
- Matrix dot vector
- Slice matrix
Vector
- Sum vectors
- Dot vectors
- Find in vectors
- Slice vector
- Concat vectors
Signal
- Valid 2D cross-correlation
Performance
Quantizations
- 8-bit symmetric quantization
TODO
- MNIST example
- more
Credits
- Zacharie Cohen, for his help.
- cubit for the fixed point lib.
- circomlib-ml for the inspiration.
- GuiltyGyoza for the inspiration.
- Franalgaba for the inspiration.
- Modulus-Labs for the inspiration.
- Auditless for this great cairo-template.
- The Quaireaux the unofficial cairo doc
😅 .