From febd65f94f8b5dc1282467aaeb98edafd2531b4b Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Fri, 15 Nov 2024 07:39:33 -0800 Subject: [PATCH 01/10] commit change --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 63be3c41e8..3cd2adf4f0 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ ] install_requires = [ - 'mosaicml[libcloud,wandb,oci,gcs,mlflow]>=0.26.0,<0.27', + 'mosaicml[libcloud,wandb,oci,gcs,mlflow]>=0.27.0,<0.28', 'mlflow>=2.14.1,<2.18', 'accelerate>=0.25,<1.2', # for HF inference `device_map` 'transformers>=4.43.2,<4.47', @@ -91,7 +91,7 @@ ] extra_deps['databricks'] = [ - 'mosaicml[databricks]>=0.26.0,<0.27', + 'mosaicml[databricks]>=0.27.0,<0.28', 'numpy<2', 'databricks-sql-connector>=3,<4', 'databricks-connect==14.1.0', @@ -99,7 +99,7 @@ ] extra_deps['tensorboard'] = [ - 'mosaicml[tensorboard]>=0.26.0,<0.27', + 'mosaicml[tensorboard]>=0.27.0,<0.28', ] # Flash 2 group kept for backwards compatibility @@ -110,7 +110,7 @@ extra_deps['gpu'] = copy.deepcopy(extra_deps['gpu-flash2']) extra_deps['peft'] = [ - 'mosaicml[peft]>=0.26.0,<0.27', + 'mosaicml[peft]>=0.27.0,<0.28', ] extra_deps['openai'] = [ From 786a136eef6e15b4e83c619b96cf83dafa489918 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Mon, 18 Nov 2024 16:40:44 -0800 Subject: [PATCH 02/10] commit change --- .github/workflows/docker.yaml | 8 ++++---- .github/workflows/pr-cpu.yaml | 4 ++-- .github/workflows/pr-gpu.yaml | 12 ++++++------ .github/workflows/release.yaml | 4 ++-- README.md | 12 ++++++------ setup.py | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c3fc9168ee..0c7c7557ff 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -17,11 +17,11 @@ jobs: strategy: matrix: include: - - name: "2.4.0_cu124" - base_image: mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04 + - name: "2.5.1_cu124" + base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04 dep_groups: "[all]" - - name: "2.4.0_cu124_aws" - base_image: mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04-aws + - name: "2.5.1_cu124_aws" + base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04-aws dep_groups: "[all]" steps: diff --git a/.github/workflows/pr-cpu.yaml b/.github/workflows/pr-cpu.yaml index 056b070143..73891305e3 100644 --- a/.github/workflows/pr-cpu.yaml +++ b/.github/workflows/pr-cpu.yaml @@ -21,9 +21,9 @@ jobs: strategy: matrix: include: - - name: "cpu-2.4.0" + - name: "cpu-2.5.1" pip_deps: "[all-cpu]" - container: mosaicml/pytorch:2.4.0_cpu-python3.11-ubuntu20.04 + container: mosaicml/pytorch:2.5.1_cpu-python3.11-ubuntu20.04 markers: "not gpu" pytest_command: "coverage run -m pytest" steps: diff --git a/.github/workflows/pr-gpu.yaml b/.github/workflows/pr-gpu.yaml index 5b91d54442..cdfc4b7b64 100644 --- a/.github/workflows/pr-gpu.yaml +++ b/.github/workflows/pr-gpu.yaml @@ -22,8 +22,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.4.0-1" - container: mosaicml/llm-foundry:2.4.0_cu124-latest + - name: "gpu-2.5.1-1" + container: mosaicml/llm-foundry:2.5.1_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" @@ -51,8 +51,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.4.0-2" - container: mosaicml/llm-foundry:2.4.0_cu124-latest + - name: "gpu-2.5.1-2" + container: mosaicml/llm-foundry:2.5.1_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" @@ -80,8 +80,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.4.0-4" - container: mosaicml/llm-foundry:2.4.0_cu124-latest + - name: "gpu-2.5.1-4" + container: mosaicml/llm-foundry:2.5.1_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 15c83035e0..463aac6a7d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -93,7 +93,7 @@ jobs: ${{ env.AWS_DOCKER_TAG }} ${{ env.AWS_LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04-aws + BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04-aws BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true @@ -108,7 +108,7 @@ jobs: ${{ env.DOCKER_TAG }} ${{ env.LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04 + BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04 BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true diff --git a/README.md b/README.md index bc4eff48fd..0eb3c162d3 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ If you have success/failure using LLM Foundry on other systems, please let us kn | Device | Torch Version | Cuda Version | Status | | -------------- | ------------- | ------------ | ---------------------------- | -| A100-40GB/80GB | 2.4.0 | 12.4 | :white_check_mark: Supported | -| H100-80GB | 2.4.0 | 12.4 | :white_check_mark: Supported | +| A100-40GB/80GB | 2.5.1 | 12.4 | :white_check_mark: Supported | +| H100-80GB | 2.5.1 | 12.4 | :white_check_mark: Supported | ## MosaicML Docker Images We highly recommend using our prebuilt Docker images. You can find them here: https://hub.docker.com/orgs/mosaicml/repositories. @@ -122,15 +122,15 @@ We highly recommend using our prebuilt Docker images. You can find them here: ht The `mosaicml/pytorch` images are pinned to specific PyTorch and CUDA versions, and are stable and rarely updated. The `mosaicml/llm-foundry` images are built with new tags upon every commit to the `main` branch. -You can select a specific commit hash such as `mosaicml/llm-foundry:2.4.0_cu124-36ab1ba` or take the latest one using `mosaicml/llm-foundry:2.4.0_cu124-latest`. +You can select a specific commit hash such as `mosaicml/llm-foundry:2.5.1_cu124-36ab1ba` or take the latest one using `mosaicml/llm-foundry:2.5.1_cu124-latest`. **Please Note:** The `mosaicml/llm-foundry` images do not come with the `llm-foundry` package preinstalled, just the dependencies. You will still need to `pip install llm-foundry` either from PyPi or from source. | Docker Image | Torch Version | Cuda Version | LLM Foundry dependencies installed? | | ------------------------------------------------------ | ------------- | ----------------- | ----------------------------------- | -| `mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04` | 2.4.0 | 12.4 (Infiniband) | No | -| `mosaicml/llm-foundry:2.4.0_cu124-latest` | 2.4.0 | 12.4 (Infiniband) | Yes | -| `mosaicml/llm-foundry:2.4.0_cu124_aws-latest` | 2.4.0 | 12.4 (EFA) | Yes | +| `mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04` | 2.5.1 | 12.4 (Infiniband) | No | +| `mosaicml/llm-foundry:2.5.1_cu124-latest` | 2.5.1 | 12.4 (Infiniband) | Yes | +| `mosaicml/llm-foundry:2.5.1_cu124_aws-latest` | 2.5.1 | 12.4 (EFA) | Yes | # Installation diff --git a/setup.py b/setup.py index 3cd2adf4f0..2be0a3d40a 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ 'accelerate>=0.25,<1.2', # for HF inference `device_map` 'transformers>=4.43.2,<4.47', 'mosaicml-streaming>=0.9.0,<0.10', - 'torch>=2.4.0,<2.4.1', + 'torch>=2.5.1,<2.5.2', 'datasets>=2.20.0,<2.21', 'fsspec==2023.6.0', # newer version results in a bug in datasets that duplicates data 'sentencepiece==0.2.0', From dea6e55d02fbf6f752fec9e7c3e224b31858521a Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:23:06 -0800 Subject: [PATCH 03/10] commit change --- .github/workflows/docker.yaml | 4 ++-- .github/workflows/pr-cpu.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- README.md | 2 +- setup.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 0c7c7557ff..39043ef92a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -18,10 +18,10 @@ jobs: matrix: include: - name: "2.5.1_cu124" - base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04 + base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04 dep_groups: "[all]" - name: "2.5.1_cu124_aws" - base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04-aws + base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04-aws dep_groups: "[all]" steps: diff --git a/.github/workflows/pr-cpu.yaml b/.github/workflows/pr-cpu.yaml index 73891305e3..c500df9cd7 100644 --- a/.github/workflows/pr-cpu.yaml +++ b/.github/workflows/pr-cpu.yaml @@ -23,7 +23,7 @@ jobs: include: - name: "cpu-2.5.1" pip_deps: "[all-cpu]" - container: mosaicml/pytorch:2.5.1_cpu-python3.11-ubuntu20.04 + container: mosaicml/pytorch:2.5.1_cpu-python3.11-ubuntu22.04 markers: "not gpu" pytest_command: "coverage run -m pytest" steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 463aac6a7d..19bb050eb7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -93,7 +93,7 @@ jobs: ${{ env.AWS_DOCKER_TAG }} ${{ env.AWS_LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04-aws + BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04-aws BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true @@ -108,7 +108,7 @@ jobs: ${{ env.DOCKER_TAG }} ${{ env.LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04 + BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04 BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true diff --git a/README.md b/README.md index 0eb3c162d3..61a36e646b 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ You can select a specific commit hash such as `mosaicml/llm-foundry:2.5.1_cu124- | Docker Image | Torch Version | Cuda Version | LLM Foundry dependencies installed? | | ------------------------------------------------------ | ------------- | ----------------- | ----------------------------------- | -| `mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu20.04` | 2.5.1 | 12.4 (Infiniband) | No | +| `mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04` | 2.5.1 | 12.4 (Infiniband) | No | | `mosaicml/llm-foundry:2.5.1_cu124-latest` | 2.5.1 | 12.4 (Infiniband) | Yes | | `mosaicml/llm-foundry:2.5.1_cu124_aws-latest` | 2.5.1 | 12.4 (EFA) | Yes | diff --git a/setup.py b/setup.py index 2be0a3d40a..b401f4d7b8 100644 --- a/setup.py +++ b/setup.py @@ -79,11 +79,11 @@ extra_deps = {} extra_deps['dev'] = [ - 'coverage[toml]==7.6.1', + 'coverage[toml]==7.6.4', 'pre-commit>=3.4.0,<4', 'pytest>=7.2.1,<9', 'pytest_codeblocks>=0.16.1,<0.18', - 'pytest-cov>=4,<6', + 'pytest-cov>=4,<7', 'pyright==1.1.256', 'toml>=0.10.2,<0.11', 'packaging>=21,<25', From 8356e1f53bd309c6f22935a0a27fa20bac143cde Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:24:53 -0800 Subject: [PATCH 04/10] commit change --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b401f4d7b8..566e6aae9c 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ 'accelerate>=0.25,<1.2', # for HF inference `device_map` 'transformers>=4.43.2,<4.47', 'mosaicml-streaming>=0.9.0,<0.10', - 'torch>=2.5.1,<2.5.2', + 'torch>=2.4.0,<2.4.1', 'datasets>=2.20.0,<2.21', 'fsspec==2023.6.0', # newer version results in a bug in datasets that duplicates data 'sentencepiece==0.2.0', From a6589bcbd847156049f184f535c4724461df6634 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:28:20 -0800 Subject: [PATCH 05/10] commit change --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 566e6aae9c..9c54fdc232 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ 'accelerate>=0.25,<1.2', # for HF inference `device_map` 'transformers>=4.43.2,<4.47', 'mosaicml-streaming>=0.9.0,<0.10', - 'torch>=2.4.0,<2.4.1', + 'torch>=2.4.0,<2.5.2', 'datasets>=2.20.0,<2.21', 'fsspec==2023.6.0', # newer version results in a bug in datasets that duplicates data 'sentencepiece==0.2.0', From 7a4019e51563ff1fec0e086c12b938a2f6f54dc9 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:33:55 -0800 Subject: [PATCH 06/10] commit change --- .github/workflows/pr-cpu.yaml | 4 ++-- .github/workflows/pr-gpu.yaml | 12 ++++++------ .github/workflows/release.yaml | 4 ++-- README.md | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-cpu.yaml b/.github/workflows/pr-cpu.yaml index c500df9cd7..056b070143 100644 --- a/.github/workflows/pr-cpu.yaml +++ b/.github/workflows/pr-cpu.yaml @@ -21,9 +21,9 @@ jobs: strategy: matrix: include: - - name: "cpu-2.5.1" + - name: "cpu-2.4.0" pip_deps: "[all-cpu]" - container: mosaicml/pytorch:2.5.1_cpu-python3.11-ubuntu22.04 + container: mosaicml/pytorch:2.4.0_cpu-python3.11-ubuntu20.04 markers: "not gpu" pytest_command: "coverage run -m pytest" steps: diff --git a/.github/workflows/pr-gpu.yaml b/.github/workflows/pr-gpu.yaml index cdfc4b7b64..5b91d54442 100644 --- a/.github/workflows/pr-gpu.yaml +++ b/.github/workflows/pr-gpu.yaml @@ -22,8 +22,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.5.1-1" - container: mosaicml/llm-foundry:2.5.1_cu124-latest + - name: "gpu-2.4.0-1" + container: mosaicml/llm-foundry:2.4.0_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" @@ -51,8 +51,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.5.1-2" - container: mosaicml/llm-foundry:2.5.1_cu124-latest + - name: "gpu-2.4.0-2" + container: mosaicml/llm-foundry:2.4.0_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" @@ -80,8 +80,8 @@ jobs: fail-fast: false matrix: include: - - name: "gpu-2.5.1-4" - container: mosaicml/llm-foundry:2.5.1_cu124-latest + - name: "gpu-2.4.0-4" + container: mosaicml/llm-foundry:2.4.0_cu124-latest markers: "gpu" pip_deps: "[all]" pytest_command: "coverage run -m pytest" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 19bb050eb7..15c83035e0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -93,7 +93,7 @@ jobs: ${{ env.AWS_DOCKER_TAG }} ${{ env.AWS_LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04-aws + BASE_IMAGE=mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04-aws BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true @@ -108,7 +108,7 @@ jobs: ${{ env.DOCKER_TAG }} ${{ env.LATEST_TAG }} build-args: | - BASE_IMAGE=mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04 + BASE_IMAGE=mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04 BRANCH_NAME=${{ env.BRANCH_NAME }} DEP_GROUPS=[all] KEEP_FOUNDRY=true diff --git a/README.md b/README.md index 61a36e646b..bc4eff48fd 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ If you have success/failure using LLM Foundry on other systems, please let us kn | Device | Torch Version | Cuda Version | Status | | -------------- | ------------- | ------------ | ---------------------------- | -| A100-40GB/80GB | 2.5.1 | 12.4 | :white_check_mark: Supported | -| H100-80GB | 2.5.1 | 12.4 | :white_check_mark: Supported | +| A100-40GB/80GB | 2.4.0 | 12.4 | :white_check_mark: Supported | +| H100-80GB | 2.4.0 | 12.4 | :white_check_mark: Supported | ## MosaicML Docker Images We highly recommend using our prebuilt Docker images. You can find them here: https://hub.docker.com/orgs/mosaicml/repositories. @@ -122,15 +122,15 @@ We highly recommend using our prebuilt Docker images. You can find them here: ht The `mosaicml/pytorch` images are pinned to specific PyTorch and CUDA versions, and are stable and rarely updated. The `mosaicml/llm-foundry` images are built with new tags upon every commit to the `main` branch. -You can select a specific commit hash such as `mosaicml/llm-foundry:2.5.1_cu124-36ab1ba` or take the latest one using `mosaicml/llm-foundry:2.5.1_cu124-latest`. +You can select a specific commit hash such as `mosaicml/llm-foundry:2.4.0_cu124-36ab1ba` or take the latest one using `mosaicml/llm-foundry:2.4.0_cu124-latest`. **Please Note:** The `mosaicml/llm-foundry` images do not come with the `llm-foundry` package preinstalled, just the dependencies. You will still need to `pip install llm-foundry` either from PyPi or from source. | Docker Image | Torch Version | Cuda Version | LLM Foundry dependencies installed? | | ------------------------------------------------------ | ------------- | ----------------- | ----------------------------------- | -| `mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04` | 2.5.1 | 12.4 (Infiniband) | No | -| `mosaicml/llm-foundry:2.5.1_cu124-latest` | 2.5.1 | 12.4 (Infiniband) | Yes | -| `mosaicml/llm-foundry:2.5.1_cu124_aws-latest` | 2.5.1 | 12.4 (EFA) | Yes | +| `mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04` | 2.4.0 | 12.4 (Infiniband) | No | +| `mosaicml/llm-foundry:2.4.0_cu124-latest` | 2.4.0 | 12.4 (Infiniband) | Yes | +| `mosaicml/llm-foundry:2.4.0_cu124_aws-latest` | 2.4.0 | 12.4 (EFA) | Yes | # Installation From d886783494c597c084952c4ddca50e7d5c6f9413 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:56:38 -0800 Subject: [PATCH 07/10] commit change --- .github/workflows/docker.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 39043ef92a..b548f34234 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -17,6 +17,12 @@ jobs: strategy: matrix: include: + - name: "2.4.0_cu124" + base_image: mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04 + dep_groups: "[all]" + - name: "2.4.0_cu124_aws" + base_image: mosaicml/pytorch:2.4.0_cu124-python3.11-ubuntu20.04-aws + dep_groups: "[all]" - name: "2.5.1_cu124" base_image: mosaicml/pytorch:2.5.1_cu124-python3.11-ubuntu22.04 dep_groups: "[all]" From dc2d27e422178054e49caafd79a90766a686ab8c Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 14:58:43 -0800 Subject: [PATCH 08/10] commit change --- scripts/inference/convert_composer_mpt_to_ft.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/inference/convert_composer_mpt_to_ft.py b/scripts/inference/convert_composer_mpt_to_ft.py index 16cfabf125..b2ebc96de9 100644 --- a/scripts/inference/convert_composer_mpt_to_ft.py +++ b/scripts/inference/convert_composer_mpt_to_ft.py @@ -132,7 +132,7 @@ def write_ft_checkpoint_from_composer_checkpoint( # Extract the HF tokenizer print('#' * 30) print('Extracting HF Tokenizer...') - hf_tokenizer = get_hf_tokenizer_from_composer_state_dict( + hf_tokenizer = get_hf_tokenizer_from_composer_state_dict( composer_state_dict, trust_remote_code, ) @@ -141,7 +141,7 @@ def write_ft_checkpoint_from_composer_checkpoint( # Extract the model weights weights_state_dict = composer_state_dict['state']['model'] - torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( + torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( # pyright: ignore weights_state_dict, prefix='model.', ) From 935594f9891344caf19b8fc7ccee098822e02360 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 15:13:13 -0800 Subject: [PATCH 09/10] commit change --- scripts/inference/convert_composer_mpt_to_ft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/inference/convert_composer_mpt_to_ft.py b/scripts/inference/convert_composer_mpt_to_ft.py index b2ebc96de9..cd1815e20f 100644 --- a/scripts/inference/convert_composer_mpt_to_ft.py +++ b/scripts/inference/convert_composer_mpt_to_ft.py @@ -132,7 +132,7 @@ def write_ft_checkpoint_from_composer_checkpoint( # Extract the HF tokenizer print('#' * 30) print('Extracting HF Tokenizer...') - hf_tokenizer = get_hf_tokenizer_from_composer_state_dict( + hf_tokenizer = get_hf_tokenizer_from_composer_state_dict( # pyright: ignore composer_state_dict, trust_remote_code, ) From a0d63755ec14da88fbfc796e8251c74e59353062 Mon Sep 17 00:00:00 2001 From: Chuck Tang Date: Wed, 20 Nov 2024 15:22:59 -0800 Subject: [PATCH 10/10] commit change --- scripts/inference/convert_composer_to_hf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/inference/convert_composer_to_hf.py b/scripts/inference/convert_composer_to_hf.py index dc7314f3e9..3afd09cb46 100644 --- a/scripts/inference/convert_composer_to_hf.py +++ b/scripts/inference/convert_composer_to_hf.py @@ -133,7 +133,7 @@ def write_huggingface_pretrained_from_composer_checkpoint( weights_state_dict = composer_state_dict if 'state' in weights_state_dict: weights_state_dict = weights_state_dict['state']['model'] - torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( + torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( # pyright: ignore weights_state_dict, prefix='model.', )