Skip to content
forked from ora-io/opml

OPML: OPtimistic Machine Learning on Blockchain

License

Notifications You must be signed in to change notification settings

Momentum-Research/opml

 
 

Repository files navigation

OPML: OPtimistic Machine Learning on Blockchain


OPML enables off-chain AI model inference using optimistic approach with an on chain interactive dispute engine implementing fault proofs.

Directory Layout

mlgo -- A tensor library for machine learning in pure Golang that can run on MIPS.
mlvm -- A MIPS runtime with ML execution
contracts -- A Merkleized MIPS processor on chain + the challenge logic

Building

Pre-requisites: Go, Node.js, Make, and CMake.

make build

Examples

The script files demo/challenge_simple.sh presents an example scenario (a DNN model for MNIST) demonstrating the whole process of a fault proof, including the challenge game and single step verification.

To test the example, we should first start a local node

npx hardhat node

Then we can run

sh ./demo/challenge_simple.sh

License

This code is MIT licensed.

Part of this code is borrowed from ethereum-optimism/cannon

Note: This code is unaudited. It in NO WAY should be used to secure any money until a lot more testing and auditing are done.

About

OPML: OPtimistic Machine Learning on Blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 60.2%
  • Go 21.6%
  • JavaScript 16.9%
  • Makefile 1.3%