{"id":14971628,"url":"https://github.com/opentensor/validators","last_synced_at":"2026-02-28T08:36:21.967Z","repository":{"id":172894000,"uuid":"601243114","full_name":"opentensor/validators","owner":"opentensor","description":"Repository for bittensor validators ","archived":false,"fork":false,"pushed_at":"2023-11-27T15:26:46.000Z","size":1277,"stargazers_count":16,"open_issues_count":14,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-20T13:27:27.829Z","etag":null,"topics":["ai","blockchain","cryptocurrency","deep-learning","machine-learning","neural-networks","pytorch","torch","validators","wandb"],"latest_commit_sha":null,"homepage":"https://www.bittensor.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentensor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T16:58:47.000Z","updated_at":"2025-11-04T13:09:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"b390f530-2175-487b-aa79-fb287bda0e0d","html_url":"https://github.com/opentensor/validators","commit_stats":{"total_commits":402,"total_committers":16,"mean_commits":25.125,"dds":0.7761194029850746,"last_synced_commit":"9e2172f3889faa9ae5bc7dbae08ba4291610a022"},"previous_names":["opentensor/validators"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/opentensor/validators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fvalidators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fvalidators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fvalidators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fvalidators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentensor","download_url":"https://codeload.github.com/opentensor/validators/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fvalidators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29928993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","blockchain","cryptocurrency","deep-learning","machine-learning","neural-networks","pytorch","torch","validators","wandb"],"created_at":"2024-09-24T13:45:34.532Z","updated_at":"2026-02-28T08:36:21.946Z","avatar_url":"https://github.com/opentensor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# **Open Validators** \u003c!-- omit in toc --\u003e\n[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n\n---\n\n\u003c/div\u003e\n\n## ⚠️ **Deprecated**: This project is no longer maintained. We recommend using [text-prompting repository](https://github.com/opentensor/text-prompting) instead.\n\nThis repository contains Bittensor Validators designed by the OpenTensor Foundation team for the community.\nIt offers several functionalities, such as:\n\n- Building and running Bittensor validators\n- Real-time analysis of validator performance integrated with wandb\n- Offline analysis of data generated from the network\n- Creation of datasets using network data for training miners \n\nThe main goal of this repository is to facilitate the interaction with the Bittensor network by providing a set of\nopen-source validators to the community. The current validator implementation queries the network for responses and \nevaluations using carefully crafted prompts using CoT, that are later evaluated by a pipeline of reward functions, including diversity, relevance, rlhf, among others.\n\nAdditionally, the repository provides an analysis and data toolkit that allows users to analyze the data generated from\nthe validator's interaction with the network. By default, the validator collects various data points, such as question \nresponses, evaluations, rewards and scorings by UID, and model performance data. This data is then sent to wandb, \nmaking it publicly accessible to the community.\n\nThe toolkit also includes scripts to analyze and extract data from specific validator runs or multiple runs, simplifying\nthe creation of valuable datasets for the community's miners.\n\nTo learn more about the Bittensor validation process, check out this [documentation](https://tensor-wiki.vercel.app/validating/validating).\n\n# Running\n\nThese validators are designed to run and update themselves automatically. To run a validator, follow these steps:\n\n1. Install this repository, you can do so by following the steps outlined in [the installation section](#install).\n2. Install [Weights and Biases](https://docs.wandb.ai/quickstart) and run `wandb login` within this repository. This will initialize Weights and Biases, enabling you to view KPIs and Metrics on your validator. (Strongly recommended to help the network improve from data sharing)\n3. Install [PM2](https://pm2.io/docs/runtime/guide/installation/) and the [`jq` package](https://jqlang.github.io/jq/) on your system.\n   **On Linux**:\n   ```bash\n   sudo apt update \u0026\u0026 sudo apt install jq \u0026\u0026 sudo apt install npm \u0026\u0026 sudo npm install pm2 -g \u0026\u0026 pm2 update\n   ``` \n   **On Mac OS**\n   ```bash\n   brew update \u0026\u0026 brew install jq \u0026\u0026 brew install npm \u0026\u0026 sudo npm install pm2 -g \u0026\u0026 pm2 update\n   ```\n4. Run the `run.sh` script which will handle running your validator and pulling the latest updates as they are issued. \n   ```bash\n   pm2 start run.sh --name openvalidators_autoupdate -- --wallet.name \u003cyour-wallet-name\u003e --wallet.hotkey \u003cyour-wallet-hot-key\u003e\n   ```\n\nThis will run **two** PM2 process: one for the validator which is called `auto_run_validator` by default (you can change this in `run.sh`), and one for the run.sh script (in step 4, we named it `validator_maintainer`). The script will check for updates every 30 minutes, if there is an update then it will pull it, install it, restart `auto_run_validator` and then restart itself.\n\n# Usage\nThere are currently four main avenues for engaging with this repository:\n\n1. [Validators](#Validators):\n   - Designed for TAO holders who aim to build or run validators developed by the foundation.\n\n2. [Real-time monitoring with wandb integration](#Real-time-monitoring-with-wandb-integration):\n   - Allows users to analyze the performance of various validators runs in real-time using wandb.\n\n3. [Network analysis](#Network-analysis)\n   - Caters to individuals, researchers, and data scientists interested in analyzing the data generated from the validators' interaction with the Bittensor network.\n\n4. [Dataset creation](#Dataset-creation)\n   - Serves individuals, researchers, and developers who seek to create datasets for the community's miners.\n\n# Install\nFrom source:\n```bash\n$ git clone https://github.com/opentensor/validators.git\n$ pip3 install -e openvalidators/\n```\n\nYou can test the installation by running the following command:\n```bash\n$ python3 validators/openvalidators/neuron.py --help\n```\n\n# Validators\nParticipation in Network Validation is available to TAO holders. The validation mechanism utilizes a dual proof-of-stake and proof-of-work system known as *Yuma Consensus*, which you can learn more about [here](https://tensor-wiki.vercel.app/validating/validating). To start validating, you will need to have a Bittensor wallet with a sufficient amount of TAO tokens staked.\n\nOnce you have your wallet ready for validation, you can start the foundation validator by running the following command:\n```bash\n$ python3 validators/openvalidators/neuron.py --wallet.name \u003cyour-wallet-name\u003e --wallet.hotkey \u003cyour-wallet-hot-key\u003e\n```\n\n# Real-time monitoring with wandb integration\nBy default, the validator sends data to wandb, allowing users to monitor running validators and access key metrics in real time, such as:\n- Gating model loss\n- Hardware usage\n- Forward pass time\n- Block duration\n\nAll the data sent to wandb is publicly available to the community at the following [link](https://wandb.ai/opentensor-dev/openvalidators).\n\nYou don't need to have a wandb account to access the data or to generate a new run,\nbut bear in mind that\n[data generated by anonymous users will be deleted after 7 days](https://docs.wandb.ai/guides/app/features/anon#:~:text=If%20there's%20no%20account%2C%20we,be%20available%20for%207%20days)\nas default wandb policy.\n\n# Network analysis\nThis repository provides a set of tools to analyze the data generated by the validators, including:\n- Completions \n- Rewards\n- Weights\n- [Prompt scoring](#Prompt-based-scoring)\n\nA basic tutorial for downloading and analyzing wandb data can be found in [analysis](./analysis/demo.ipynb).\n\n# Dataset creation\nFor the individuals who are eager to create datasets tailored specifically for the community's miners.\nWith convenient scripts available in the [scripts](./scripts) folder, you can effortlessly download data from specific or multiple runs \nof wandb, empowering you to curate comprehensive and valuable datasets that align with your mining objectives.\nCheck the [README of the data collector](./scripts/README.md) for more information.\n\n----\n## Experimental Features\n\n## Sentence Embedding Gating Model\nAnother cornerstone of the validator functionality is the use of a mixture of experts (MoE) model, which we call the gating model, to enable queries to be efficiently routed to the best-suited miners. **This incentivizes miners to become specialists, which in turn improves response quality**. It also reduces latency and addresses bandwidth issues in the network.\nWe are working on a new and improved gating model, based on sentence embeddings, which is expected to be a more powerful and robust router for queries. By default it is disabled, but can be enabled with the flags\n\n```--neuron.use_custom_gating_model --gating.model_name sentence-transformers/all-distilroberta-v1```\n\n## CUDA device placement\nIf you desire to place your validator on a specific GPU, it is recommended to prepend the command you are using to start and run your validator with `CUDA_VISIBLE_DEVICES`.\n\nFor running with pm2:\n```bash\n$ CUDA_VISIBLE_DEVICES=\u003cdevice id\u003e pm2 start run.sh --name openvalidators_autoupdate -- --wallet.name \u003cyour-wallet-name\u003e --wallet.hotkey \u003cyour-wallet-hot-key\u003e\n```\n\nFor runing `neuron.py` directly:\n```bash\n$ CUDA_VISIBLE_DEVICES=\u003cdevice id\u003e python3 validators/openvalidators/neuron.py --wallet.name \u003cyour-wallet-name\u003e --wallet.hotkey \u003cyour-wallet-hot-key\u003e\n```\n# License\n\nThe MIT License (MIT) Copyright © 2023 Yuma Rao\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated \ndocumentation files (the “Software”), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit \npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE \nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR \nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Fvalidators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentensor%2Fvalidators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Fvalidators/lists"}