Skip to content

Commit

Permalink
Merge pull request #69 from AIT-Protocol/2.0.3
Browse files Browse the repository at this point in the history
change version number
  • Loading branch information
LVH-Tony authored Jun 24, 2024
2 parents a829ee0 + 692ac19 commit 95edcad
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 59 deletions.
3 changes: 2 additions & 1 deletion einstein/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.2"
__version__ = "2.0.3"
version_split = __version__.split(".")
__spec_version__ = (
(10000 * int(version_split[0]))
Expand All @@ -18,6 +18,7 @@
from . import agent
from . import conversation
from . import dendrite

# from . import shared
from . import validator

Expand Down
101 changes: 49 additions & 52 deletions min_compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,78 @@

# NOTE: Specification for miners may be different from validators

version: '2.0.2' # update this version key as needed, ideally should match your release version
version: "2.0.3" # update this version key as needed, ideally should match your release version

compute_spec:

miner:

cpu:
min_cores: 4 # Minimum number of CPU cores
min_speed: 2.5 # Minimum speed per core (GHz)
recommended_cores: 8 # Recommended number of CPU cores
recommended_speed: 3.5 # Recommended speed per core (GHz)
architecture: "x86_64" # Architecture type (e.g., x86_64, arm64)
min_cores: 4 # Minimum number of CPU cores
min_speed: 2.5 # Minimum speed per core (GHz)
recommended_cores: 8 # Recommended number of CPU cores
recommended_speed: 3.5 # Recommended speed per core (GHz)
architecture: "x86_64" # Architecture type (e.g., x86_64, arm64)

gpu:
required: True # Does the application require a GPU?
min_vram: 62 # Minimum GPU VRAM (GB)
recommended_vram: 80 # Recommended GPU VRAM (GB)
cuda_cores: 1024 # Minimum number of CUDA cores (if applicable)
min_compute_capability: 6.0 # Minimum CUDA compute capability
recommended_compute_capability: 7.0 # Recommended CUDA compute capability
recommended_gpu: "NVIDIA A100" # Recommended GPU to purchase/rent
required: True # Does the application require a GPU?
min_vram: 62 # Minimum GPU VRAM (GB)
recommended_vram: 80 # Recommended GPU VRAM (GB)
cuda_cores: 1024 # Minimum number of CUDA cores (if applicable)
min_compute_capability: 6.0 # Minimum CUDA compute capability
recommended_compute_capability: 7.0 # Recommended CUDA compute capability
recommended_gpu: "NVIDIA A100" # Recommended GPU to purchase/rent

memory:
min_ram: 16 # Minimum RAM (GB)
min_swap: 4 # Minimum swap space (GB)
recommended_swap: 8 # Recommended swap space (GB)
ram_type: "DDR4" # RAM type (e.g., DDR4, DDR3, etc.)
min_ram: 16 # Minimum RAM (GB)
min_swap: 4 # Minimum swap space (GB)
recommended_swap: 8 # Recommended swap space (GB)
ram_type: "DDR4" # RAM type (e.g., DDR4, DDR3, etc.)

storage:
min_space: 60 # Minimum free storage space (GB)
recommended_space: 100 # Recommended free storage space (GB)
type: "SSD" # Preferred storage type (e.g., SSD, HDD)
min_iops: 1000 # Minimum I/O operations per second (if applicable)
recommended_iops: 5000 # Recommended I/O operations per second
min_space: 60 # Minimum free storage space (GB)
recommended_space: 100 # Recommended free storage space (GB)
type: "SSD" # Preferred storage type (e.g., SSD, HDD)
min_iops: 1000 # Minimum I/O operations per second (if applicable)
recommended_iops: 5000 # Recommended I/O operations per second

os:
name: "Ubuntu" # Name of the preferred operating system(s)
version: 20.04 # Version of the preferred operating system(s)
name: "Ubuntu" # Name of the preferred operating system(s)
version: 20.04 # Version of the preferred operating system(s)

validator:

cpu:
min_cores: 4 # Minimum number of CPU cores
min_speed: 2.5 # Minimum speed per core (GHz)
recommended_cores: 8 # Recommended number of CPU cores
recommended_speed: 3.5 # Recommended speed per core (GHz)
architecture: "x86_64" # Architecture type (e.g., x86_64, arm64)
min_cores: 4 # Minimum number of CPU cores
min_speed: 2.5 # Minimum speed per core (GHz)
recommended_cores: 8 # Recommended number of CPU cores
recommended_speed: 3.5 # Recommended speed per core (GHz)
architecture: "x86_64" # Architecture type (e.g., x86_64, arm64)

gpu:
required: True # Does the application require a GPU?
min_vram: 62 # Minimum GPU VRAM (GB)
recommended_vram: 80 # Recommended GPU VRAM (GB)
cuda_cores: 1024 # Minimum number of CUDA cores (if applicable)
min_compute_capability: 6.0 # Minimum CUDA compute capability
recommended_compute_capability: 7.0 # Recommended CUDA compute capability
recommended_gpu: "NVIDIA A100" # Recommended GPU to purchase/rent
required: True # Does the application require a GPU?
min_vram: 62 # Minimum GPU VRAM (GB)
recommended_vram: 80 # Recommended GPU VRAM (GB)
cuda_cores: 1024 # Minimum number of CUDA cores (if applicable)
min_compute_capability: 6.0 # Minimum CUDA compute capability
recommended_compute_capability: 7.0 # Recommended CUDA compute capability
recommended_gpu: "NVIDIA A100" # Recommended GPU to purchase/rent

memory:
min_ram: 16 # Minimum RAM (GB)
min_swap: 4 # Minimum swap space (GB)
recommended_swap: 8 # Recommended swap space (GB)
ram_type: "DDR4" # RAM type (e.g., DDR4, DDR3, etc.)
min_ram: 16 # Minimum RAM (GB)
min_swap: 4 # Minimum swap space (GB)
recommended_swap: 8 # Recommended swap space (GB)
ram_type: "DDR4" # RAM type (e.g., DDR4, DDR3, etc.)

storage:
min_space: 60 # Minimum free storage space (GB)
recommended_space: 100 # Recommended free storage space (GB)
type: "SSD" # Preferred storage type (e.g., SSD, HDD)
min_iops: 1000 # Minimum I/O operations per second (if applicable)
recommended_iops: 5000 # Recommended I/O operations per second
min_space: 60 # Minimum free storage space (GB)
recommended_space: 100 # Recommended free storage space (GB)
type: "SSD" # Preferred storage type (e.g., SSD, HDD)
min_iops: 1000 # Minimum I/O operations per second (if applicable)
recommended_iops: 5000 # Recommended I/O operations per second

os:
name: "Ubuntu" # Name of the preferred operating system(s)
version: 20.04 # Version of the preferred operating system(s)
name: "Ubuntu" # Name of the preferred operating system(s)
version: 20.04 # Version of the preferred operating system(s)

network_spec:
bandwidth:
download: 100 # Minimum download bandwidth (Mbps)
upload: 20 # Minimum upload bandwidth (Mbps)
download: 100 # Minimum download bandwidth (Mbps)
upload: 20 # Minimum upload bandwidth (Mbps)
17 changes: 11 additions & 6 deletions neurons/miners/huggingface/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@

# import base miner class which takes care of most of the boilerplate
from einstein.base.einstein_miner import BaseStreamMiner
from deprecated import deprecated # type: ignore
from deprecated import deprecated # type: ignore

@deprecated(version="2.0.2+", reason="Class is deprecated, use openai miner for reference on example miner.")

@deprecated(
version="2.0.3+",
reason="Class is deprecated, use openai miner for reference on example miner.",
)
class HuggingFaceMiner(BaseStreamMiner):
"""
Base miner which runs Zephyr (https://huggingface.co/HuggingFaceH4/zephyr-7b-beta)
Expand Down Expand Up @@ -126,13 +130,13 @@ async def _forward(
temp_completion = "" # for wandb logging
timeout_reached = False
system_message = ""

# Get the math question from the last message
role = synapse.roles[-1]
raw_message = synapse.messages[-1]
message = urllib.parse.parse_qs(raw_message)
math_question = message.get("question_text", [''])[0]
message_type = message.get("question_type", [''])[0]
math_question = message.get("question_text", [""])[0]
message_type = message.get("question_type", [""])[0]

# prompt = math_question
bt.logging.debug(f"📧 Message received, forwarding synapse: {synapse}")
Expand Down Expand Up @@ -241,6 +245,7 @@ async def _forward(

return synapse.create_streaming_response(token_streamer)


def main():
with HuggingFaceMiner() as miner:
while True:
Expand All @@ -253,4 +258,4 @@ def main():


if __name__ == "__main__":
main()
main()

0 comments on commit 95edcad

Please sign in to comment.