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.
The AOS-playground offers Consistency capabilities through OPML. OPML can verify the results of Inference tasks and detect if a node is not functioning correctly.
Step 1:Setting up
select model

Temperature in large language models refers to a sampling parameter that controls the randomness of the model's output. Its value ranges from 0 to 1. Lower temperature values (closer to 0) produce more predictable and repetitive outputs, while higher temperature values (closer to 1) increase the diversity and creativity of the generated text but may also introduce more incoherence or irrelevance.
Step 2:OPML
prompt
please input Inference prompt word

On OPML Node 1
On OPML Node 2
Tensor data root hash
~
~
OPML leverages the MNIST and MLVM frameworks, which can reduce the random seed variability. With the same input, it will always generate the same output. Based on this logic, we can design a challenge system to verify the consistency and correctness of the model's outputs
Step 3:Challenge
prompt
please input Inference prompt word

On OPML Node 3
On OPML Node 4
Tensor data root hash
~
~
As you can observe, the results are different. This allows the challenger to penalize or slash the rewards of malicious nodes. The challenge flow is illustrated below.