The more futuristic concept of AI for smart contracts, which eventually can be used to build and run AI DApps and decentralized autonomous organizations (DAOs) in such a way that they can adapt and evolve to complete tasks with very limited human intervention is also very interesting.
A project called Cortex claims to be the first blockchain to support on-chain AI. They've managed to deploy a couple of AI models on their testnet using techniques such as quantization and compression. Quantization is a concept in machine learning that combines lightweight inference with high performance, which allows AI models to be executed with high levels of accuracy and low memory costs:
![](https://static.packt-cdn.com/products/9781789956023/graphics/assets/f0c42a83-e8b6-43b6-83d4-91ab61ce7d50.png)
The inference process works as follows:
![](https://static.packt-cdn.com/products/9781789956023/graphics/assets/c4cda166-fe07-49ad-8df1-ae3ac9512377.png)
Compression reduces the size and data usage of models. The first model, a Cat or Dog classifier, was originally over 500 MB in...