fix: building mpt dependencies

Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
aarnphm-ec2-dev
2023-07-11 00:21:23 +00:00
parent 61bfd64bd5
commit c2bb29b4f3
4 changed files with 12 additions and 7 deletions

View File

@@ -72,19 +72,19 @@ all = [
"openllm[falcon]",
"openllm[mpt]",
"openllm[starcoder]",
"openllm[fine-tune]",
"openllm[ggml]",
"openllm[openai]",
"openllm[agents]",
"openllm[playground]",
"openllm[flan-t5]",
"openllm[agents]",
"openllm[ggml]",
"openllm[fine-tune]",
]
chatglm = ["cpm-kernels", "sentencepiece"]
falcon = ["einops", "xformers", "safetensors"]
fine-tune = ["peft", "bitsandbytes", "datasets", "accelerate", "deepspeed", "trl"]
flan-t5 = ["flax", "jax", "jaxlib", "tensorflow", "keras"]
ggml = ["ctransformers"]
mpt = ["triton"]
mpt = ["triton", "einops"]
openai = ["openai", "tiktoken"]
playground = ["jupyter", "notebook", "ipython", "jupytext", "nbformat"]
starcoder = ["bitsandbytes"]

View File

@@ -2056,9 +2056,8 @@ def prune_command(yes: bool, model_store: ModelStore = Provide[BentoMLContainer.
"""Remove all saved models locally."""
available = [
m
for t in map(inflection.dasherize, openllm.CONFIG_MAPPING.keys())
for m in bentoml.models.list()
if t in m.tag.name
if 'framework' in m.info.labels and m.info.labels['framework'] == 'openllm'
]
for model in available:

View File

@@ -230,6 +230,8 @@ def make_attr_tuple_class(cls_name: str, attr_names: t.Sequence[str]):
__slots__ = ()
x = property(itemgetter(0))
"""
from . import SHOW_CODEGEN
attr_class_name = f"{cls_name}Attributes"
attr_class_template = [
f"class {attr_class_name}(tuple):",
@@ -241,7 +243,11 @@ def make_attr_tuple_class(cls_name: str, attr_names: t.Sequence[str]):
else:
attr_class_template.append(" pass")
globs: DictStrAny = {"_attrs_itemgetter": itemgetter, "_attrs_property": property}
if SHOW_CODEGEN:
logger.info("Generated class for %s:\n\n%s", attr_class_name, "\n".join(attr_class_template))
_compile_and_eval("\n".join(attr_class_template), globs)
return globs[attr_class_name]

View File

@@ -95,7 +95,7 @@ _NIGHTLY_MAPPING: dict[str, Dependencies] = {
FINE_TUNE_DEPS = ["peft", "bitsandbytes", "datasets", "accelerate", "deepspeed", "trl"]
FLAN_T5_DEPS = ["flax", "jax", "jaxlib", "tensorflow", "keras"]
MPT_DEPS = ["triton"]
MPT_DEPS = ["triton", "einops"]
OPENAI_DEPS = ["openai", "tiktoken"]
AGENTS_DEPS = ["transformers[agents]>=4.30", "diffusers", "soundfile"]
FALCON_DEPS = ["einops", "xformers", "safetensors"]