Builds an incentive landscape into which miners must submit finetunned machine learning models of certain size. The models are evaluated on their ability to solve domain specific questions similar to the MMLU benchmark which are generated by scraping Wikipedia. The miner with the earliest and best overall accuracy is given all the incentive.
To ensure a smooth setup and avoid conflicts with other Python packages, it is recommended to use a virtual environment. Before setting up the virtual environment, ensure you have the correct version of Python installed. Additionally, running a validator for 7B parameter models requires a robust machine, specifically one equipped with a GPU having at least 40 GB of available RAM to handle the computational load efficiently.
- GPU Requirements: Minimum 40 GB of GPU RAM.
- Examples of Suitable GPUs:
- NVIDIA A100 (40GB or 80GB variants)
- NVIDIA Tesla V100 (32GB, can be used in multi-GPU configurations to meet RAM requirements)
- For more options, consider checking vendors like NVIDIA's official website or exploring cloud solutions that offer GPU instances, such as Amazon AWS EC2, Google Cloud Platform, or Microsoft Azure.
-
Install
pyenvfor managing Python versions:- On macOS:
brew install pyenv
- On Ubuntu (Linux):
sudo apt update && sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev python-openssl git curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- On Windows, use WSL (Windows Subsystem for Linux) and follow the Linux instructions.
- On macOS:
-
Configure your shell to initialize
pyenvautomatically:- Add
pyenvto the shell by adding the following lines to your profile (e.g.,.bashrc,.zshrc):export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"
- Add
-
Install Python 3.11 using
pyenv:pyenv install 3.11.0 pyenv global 3.11.0
-
Install
virtualenv:python3.11 -m pip install virtualenv
-
Create a virtual environment:
python3.11 -m virtualenv venv
-
Activate the virtual environment:
- On Windows:
.\venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
-
Optional: Install
pm2to manage the application process:- If
pm2is not installed, you can install it globally using npm:npm install pm2@latest -g
- If
- Register a UID on the subnet
See docs
- Train your model
Up to you
- Upload your model to huggingface
Use website front end
- Commit your model repo to the chain
python miner.py --wallet.name <your_wallet_name> --wallet.hotkey <your_wallet_hotkey> --repo <your huggingface repo>
Remember to replace <your_wallet_name>, <your_wallet_hotkey>, and <your huggingface repo> with the actual details.
The repo name is in the URL of where your model is on Huggingface.
-
Run the validator with your wallet details:
- You can run the validator directly:
python validator.py --wallet.name <your_wallet_name> --wallet.hotkey <your_wallet_hotkey>
- Alternatively, to manage the validator with
pm2, use:pm2 start validator.py --name "validator_process" -- --wallet.name <your_wallet_name> --wallet.hotkey <your_wallet_hotkey>
- You can run the validator directly:
-
Check the logs of the validator process managed by
pm2:pm2 logs validator_process
-
Deactivate the virtual environment when done:
deactivate
-
Optional: Stop the
pm2process when done:pm2 stop validator_process
Remember to replace <your_wallet_name> and <your_wallet_hotkey> with your actual wallet details.