AI Model Hosting

Petals Tensor is in its beta phase.



Documentation on how to build your own subnets coming to a future near you.

This is the first version of the peer-to-peer deep-learning software.

The following documentation is for interacting with the first version of the peer-to-peer AI subnet.


Papers and Research


We forked and modified the open-sourced Petals, called Petals Tensor, a decentralized peer-to-peer computation distribution network coded in Python to host machine learning models originally developed by BigScience. Petals implements libp2p, a peer-to-peer library used by most modern blockchains, such as Polkadot, Ethereum, and more. It also implements other libraries, such as Hivemind, also developed by BigScience, amongst other libraries.

Petals Tensor is a subnet to the Hypertensor blockchain.


Hypertensor isn't designed for Petals Tensor. It is designed to interface with peer-to-peer architectures. As peer-to-peer model hosting technology grows and innovates, the community will adapt to stay on the cutting edge.


The subnets of Hypertensor are responsible for implementing peer-to-peer and decentralized infrastructure for data, such as AI models, scoring each peer, and interfacing with Hypertensor.

The Hypertensor network enables each subnet creator to implement its own scoring mechanism that scores each peer.


The modifications made are specifically for interfacing with the Hypertensor Blockchain.

General Hypertensor Interfacing

All of the necessary functions required to interact with the blockchain are included.


Not implemented v1.0

The parameter added to start a node as a peer is the account_id, the account registered on the blockchain attached to the the model peer. We plan on adding more parameters in the future.

Peer Consensus Mechanism

Submitting peer consensus data on each epoch is required to get rewards. On each epoch, peers automatically submit consensus data to the Hypertensor blockchain.


  1. Query Hypertensor Blockchain model peers

  2. Query AI model hosting peers and score them based on blocks served

  3. Match them blockchain model peers with AI model hosting peers

    • Generate score

  4. Submit data


This is an automated process as long as the VPS or hosting computer is running. If the model is in a broken state, the server will submit an unconfirm_consensus_data() call instead of a submit_consensus_data() call.


Not implemented v1.0

An API to query models directly through a specific peer is integrated into Petals Tensor to call a peer's server from the blockchain through an off-chain worker. Each peer is required to submit their IP (Internet Protocol address) and port when registering their peer on the blockchain through the add_model_peer() function. Peers must keep a port open specifically for calls from the blockchain and this port can be updated through the update_port() function. There will be security measurements in place to ensure only the blockchain IPs can call the port but it is up to the user hosting the models to ensure security is up to their standards.


All models must be open-sourced.

Artificial Intelligence Versioning Roadmap

The AI software is open-sourced and is still under development. Currently, the hosting, consensus, and execution are all done together under one client. In the future, these features will likely be split into a Hosting Client and a Consensus & Execution Client.

The following roadmap is preliminary.


The first version of the AI software will introduce AI model hosting interfaced with the Hypertensor blockchain.


  • Decentralized peer-to-peer AI models.

  • Uninterrupted peer consensus submissions.

  • Stress test Petals Tensor.


  • Peer-to-peer model hosting.

  • Consensus mechanism.


The second version of the AI software will introduce peer validation logic to ensure all peers initializing as a peer will trigger events for other peers to validate they can interface with the Hypertensor blockchain based on required parameters.


  • Memory efficiency & improvements.

  • Ensure only blockchain users are peers.

  • Make any necessary upgrades to the software.

  • Add storage clean-up.


  • Logic to ensure all peers can interface with the blockchain validated by multiple other peers, such as having the required minimum balance to stake, account eligibility, no duplicate accounts, etc.



  • Data validation.

  • Make any necessary upgrades to the software.

General Terminology


The AI machine-learning models.


Peers are the servers hosting the AI models. The models are hosted by peers with each peer hosting a subset of a model alongside other peers hosting other subsets of the model, together hosting an entire model.

Model State

The model state is the health status of the model. Models can either be in a healthy state or a broken state. A healthy state results when all peers are hosting all possible blocks of a model. A broken state results when not all peers are hosting all possible blocks of a model or there are not enough peers.


Petals Tensor is an ongoing effort from contributors with goals such as introducing decentralized storage, an immutable ledger, PubSub (Publish/Subscribe), automated internal consensus, and other features.

Last updated