Skip to content

ora-io/opml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2fa4331 Β· Dec 11, 2024

History

21 Commits
Oct 23, 2023
Jul 7, 2023
Oct 23, 2023
Nov 14, 2024
Oct 23, 2023
Jul 16, 2023
Jul 7, 2023
Jul 7, 2023
Jul 7, 2023
Jul 7, 2023
Jul 8, 2023
Jul 7, 2023
May 21, 2024
Jul 7, 2023
Oct 23, 2023
Oct 23, 2023
Jul 7, 2023
Oct 23, 2023
Oct 23, 2023
Oct 23, 2023

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.

For more in-depth information, refer to the project wiki.

You can also find a tutorial on building a straightforward handwritten digit recognition DNN model (MNIST) within OPML in the docs/tutorial.md.

Building

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

git clone [email protected]:hyperoracle/opml.git --recursive
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:

bash ./demo/challenge_simple.sh

A large language model, the llama example is provided in the branch "llama" (It also works for llama 2).

Roadmap

πŸ”¨ = Pending

πŸ›  = Work In Progress

βœ… = Feature complete

Feature Status
Supported Model
DNN for MNIST βœ…
LLaMA βœ…
General DNN Model (Onnx Support) πŸ› 
Traditional ML Algorithm (Decision Tree, KNN etc) πŸ”¨
Mode
Inference βœ…
Training πŸ”¨
Fine-tuning πŸ”¨
Optimization
ZK Fault Proof with zkOracle and zkWASM πŸ› 
GPU Acceleration πŸ› 
High Performance VM πŸ› 
Functionality
User-Friendly SDK πŸ› 

Project Structure

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

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.