Loading
Loading

This information was auto-extracted from the GitHub repository and may be incomplete or out of date. Always refer to the subnet's GitHub repository for the latest instructions.
Miners do not run inference; validators host all compute. Miners only need to train/fine-tune locally and upload to HuggingFace.
Validators do not require GPUs as all computation happens on backend (Targon or operator-managed B300 fleet). Docker deployment recommended with 6GB reservation and 8GB limit.
Install uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
Clone Affine repository
git clone https://github.com/AffineFoundation/affine-cortex.git && cd affine-cortex
Create virtual environment and install Affine
uv venv && source .venv/bin/activate && uv pip install -e .
Copy environment template
cp .env.example .env
Configure environment variables for Bittensor wallet and HuggingFace credentials
# Edit .env with BT_WALLET_COLD, BT_WALLET_HOT, SUBTENSOR_ENDPOINT, HF_TOKEN
Register hotkey on subnet 120
btcli subnet register --netuid 120
Download baseline model from on-chain submission(optional)
af pull <UID> --model-path ./model_path
Locally validate improved model against evaluation environment(optional)
af eval --env <ENV> --base-url <local-vllm> --model <name>
Upload model to HuggingFace and commit on-chain (one-time only per hotkey)
af miner-deploy --repo myuser/affine-model-<hotkey> -p ./model_path
Install uv package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
Clone Affine repository
git clone https://github.com/AffineFoundation/affine.git && cd affine
Create virtual environment and install Affine
uv venv && source .venv/bin/activate && uv pip install -e .
Copy environment template
cp .env.example .env
Configure Bittensor wallet and subtensor connection
# Edit .env with BT_WALLET_COLD, BT_WALLET_HOT, SUBTENSOR_ENDPOINT, NETUID
Deploy validator using Docker (recommended method with auto-updates via Watchtower)(optional)
docker-compose down && docker-compose pull && docker-compose up -d && docker-compose logs -f
Run validator in continuous service mode (alternative to Docker)(optional)
SERVICE_MODE=true af servers validator
Run validator with custom parameters(optional)
af servers validator --netuid 120 --wallet-name mywallet --hotkey-name myhotkey --network finney
Configure systemd service for auto-start (Linux only)(optional)
sudo systemctl enable affine-validator && sudo systemctl start affine-validator