Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SN1-195: add inference task #344

Merged
merged 134 commits into from
Sep 4, 2024
Merged

SN1-195: add inference task #344

merged 134 commits into from
Sep 4, 2024

Conversation

Hollyqui
Copy link
Collaborator

  • Added Dynamic Model Loading/unloading to allow validators to run multiple reference models
  • Added inference task to allow us to force miners to generate with a specific model (layer to be used for ensembling)
  • Made scoring loop run asynchronously from task generation

Hollyqui and others added 30 commits July 15, 2024 14:53
Co-authored-by: Dmytro Bobrenko <17252809+dbobrenko@users.noreply.github.com>
* initial push on openai miner

* deprecates langchain and hf miner, adds openai miner

* brings back pm2 autorun command

* Prevent multi-turn on translation and sentiment

* updates gitignore

* bumps bittensor version

* adds block to logged wandb data

* updates version

* Add Unit Tests

* Improve multi-turn prompting

* Reiterate need for pronouns

* Stress importance of pronouns

* SN1-12

* drops block from log data

* Switch last_update_block to local var instead of metagraph attribute

* Update README.md

* update logging to use python rather than loguru

refs #200

* Reduce timout to 15 seconds

* Change event logging

* Remove loguru requirement

* Increment Version Number

* v2.5.2 (#287)

* Point to macrocosmos entity

* Adjust project name

* Increase spec version to 2.5.2

---------

Co-authored-by: bkb2135 <bkb2135@columbia.edu>
Co-authored-by: p-ferreira <38992619+p-ferreira@users.noreply.github.com>
Co-authored-by: p-ferreira <pe_drojunior@hotmail.com>
Co-authored-by: bkb2135 <98138173+bkb2135@users.noreply.github.com>
Co-authored-by: Chengzhe <chengzhe8919@gmail.com>
Merge Main into pre-staging
 - Added pytest and cleaned poetry.lock
 - Make vllm optional via validator extra
 - Made `angle-emb` optional
@Hollyqui Hollyqui requested review from dbobrenko and bkb2135 and removed request for dbobrenko August 28, 2024 18:10
@Hollyqui Hollyqui changed the base branch from SN1-150-remove-low-value-subcompetitions to release/v2.7.1 August 28, 2024 18:13
@Hollyqui Hollyqui changed the base branch from release/v2.7.1 to pre-staging August 28, 2024 18:14
@Hollyqui Hollyqui changed the base branch from pre-staging to main August 29, 2024 15:48
Copy link
Collaborator

@dbobrenko dbobrenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to change PR request to pre-staging branch, and merge with v2.7.1 changes

README.md Outdated

# Compute Requirements

1. To run a **validator**, you will need at least 70GB of VRAM.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have vali/miner requirements and instructions defined in assets/validator.md and assets/miner.md
Make sure to merge with v2.7.0+

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should already be merged with v2.7.1, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is merged with 2.7.1 but pre-staging has a different commit history, so github doesn't realise. I would suggest force pushing this into pre-staging later to get the correct commit history which is then also aligned with staging/main

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We moved miner/validator info into separate markdown files, main README is currently short and concise with links to detailed instructions
Looks like you've restored the previous version of README

neurons/forward.py Outdated Show resolved Hide resolved
neurons/miners/inference_miner/miner.py Show resolved Hide resolved
neurons/validator.py Outdated Show resolved Hide resolved
neurons/validator.py Outdated Show resolved Hide resolved
prompting/tasks/task_registry.py Outdated Show resolved Hide resolved
prompting/tasks/task_registry.py Outdated Show resolved Hide resolved
prompting/utils/timer.py Outdated Show resolved Hide resolved
prompting/utils/timer.py Outdated Show resolved Hide resolved
@@ -45,7 +42,7 @@ def check_uid_availability(
return True


def get_random_uids(self: BaseNeuron, k: int, exclude: list[int] = None) -> np.ndarray:
def get_random_uids(k: int | None = 10**6, exclude: list[int] = None, own_uid: int | None = None) -> np.ndarray:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make k mandatory, it's bounded to ~1000

Suggested change
def get_random_uids(k: int | None = 10**6, exclude: list[int] = None, own_uid: int | None = None) -> np.ndarray:
def get_random_uids(k: int, exclude: list[int] = None, own_uid: int | None = None) -> np.ndarray:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that needed - there's only 1k miners in the network, right? So passing k=None simply means you sample all miners

@Hollyqui Hollyqui changed the base branch from main to pre-staging August 30, 2024 10:13
Hollyqui and others added 2 commits August 30, 2024 11:14
Co-authored-by: Dmytro Bobrenko <17252809+dbobrenko@users.noreply.github.com>
Co-authored-by: Dmytro Bobrenko <17252809+dbobrenko@users.noreply.github.com>
@Hollyqui Hollyqui changed the base branch from pre-staging to release/v2.7.1 August 30, 2024 10:20
@Hollyqui Hollyqui changed the base branch from release/v2.7.1 to staging September 2, 2024 12:05
Copy link
Collaborator

@dbobrenko dbobrenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

README.md Outdated

# Compute Requirements

1. To run a **validator**, you will need at least 70GB of VRAM.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We moved miner/validator info into separate markdown files, main README is currently short and concise with links to detailed instructions
Looks like you've restored the previous version of README

prompting/llms/vllm_llm.py Show resolved Hide resolved
@Hollyqui Hollyqui merged commit e766486 into staging Sep 4, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants