From 1a9c9c4daf97d0fe48636cc969ee7baba8dda1e6 Mon Sep 17 00:00:00 2001 From: Daniel King <43149077+dakinggg@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:27:53 -0700 Subject: [PATCH 1/4] add cloud stores to foundry deps (#612) * add cloud stores to foundry deps * also add boto explicitly --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5cd1309922..f86b03bbab 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ ] install_requires = [ - 'mosaicml[libcloud,wandb,mlflow]>=0.16.1,<0.17', + 'mosaicml[libcloud,wandb,mlflow,oci,gcs]>=0.16.1,<0.17', 'accelerate>=0.20,<0.21', # for HF inference `device_map` 'transformers>=4.33,<4.34', 'mosaicml-streaming>=0.6,<0.7', @@ -64,6 +64,7 @@ 'cmake>=3.25.0,<=3.26.3', # required for triton-pre-mlir below # PyPI does not support direct dependencies, so we remove this line before uploading from PyPI 'triton-pre-mlir@git+https://github.com/vchiley/triton.git@triton_pre_mlir_sm90#subdirectory=python', + 'boto3>=1.21.45,<2', ] extra_deps = {} From 9cf375e3a6aa4a49a5119170691f69870c80dba1 Mon Sep 17 00:00:00 2001 From: Irene Dea Date: Tue, 19 Sep 2023 19:41:32 -0700 Subject: [PATCH 2/4] Fix eval yamls (#609) --- scripts/eval/yamls/hf_8bit_eval.yaml | 2 +- scripts/eval/yamls/hf_eval.yaml | 2 +- scripts/eval/yamls/hf_lora_eval.yml | 6 ++++-- scripts/eval/yamls/mpt_eval.yaml | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/eval/yamls/hf_8bit_eval.yaml b/scripts/eval/yamls/hf_8bit_eval.yaml index 4f195cdc54..4e1e9c8dc7 100644 --- a/scripts/eval/yamls/hf_8bit_eval.yaml +++ b/scripts/eval/yamls/hf_8bit_eval.yaml @@ -10,7 +10,7 @@ models: model: name: hf_causal_lm pretrained_model_name_or_path: ${model_name_or_path} - init_device: cpu + init_device: mixed pretrained: true load_in_8bit: true tokenizer: diff --git a/scripts/eval/yamls/hf_eval.yaml b/scripts/eval/yamls/hf_eval.yaml index 8eecf57c30..05169818d9 100644 --- a/scripts/eval/yamls/hf_eval.yaml +++ b/scripts/eval/yamls/hf_eval.yaml @@ -12,7 +12,7 @@ models: model: name: hf_causal_lm pretrained_model_name_or_path: ${model_name_or_path} - init_device: cpu + init_device: mixed pretrained: true tokenizer: name: ${model_name_or_path} diff --git a/scripts/eval/yamls/hf_lora_eval.yml b/scripts/eval/yamls/hf_lora_eval.yml index 80300b7668..fc7074c18b 100644 --- a/scripts/eval/yamls/hf_lora_eval.yml +++ b/scripts/eval/yamls/hf_lora_eval.yml @@ -5,7 +5,9 @@ precision: amp_fp16 # If you are using one model, put it here: model_name_or_path: EleutherAI/gpt-neo-125m # If you are using a seperated lora weight, put it here: -lora_id_or_path: nathan0/lora-gpt-neo-125m-alpaca +# lora weights must be compatible with the specified model +lora_id_or_path: edbeeching/gpt-neo-125M-imdb-lora # Example lora weights for gpt-neo-125m + # otherwise, write a block for each model you want to test in the `models` section models: @@ -14,7 +16,7 @@ models: model: name: hf_causal_lm pretrained_model_name_or_path: ${model_name_or_path} - init_device: cpu + init_device: mixed pretrained: true pretrained_lora_id_or_path: ${lora_id_or_path} tokenizer: diff --git a/scripts/eval/yamls/mpt_eval.yaml b/scripts/eval/yamls/mpt_eval.yaml index 42b071899a..c8d359fc76 100644 --- a/scripts/eval/yamls/mpt_eval.yaml +++ b/scripts/eval/yamls/mpt_eval.yaml @@ -3,7 +3,6 @@ tokenizer_name: EleutherAI/gpt-neox-20b seed: 1 precision: amp_fp16 - models: - model_name: mpt_test @@ -14,7 +13,8 @@ models: model_max_length: ${max_seq_len} model: name: mpt_causal_lm - init_device: meta + init_device: mixed + # Set the below model parameters to match the checkpoint specified with load_path d_model: 768 n_heads: 12 n_layers: 12 From c782e308fde630d60986a6956af46622f2a0b3e0 Mon Sep 17 00:00:00 2001 From: Jerry Chen Date: Wed, 20 Sep 2023 12:07:29 -0700 Subject: [PATCH 3/4] Upgrade huggingface-hub dependency (#613) --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f86b03bbab..f5d223747d 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,7 @@ # PyPI does not support direct dependencies, so we remove this line before uploading from PyPI 'triton-pre-mlir@git+https://github.com/vchiley/triton.git@triton_pre_mlir_sm90#subdirectory=python', 'boto3>=1.21.45,<2', + 'huggingface-hub>=0.17.0,<1.0', ] extra_deps = {} From 299e737c2a9799167f5a43574d3c1fa4ba7d269e Mon Sep 17 00:00:00 2001 From: Daniel King <43149077+dakinggg@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:22:26 -0700 Subject: [PATCH 4/4] Run CPU tests on a new dep group `all-cpu` (#616) * make tests run optional deps * precommit * fix order * reprompt tests --- .github/workflows/pytest-cpu.yaml | 2 +- setup.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest-cpu.yaml b/.github/workflows/pytest-cpu.yaml index c5fe309cf3..d66d18b5df 100644 --- a/.github/workflows/pytest-cpu.yaml +++ b/.github/workflows/pytest-cpu.yaml @@ -27,7 +27,7 @@ jobs: set -ex export PATH=/composer-python:$PATH python -m pip install --upgrade 'pip<23' wheel - python -m pip install --upgrade .[dev] + python -m pip install --upgrade .[all-cpu] - name: Run Tests id: tests run: | diff --git a/setup.py b/setup.py index f5d223747d..33d61b7a20 100644 --- a/setup.py +++ b/setup.py @@ -105,6 +105,8 @@ 'openai==0.27.8', 'tiktoken==0.4.0', ] +extra_deps['all-cpu'] = set( + dep for key, deps in extra_deps.items() for dep in deps if 'gpu' not in key) extra_deps['all'] = set(dep for deps in extra_deps.values() for dep in deps) setup(