Skip to content

macrocosm-os/apex

Repository files navigation

Bittensor SN1: Apex - The Future of Decentralized AI

Apex CI/CD Discord Chat

License: MIT


The Incentivized Internet

Subnet 1 is the most intelligent inference model on Bittensor. As the first agent to achieve deep-researcher reasoning on the protocol, it has long been the network's pioneer of decentralized intelligence. This repository is the official codebase for Bittensor Subnet 1 (SN1) v1.0.0+, which was released on 22nd January 2024.

DiscordNetworkResearch


Run Validator

  1. Clone the repository:

    git clone https://github.com/macrocosm-os/apex.git
    cd apex
  2. Prepare config file:

    cp config/mainnet.yaml.example config/mainnet.yaml
    # Fill in the required values in config/mainnet.yaml
  3. [Recommended] Run validator with auto-updater:

    python scripts/autoupdater.py -c config/mainnet.yaml
  4. [Alternative #1] Run validator with pm2 and auto-updater:

    bash scripts/autoupdater_pm2.sh
  5. [Alternative #2] Install dependencies and run validator without auto-updater:

    uv venv --python 3.11 && uv pip install '.[dev]' && python validator.py -c config/mainnet.yaml

Run Testnet Validator

  1. Prepare config file:

    cp config/testnet.yaml.example config/testnet.yaml
    # Fill in the required values in config/testnet.yaml
  2. Install dependencies and run validator:

    uv venv --python 3.11 && uv pip install '.[dev]' && python validator.py -c config/testnet.yaml

Base Miner (for showcase purposes only)

# DO NOT run it on mainnet (finney)
python miner.py

Description

Apex structure:

.
└── Apex/
    ├── apex/
    │   ├── common/  # Common files used across project.
    │   ├── validator/  # Validator related stuff.
    │   └── services/  # Service modules used by validator.
    ├── config/  # Config files for validator.
    ├── scripts/  # Scripts.
    ├── tests/  # Unit tests.
    └── .github/  # Github actions CI/CD.

Development

Add packages

uv add new-package
uv lock

Test mode: Pool of predefined UIDs

One can define a pool of UIDs which will be queried, ignoring all others UIDs in the metagraph.

Modify config file, with current example only UIDs 1 and 2 will be queried on localhost with 8081 and 8082 ports respectively:

miner_sampler:
  kwargs:
    available_uids: [1, 2]
    # Optionally override axon addresses:
    available_addresses: ["http://0.0.0.0:8081", "http://0.0.0.0:8082"]

About

SN1: An incentive mechanism for internet-scale conversational intelligence

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 21