Git Product home page Git Product logo

finetensor's Introduction

Finetensor

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.

Installation

Setting Up the Environment

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.

Validator Machine Specifications

  • 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.

Environment Setup Steps

  1. Install pyenv for 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.
  2. Configure your shell to initialize pyenv automatically:

    • Add pyenv to 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 -)"
  3. Install Python 3.11 using pyenv:

    pyenv install 3.11.0
    pyenv global 3.11.0
  4. Install virtualenv:

    python3.11 -m pip install virtualenv
  5. Create a virtual environment:

    python3.11 -m virtualenv venv
  6. Activate the virtual environment:

    • On Windows:
      .\venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  7. Install the required packages:

    pip install -r requirements.txt
  8. Optional: Install pm2 to manage the application process:

    • If pm2 is not installed, you can install it globally using npm:
      npm install pm2@latest -g

Mining

  1. Register a UID on the subnet

See docs

  1. Train your model

Up to you

  1. Upload your model to huggingface

Use website front end

  1. 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.

Validating

  1. 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>
  2. Check the logs of the validator process managed by pm2:

    pm2 logs validator_process
  3. Deactivate the virtual environment when done:

    deactivate
  4. Optional: Stop the pm2 process when done:

    pm2 stop validator_process

Remember to replace <your_wallet_name> and <your_wallet_hotkey> with your actual wallet details.

finetensor's People

Stargazers

Wendell Thompson II avatar  avatar

Watchers

Unconst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.