OPML Technology Innovation: Efficient AI Model Inference and Training on Blockchain

robot
Abstract generation in progress

OPML: Optimistic Machine Learning Brings New Opportunities to Blockchain Systems

OPML( Optimistic Machine Learning) is an emerging technology that enables the inference and training of AI models on Blockchain systems. Compared to ZKML, OPML has the advantages of lower cost and higher efficiency. Even on a regular PC, large language models such as 7B-LLaMA( can run without a GPU, approximately 26GB).

OPML uses a verification game mechanism, similar to Truebit and optimistic rollup systems, to ensure the decentralization and verifiability of ML services:

  1. The requester initiates the ML service task.
  2. The server completes the task and submits the result to the blockchain.
  3. The validator checks the results, and if an error is found, the verification game is initiated.
  4. Final arbitration of smart contracts

OPML: Machine Learning using Optimistic Rollup System

Single-Stage Verification Game

The working principle of the single-stage precise positioning protocol is similar to the computation delegation (RDoC). In OPML:

  • Built a virtual machine for off-chain execution and on-chain arbitration (VM)
  • Implemented a dedicated lightweight DNN library to improve the inference efficiency of AI models.
  • Use cross-compilation technology to compile AI model inference code into VM instructions.
  • VM images are managed using a Merkle tree, with only the root hash uploaded to the blockchain.

Tests show that basic AI model inference can be completed within 2 seconds on a PC, and the entire challenge process can be completed within 2 minutes.

OPML: Machine Learning Using Optimistic Rollup System

Multi-Stage Verification Game

To overcome the limitations of single-stage protocols, a multi-stage protocol extension has been proposed:

  • Only the final stage is computed in the VM; other stages can be executed in the local environment.
  • Significantly improve performance using CPU, GPU, TPU, or even parallel processing.
  • Use Merkle tree to ensure the integrity and security of stage transitions.

Two-stage OPML method using the LLaMA model as an example:

  1. Second Stage: Conduct verification games on the computation graph, which can use multi-threaded CPU or GPU.
  2. Phase One: Convert single node computation into VM instructions

OPML: Machine Learning Using the Optimistic Rollup System

Performance Improvement

Multi-stage verification framework compared to single-stage OPML:

  • Calculation speed increased by α times ( α for GPU or parallel computing acceleration ratio )
  • The size of the Merkle tree reduces from O(mn) to O(m+n)

OPML: Machine Learning Using Optimistic Rollup System

Consistency and Determinism

To ensure the consistency of ML results, OPML adopts:

  1. Fixed-point algorithm ( quantization technique ): using fixed precision instead of floating-point numbers.
  2. Software-based floating point library: Ensure cross-platform consistency

These methods effectively address the challenges posed by floating-point variables and platform differences, enhancing the reliability of OPML calculations.

OPML is still under development, but it has already shown great potential. It not only supports model inference but also applies to the training process, providing a comprehensive solution for machine learning tasks on Blockchain systems.

OPML: Machine Learning Using Optimistic Rollup System

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 6
  • Repost
  • Share
Comment
0/400
WalletDetectivevip
· 08-13 21:24
No way, they've come up with a new concept again.
View OriginalReply0
ChainSpyvip
· 08-13 13:20
Huh? When will GPT-4 be available?
View OriginalReply0
GateUser-c799715cvip
· 08-11 20:46
Large models can run without a GPU, not bad, not bad.
View OriginalReply0
SolidityStrugglervip
· 08-10 22:43
Isn't it just a simplified version of TrueBit?
View OriginalReply0
PortfolioAlertvip
· 08-10 22:42
Regular machine garbage collection time
View OriginalReply0
Web3ProductManagervip
· 08-10 22:23
looking at user metrics, opml could be a major friction reducer for web3 ai adoption... ngl the tpm potential here is insane
Reply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)