Skip to main content

Decentralized AI

Train and run AI models as smart contracts fully onchain to benefit from the security, resilience, and computation power of the ICP blockchain.

Start building on Internet Identity

A recent study on AI finds that nearly half of the respondents (49%) are concerned about the misuse of AI for nefarious purposes.

Survey in the Artificial Intelligence Index Report 2024 by Stanford University.

What is required to establish trust?

Model integrity

Users need guarantees that their AI prompts are answered by a model that has not been tampered with. Traditional techniques for assessing the integrity of software, such as source code analysis, are infeasible for AI models due to their large sizes.

Data confidentiality

During training and operation, AI models handle sensitive data, like medical inquiries or corporate secrets. Users need guarantees that their information remains secure and doesn't leak to the model creators, other users, or AI infrastructure providers.


AI models will become essential for business processes and societies in general. As with every critical infrastructure, solutions must be found to keep AI models resilient to interruptions and to protect them from censorship.

Making AI trustworthy

AI Models on ICP Today

See a series of demos how the Internet Computer has the capability of running AI in a smart contract.
AI smart contract on ICP


AI smart contract on ICP

The world's first demonstration of AI inference running directly on the blockchain, presented by Dominic Williams

Experience the demo version

Check out the open-source repo on GitHub and tryout the AI demo by yourself.

GO TO GITHUB REPOMore about DeAI in the Dev docs

// Setup:
let proto: ModelProto =
let model = tract_onnx::onnx()

// Inference:
let result =!

What the future holds

Blockchain AI is still in its early stages. Currently, smart contracts can run small AI models like ImageNet for onchain image classification. Short-term improvements will decrease latency and support larger models, while the long-term goal is to enable smart contracts to perform AI computations on GPUs, allowing both training and inference of large models fully onchain.


  • Faster deterministic floating-point operations
  • Wasm SIMD (Single-instruction multiple data)
  • Upgrade Wasm memory to 64-bit


  • Explore API for deterministic AI computation on GPUs.
  • Develop public specification for nodes with GPUs.
  • Add subnets with the new nodes to ICP.

News & media

Get all the news from the Internet Computer ecosystem

Explore more news

Explore AI on ICP