Skip to content

Commit

Permalink
added petals
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Al-Saffar committed Apr 29, 2024
1 parent 7d7c923 commit 945522f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions llm.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

# LLM:
* https://github.com/xai-org/grok-1
* https://github.com/bigscience-workshop/petals `LLM on private swarm`
* https://github.com/h2oai/h2o-llmstudio `framework and no-code GUI designed for fine-tuning state-of-the-art large language models (LLMs).`
* https://github.com/hiyouga/LLaMA-Factory `Finetune`
* https://github.com/microsoft/DeepSpeed `training with a single click, offering 15x speedup over SOTA RLHF systems with unprecedented cost reduction at all scales`.
Expand Down
2 changes: 1 addition & 1 deletion src/machineconfig/jobs/python/check_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def scan(path: P, pct: float = 0.0):
return None
with open(str(path), "rb") as f:
analysis = client.scan_file(f)
repeat_counter = 0
repeat_counter: int = 0
while True:
with console.status(f"waiting for scan of {path} ... "):
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

from IPython.core.magic import register_line_magic
from crocodile.file_management import P, randstr, Struct
from typing import Any
# from typing import Any


@register_line_magic("print_dir") # type: ignore
def print_dir_func(line: Any):
def print_dir():
"""Pretty print and categorize dir() output."""
_ = line # ipython caller assumes there is at least one argument, an passes '' worstcase.
res: dict[str, list[str]] = {}
for item in globals().keys():
if item.startswith("_") or item in ("open", "In", "Out", "quit", "exit", "get_ipython"):
continue
if item in ("P", "randstr", "Struct", "print_code", "print_dir_func", "print_program_func", "run_python_file_in_this_namespace"):
continue
if item.startswith("_"): continue
type_ = repr(type(eval(item))) # type: ignore # pylint: disable=eval-used
if "typing." in type_: continue
if type_ in res: res[type_].append(item)
Expand All @@ -25,7 +21,7 @@ def print_dir_func(line: Any):


@register_line_magic("code") # type: ignore
def print_program_func(obj_str: str):
def print_program(obj_str: str):
"""Inspect the code of an object."""
from rich.syntax import Syntax
import inspect
Expand All @@ -40,8 +36,7 @@ def run_python_file_in_this_namespace(a_path: str, module: bool = False):
"""Given a potentially dirty path of python file, run it in this namespace."""
from machineconfig.utils.utils import match_file_name, sanitize_path
path = sanitize_path(P(a_path))
if not path.exists():
path = match_file_name(a_path)
if not path.exists(): path = match_file_name(a_path)
from IPython import get_ipython # type: ignore # this gets the same instance, its in the namespace anyway even if not imported.
if module:
code_snippet = f"""
Expand Down
1 change: 0 additions & 1 deletion src/machineconfig/setup_linux/openssh_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ sudo apt install openssh-server -y
# sudo service ssh restart
# tunnels: https://www.youtube.com/watch?v=Wp7boqm3Xts
echo "FINISHED installing openssh-server."

0 comments on commit 945522f

Please sign in to comment.