opml  by ora-io

Optimistic ML inference on blockchain

created 2 years ago
309 stars

Top 88.0% on sourcepulse

GitHubView on GitHub
Project Summary

OPML (Optimistic Machine Learning on Blockchain) provides a framework for executing AI model inference off-chain with on-chain dispute resolution, enabling verifiable machine learning on blockchain. It targets developers and researchers looking to integrate AI capabilities into decentralized applications with a robust fault-proofing mechanism.

How It Works

OPML utilizes an optimistic execution model where off-chain computations are assumed correct until challenged. An on-chain interactive dispute engine implements fault proofs, allowing any party to challenge an incorrect inference. This approach leverages a custom Golang tensor library (mlgo) and a MIPS runtime (mlvm) for efficient execution, with plans for ZK fault proofs and GPU acceleration.

Quick Start & Requirements

  • Install: git clone git@github.com:hyperoracle/opml.git --recursive followed by make build.
  • Prerequisites: Go (1.19+), Node.js, Make, CMake.
  • Example: Run npx hardhat node then bash ./demo/challenge_simple.sh.
  • Docs: project wiki, MNIST tutorial.

Highlighted Details

  • Supports DNN for MNIST and LLaMA models.
  • Includes an example for LLaMA and LLaMA 2 on a separate branch.
  • Roadmap includes general DNN (ONNX), traditional ML, ZK fault proofs, and GPU acceleration.
  • Core components: mlgo (Golang tensor library), mlvm (MIPS runtime), contracts (on-chain logic).

Maintenance & Community

The project is actively under development with several features marked as "Work In Progress" or "Pending". Specific contributors or community channels are not detailed in the README.

Licensing & Compatibility

MIT licensed. Parts of the code are borrowed from ethereum-optimism/cannon.

Limitations & Caveats

The code is unaudited and should not be used for securing funds without extensive testing and auditing. Support for general DNN models, traditional ML algorithms, training, fine-tuning, ZK fault proofs, GPU acceleration, and a user-friendly SDK are still in progress.

Health Check
Last commit

7 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Nat Friedman Nat Friedman(Former CEO of GitHub), and
32 more.

llama.cpp by ggml-org

0.4%
84k
C/C++ library for local LLM inference
created 2 years ago
updated 14 hours ago
Feedback? Help us improve.