Getting Started

Introduction

The following is how to get started running a subnet node within the Hypertensor LLM Standard subnet:

If you have any troubles, see troubleshooting.

Install Subnet:

  1. Run git clone https://github.com/hypertensor-blockchain/subnet-llm-template.git

  2. Run cd subnet-llm-template

  3. Run python -m venv .venv (to create your virtual environment, optional)

  4. Run source .venv/bin/activate (to activate your virtual environment, optional)

  5. Create an .env file in the root directory and add your mnemonic phrase to the PHRASE variable. If you don't have an account, create an account.

    • The example is shown in .env.example in the root directory.

    • Or fill in all example variables below.

      • PHRASE="<phrase>" # add mnemonic phrase here
        LOCAL_RPC="ws://127.0.0.1:9944"
        DEV_RPC="wss://rpc.hypertensor.org:443"
        LIVE_RPC="wss://rpc.hypertensor.org:443"
      • Note: You can use PHRASE="//{n}"instead of making a wallet. 100 test accounts with plenty of balance have been generated for those wanting to operate subnet validator nodes.

        • Example:

          • PHRASE="//1"

          • PHRASE="//2"

          • PHRASE="//98"

          • PHRASE="//99"

  6. Ensure INITIAL_PEERS within the src/subnet/constants.py file are currently active peers if needed.

  7. Update src/subnet/health/config.py MODEL to the model you're hosting if needed.

  8. Install the repository with python -m pip install . (including the .)


Start Your Subnet Validator Node:

First, create an account.

Once you have everything downloaded, there are only 4 steps to get the subnet validator node started.

  1. Generate key pair

    1. Generate your Ed25519 private key to get your deterministic Peer ID.

    2. This will be used within the subnet's PoS mechanism.

  2. Register subnet node*

    1. Register your subnet node on-chain with your Peer ID and stake balance.

  3. Start Validator Node

    1. Start your subnet validator node.

  4. Activate subnet node*

    1. Run your subnet node within the subnet.

      1. This requires a proof-of-stake that the registration handles.

    2. Activate your subnet node on-chain once your node has performed all of its required computations, such as loading the model.

*The Register and Activate logic can be combined into one call using the Add command. The above flow is the suggested method.

Safeguard

A subnet node can temporarily "deactivate" itself in case of server or subnet failures to avoid penalties or slashings.

Exiting

To exit a subnet on-chain:

  1. Stop your subnet server

Last updated