Eternal AI
  • The AI layer for the new internet
  • eternals
    • What are Eternals?
    • Specification
    • Proof-of-Compute
  • The new internet, AI-powered
    • Bitcoin, AI-powered
      • Eternals on Bitcoin
      • BitAI Virtual Machine
      • Run a BitAI node
    • Ethereum, AI-powered
    • Solana, AI-powered
  • smart contracts, ai-powered
    • How to use onchain LLM
    • Onchain AI composability - AI Powered Wallet
    • Onchain AI Composability - AI Powered Gaming With Chess
  • neurons
    • What are Neurons?
    • Neuron Device
    • Virtual Neurons
      • Solo Neuron
      • Neuron as a Service
      • Pooled Neuron
  • AI CHAINS
    • What are AI chains?
    • Bittensor and existing concepts
    • Base layer: Bitcoin vs Bittensor
    • AI chains: Bitcoin L2s vs Subnets
    • Apps: Smart contracts vs APIs
  • EAI
    • Utilities
    • Tokenomics
  • fully onchain ai models
    • Architecture
    • Deploy your first fully onchain AI
      • Set up your development environment
      • Create a self-custody wallet
      • Train an AI model in Keras
      • Transform the Keras model to Eternal
      • Send, receive, and trade Eternals
    • Progress
    • Misc
      • Transforming an AI Model into an Eternal
      • Standardized data formats
      • Specification
        • Layers
        • Models
  • Decentralized Inference API
    • API
      • API Key
      • Completions
      • Chat completion
      • Create a dagent
      • Get deposit address
      • Get dagent info
      • Agent Completion
    • Onchain Models
    • Tutorials
      • Build unstoppable Eliza agents
      • Build unstoppable Rig agents
      • Build unstoppable ZerePy agents
      • Decentralized ChatGPT
      • Don't Trust, Verify
      • Adjust your dagent personality
      • Launch on Twitter
      • Chain of thought
      • Build a dagent as a service with EternalAI API
    • Open Source
      • Architecture
      • Installation
Powered by GitBook
On this page
  • CLI quickstart
  • Python quickstart
  • No-code quickstart
  • Upload
  • Describe your Eternal
  1. fully onchain ai models
  2. Deploy your first fully onchain AI

Transform the Keras model to Eternal

Without learning a new language like Solidity, you can easily transform your existing AI models into Eternals, which are autonomous, unstoppable, and cryptographically-secure AI agents running on the blockchain. Under the hood, the Eternal AI toolkit takes your AI model structures and weights, transforms them into smart contracts, and deploys them on the blockchain.

The current model size limit is 1 MB. We're working on increasing the limit to accommodate more models. Our goal is to reach 100 MB in Q3-2024 and 1 GB in Q4-2024.

CLI quickstart

Now that you have the Eternal AI CLI installed and your wallet funded, you can transform an existing AI model into an Eternal.

To deploy an Eternal with an existing AI model, run:

eai eternal transform --format FORMAT --file FILE --name ETERNAL_NAME

Or you can deploy from a URL:

eai eternal transform --format FORMAT --url URL --name ETERNAL_NAME

Only Keras file format is supported currently. We're adding support for more model file formats, such as PyTorch and TensorFlow.

See the pending transaction with:

eai wallet transactions

Once the Eternal has been deployed, the Eternal ID should be printed when you run:

eai eternal list

Python quickstart

If you’ve built AI models in Keras, you can easily transform them into Eternals. Eternal AI offers a powerful yet simple Python library to transform your Keras models into Eternals with just a few lines of code. No need to learn new tools or languages like Solidity.

import eai

# Transform the Keras model to an Eternal
eternal = eai.transform(model, model_name="my-first-eternal")

After your Eternal is deployed, anyone can interact with it.

# try a single predict call
sample = x_test[0]
output = eai.predict([sample])
print(output)

No-code quickstart

Use Eternal AI without writing code. With just a few drags and drops, you can transform your AI model into an Eternal.

Upload

Describe your Eternal

Next, enter your Eternal information and get ready for the transformation.

PreviousTrain an AI model in KerasNextSend, receive, and trade Eternals

Last updated 10 months ago

Upload your AI model file at the page.

Eternal AI Creators