{"id":13706015,"url":"https://github.com/opentensor/text-prompting","last_synced_at":"2025-04-11T19:40:29.883Z","repository":{"id":194630023,"uuid":"687654447","full_name":"opentensor/text-prompting","owner":"opentensor","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-09T15:11:36.000Z","size":529,"stargazers_count":27,"open_issues_count":7,"forks_count":14,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-25T15:33:45.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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":null,"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-09-05T18:13:32.000Z","updated_at":"2024-10-08T10:37:20.000Z","dependencies_parsed_at":"2023-11-22T22:25:16.054Z","dependency_job_id":"c3345519-366a-4e50-b6aa-6e167bff9995","html_url":"https://github.com/opentensor/text-prompting","commit_stats":null,"previous_names":["opentensor/text-prompting"],"tags_count":10,"template":false,"template_full_name":"opentensor/bittensor-subnet-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Ftext-prompting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Ftext-prompting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Ftext-prompting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Ftext-prompting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentensor","download_url":"https://codeload.github.com/opentensor/text-prompting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248468205,"owners_count":21108778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-02T22:00:51.367Z","updated_at":"2025-04-11T19:40:29.853Z","avatar_url":"https://github.com/opentensor.png","language":"Python","funding_links":[],"categories":["Registered Subnets"],"sub_categories":[],"readme":"# ⚠️ Deprecated: This project is no longer maintained. We recommend using the new [prompting repository](https://github.com/opentensor/prompting) instead.\n\u003cdiv align=\"center\"\u003e\n\n# **Bittensor Text-Prompting** \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### The Incentivized Internet \u003c!-- omit in toc --\u003e\n\n[Discord](https://discord.gg/bittensor) • [Network](https://taostats.io/) • [Research](https://bittensor.com/whitepaper)\n\n\u003c/div\u003e\n\n---\n\nThis template contains all the necessary files and functions to run Bittensor's Text-Prompting Subnet. You can try running miners on netuid 8 in Bittensor's test network.\n\n# Introduction\nThe Bittensor blockchain hosts multiple self-contained incentive mechanisms 'subnets'. Subnets are playing fields through which miners (those producing value) and validators (those producing consensus) determine together the proper distribution of TAO for the purpose of incentivizing the creation of value, i.e. generating digital commodities, such as intelligence, or data. Each consists of a wire protocol through which miners and validators interact and their method of interacting with Bittensor's chain consensus engine [Yuma Consensus](https://bittensor.com/documentation/validating/yuma-consensus) which is designed to drive these actors into agreement about who is creating value.\n\nThis repository is a subnet for text prompting with large language models (LLM). Inside, you will find miners and validators designed by the OpenTensor Foundation team to valdiate and serve language models. The current validator implementation queries the network for responses while servers responds to requests with their best completions. These completions are judged and ranked by the validators and passed to the chain. \n\n\u003c/div\u003e\n\n---\n\n# Installation\nThis repository requires python3.8 or higher. To install, simply clone this repository and install the requirements.\n```bash\ngit clone https://github.com/opentensor/text-prompting.git\ncd text-prompting\npython -m pip install -r requirements.txt\npython -m pip install -e .\n```\n\nIf you are running a specific server, you might need install server-specific requirements.\n\n```bash\ncd neurons/miners/bittensorLM\npython -m pip install -r requirements.txt\n```\n\n\u003c/div\u003e\n\n---\n\nPrior to running a miner or validator, you must [create a wallet](https://github.com/opentensor/docs/blob/main/reference/btcli.md) and [register the wallet to a netuid](https://github.com/opentensor/docs/blob/main/subnetworks/registration.md). Once you have done so, you can run the miner and validator with the following commands.\n```bash\n# To run the miner\npython -m neurons/miners/bittensorLM/miner.py \n    --netuid 8  \n    --subtensor.network test \n    --wallet.name \u003cyour miner wallet\u003e # Must be created using the bittensor-cli\n    --wallet.hotkey \u003cyour validator hotkey\u003e # Must be created using the bittensor-cli\n    --logging.debug # Run in debug mode, alternatively --logging.trace for trace mode\n\n# To run the validator\npython -m neurons/validators/validator.py\n    --netuid 8\n    --subtensor.network test \n    --wallet.name \u003cyour validator wallet\u003e  # Must be created using the bittensor-cli\n    --wallet.hotkey \u003cyour validator hotkey\u003e # Must be created using the bittensor-cli\n    --logging.debug # Run in debug mode, alternatively --logging.trace for trace mode\n```\n\n\u003c/div\u003e\n\n---\n\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](#installation).\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 text_prompt_validators_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 `text_prompt_validators_main_process` by default (you can change this in `run.sh`), and one for the run.sh script (in step 4, we named it `text_prompt_validators_autoupdate`). The script will check for updates every 30 minutes, if there is an update then it will pull it, install it, restart `text_prompt_validators_main_process` and then restart itself.\n\n\n# Real-time monitoring with wandb integration\nBy default, the text prompting 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## License\nThis repository is licensed under the MIT License.\n```text\n# The MIT License (MIT)\n# Copyright © 2023 Yuma Rao\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the “Software”), to deal in the Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,\n# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in all copies or substantial portions of\n# the Software.\n\n# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\n# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n# DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Ftext-prompting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentensor%2Ftext-prompting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Ftext-prompting/lists"}