You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes:
- New multi-choice benchmarking task;
- Refactor changes (.env config-based, decoupled parts of the code);
- Poetry setup;
- Only 5 tasks are included: QA, DateQA, Summary, MultiChoice, Organic.
@@ -24,98 +24,18 @@ This repository is the **official codebase for Bittensor Subnet 1 (SN1) v1.0.0+,
24
24
25
25
# Introduction
26
26
27
-
This repo defines an incentive mechanism to create a distributed conversational AI for Subnet 1 (SN1).
27
+
This repo defines an incentive mechanism to create a distributed conversational AI for Subnet 1 (SN1).
28
28
29
-
Validators and miners are based on large language models (LLM). The validation process uses **internet-scale datasets and goal-driven behaviour to drive human-like conversations**.
29
+
Validators and miners are based on large language models (LLM). The validation process uses **internet-scale datasets and goal-driven behaviour to drive human-like conversations**.
30
30
31
31
32
32
</div>
33
33
34
-
# Installation
35
-
This repository requires python3.9 or higher. To install it, simply clone this repository and run the [install.sh](./install.sh) script.
1. To run a **validator**, you will need at least 62GB of VRAM.
57
-
2. To run the default huggingface **miner**, you will need at least 62GB of VRAM.
58
40
59
-
60
-
**It is important to note that the baseminers are not recommended for main, and exist purely as an example. Running a base miner on main will result in no emissions and a loss in your registration fee.**
61
-
If you have any questions please reach out in the SN1 channel in the Bittensor Discord.
62
41
</div>
63
-
64
-
# How to Run
65
-
You can use the following command to run a miner or a validator.
66
-
67
-
```bash
68
-
python <SCRIPT_PATH>
69
-
--netuid 1
70
-
--subtensor.network <finney/local/test>
71
-
--neuron.device cuda
72
-
--wallet.name <your wallet># Must be created using the bittensor-cli
73
-
--wallet.hotkey <your hotkey># Must be created using the bittensor-cli
74
-
--logging.debug # Run in debug mode, alternatively --logging.trace for trace mode
75
-
--axon.port # VERY IMPORTANT: set the port to be one of the open TCP ports on your machine
76
-
```
77
-
78
-
where `SCRIPT_PATH` is either:
79
-
1. neurons/miners/openai/miner.py
80
-
2. neurons/validator.py
81
-
82
-
For ease of use, you can run the scripts as well with PM2. Installation of PM2 is:
You can run the validator in auto-update mode by using pm2 along with the `run.sh` bash script. This command will initiate two pm2 processes: one for auto-update monitoring, named **s1_validator_update**, and another for running the validator itself, named **s1_validator_main_process**.
> Note: this is not an end solution, major releases or changes in requirements will still require you to manually restart the processes. Regularly monitor the health of your validator to ensure optimal performance.
102
-
103
-
# Testnet
104
-
We highly recommend that you run your miners on testnet before deploying on main. This is give you an opportunity to debug your systems, and ensure that you will not lose valuable immunity time. The SN1 testnet is **netuid 61**.
105
-
106
-
In order to run on testnet, you will need to go through the same hotkey registration proceure as on main, but using **testtao**. You will need to ask for some in the community discord if you do not have any.
> Important: vLLM currently faces a [notable limitation](https://github.com/vllm-project/vllm/issues/3012) in designating a specific GPU for model execution via code. Consequently, to employ a particular CUDA device for your model's operations, it's necessary to manually adjust your environment variable `CUDA_VISIBLE_DEVICES`. For instance, setting `export CUDA_VISIBLE_DEVICES=1,2` will explicitly define the CUDA devices available for use.
116
-
117
-
# Resources
118
-
The archiecture and methodology of SN1 is complex, and as such we have created a comprehensive resource to outline our design. Furthermore, we have strict requirements for how miners should interact with the network. Below are the currently available resources for additional information:
⚠️ **Reminder! Do not run this miner on main!** ⚠️
31
+
Before running a miner, you will need to create a .env.miner environment file. It is necessary for you to provide the following
32
+
33
+
```text
34
+
NETUID= #[1, 61, 102]
35
+
SUBTENSOR_NETWORK= #The network name [test, main, local]
36
+
SUBTENSOR_CHAIN_ENDPOINT= #The chain endpoint [test if running on test, main if running on main, custom endpoint if running on local]
37
+
WALLET_NAME= #Name of your wallet(coldkey)
38
+
HOTKEY= #Name of your hotkey associated with above wallet
39
+
AXON_PORT= #Number of the open tcp port
40
+
OPENAI_API_KEY= #The openai key that you would like to mine with
41
+
```
42
+
## Testnet - RECOMMENDED
43
+
We highly recommend that you run your miners on testnet before deploying on main. This is give you an opportunity to debug your systems, and ensure that you will not lose valuable immunity time. The SN1 testnet is **netuid 61**.
44
+
45
+
In order to run on testnet, you will need to go through the same hotkey registration proceure as on main, but using **testtao**. You will need to ask for some in the community discord if you do not have any.
46
+
47
+
Then, simply set test=True in your .env file and execute all other steps as before.
48
+
49
+
Then post in the Subnet 1 channel on discord so we can activate a validator for your miner to respond to.
50
+
51
+
You can use wandb to see how successful your miner would be on mainnet, an example notebook is pinned in the channel.
52
+
53
+
## Running
54
+
55
+
After creating the above environment file, run
56
+
57
+
```bash
58
+
pm2 start "poetry run python neurons/miners/openai/miner.py"
You will also need to log into huggingface and accept the License Agreement for the LMSYS-Chat-1M dataset: https://huggingface.co/datasets/lmsys/lmsys-chat-1m :
23
+
```shell
24
+
huggingface-cli login
25
+
```
26
+
27
+
## Configuration
28
+
29
+
Before running a validator, you will need to create a .env.validator environment file. It is necessary for you to provide the following
30
+
31
+
```text
32
+
NETUID= #[1, 61, 102]
33
+
SUBTENSOR_NETWORK= #The network name [test, main, local]
34
+
SUBTENSOR_CHAIN_ENDPOINT= #The chain endpoint [test if running on test, main if running on main, custom endpoint if running on local]
35
+
WALLET_NAME= #Name of your wallet(coldkey)
36
+
HOTKEY= #Name of your hotkey associated with above wallet
37
+
AXON_PORT= #Number of the open tcp port
38
+
HF_TOKEN= #Access token from Hugging Face where you accepted the License Agreement for lmsys
39
+
```
40
+
41
+
## Running
42
+
43
+
After creating the above environment file, run
44
+
45
+
```bash
46
+
bash run.sh
47
+
```
48
+
It will spawn 2 pm2 processes, one to run the validator and one to autoupdate.
49
+
50
+
> Note: this is not an end solution, major releases or changes in requirements will still require you to manually restart the processes. Regularly monitor the health of your validator to ensure optimal performance.
0 commit comments