Testnet Tensor
  • Introduction
  • Explorer
  • GPT
  • DSN Dashboard
  • Create Account
    • Wallet
    • CLI
    • Faucet
  • Hypertensor CLI
    • Hypertensor CLI
  • Run A Subnet Node
    • Getting Started
    • Wiki
      • Running on AMD GPU
      • Running on Windows Using WSL
      • Troubleshooting
    • Generate Keypair
    • Register & Stake
    • Add
    • Start Validator Node
    • Start Bootstrap Node
    • Activate
    • Update Delegate Reward Rate
    • Deactivate
    • Remove
    • Keys
  • Delegate Staking
    • Introduction
    • Add Delegate Stake
    • Transfer Delegate Stake
    • Remove Delegate Stake
    • Claim Delegate Stake
  • Node Delegate Staking
    • Introduction
    • Add Node Delegate Stake
    • Transfer Node Delegate Stake
    • Remove Node Delegate Stake
    • Claim Node Delegate Stake
  • Delegate Staking Utils
    • Introduction
    • Subnet to Node
    • Node to Subnet
  • Build a Subnet
    • Introduction
    • DSN Standard
    • Subnet Consensus Protocol (SCP)
      • Incentives
      • Accounting
      • Proposals
    • Subnet
      • Registration
      • Activation
      • Deactivation
    • Subnet Nodes
      • Registration
      • Activation
      • Deactivate
  • Contribute
Powered by GitBook
On this page
  • Decentralized AI as a Standard
  • How it works
  • Decentralized and Distributed Validators
  • Decentralized Inference
  1. Build a Subnet

DSN Standard

PreviousIntroductionNextSubnet Consensus Protocol (SCP)

Last updated 2 months ago

The DSN (Decentralized Subnet) standard is for deploying decentralized and fault-tolerant AI models within the Hypertensor economy with other subnet validator nodes. The DSN has a PoS (Proof of Stake) consensus mechanism to enter the DHT (Distributed Hash Table) of the subnet's peer-to-peer network. This can be used to deploy decentralized AI models or AI agents in a fault-tolerant decentralized environment that follows the Hypertensor SCP (Subnet Consensus Protocol).

DSN Repository:

The DSN has been adapted to deploy Llama, Mixtral, Falcon, and Bloom standards. Although, it can be adapted for any model type.

Decentralized AI as a Standard

Similar to Ethereum's ERC20 standard or Solana's SPL token standard, the DSN can be customized to fit the needs of the subnet. Hypertensor employs smart contracts that can be used within the DSN as on-the-fly logic for governance, parameters, incentives logic, etc., or any customizable logic without requiring subnet validator nodes to upgrade the client itself.

How it works

Decentralized and Distributed Validators

Models are split between multiple nodes, each hosting specific transformer blocks of the model. Each server holds several consecutive blocks, the number of which depends on the server’s available GPU memory.

Decentralized Inference

When generating tokens, a client stores the model’s token embeddings (which typically comprise a small fraction of the total parameter count and can fit in RAM in most modern laptops, servers, and workstations) locally and relies on servers to run Transformer blocks. Before each inference session, the client finds a chain of servers that collectively hold all model layers. Once the chain is formed, the client uses the local embedding layer to look up embedding vectors for prefix tokens, then sends those vectors to servers and receives new representations. Once the client obtains the outputs of the final block, it computes the next token probabilities and repeats this process. While the session is active, servers store attention keys and values from past client inputs and use them for subsequent inference steps. Clients also store past inputs to each server so that if any server fails or goes offline, another one can quickly take its place.

https://github.com/hypertensor-blockchain/dsn
A visualization of blocks split amongst multiple nodes.
A visualization of blocks split amongst multiple nodes.