From 75587464ddf14e1f75829e85b78fa2071f7bad7a Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Mon, 16 Dec 2024 16:55:30 +0800 Subject: [PATCH 01/16] refactor install and bump version to 0.4.4 Signed-off-by: Sun, Xuehao --- MANIFEST.in | 1 + README.md | 20 +++++++++++++++++--- auto_round/version.py | 2 +- requirements-cpu.txt | 10 ---------- requirements-gpu.txt | 5 +++++ requirements-hpu.txt | 10 ---------- requirements.txt | 7 +------ setup.py | 17 ++++++----------- 8 files changed, 31 insertions(+), 41 deletions(-) create mode 100644 requirements-gpu.txt diff --git a/MANIFEST.in b/MANIFEST.in index d2abcd5f..906cf0d2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include requirements.txt include requirements-cpu.txt include requirements-hpu.txt +include requirements-gpu.txt diff --git a/README.md b/README.md index 3eb17d12..0d5788eb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ AutoRound

Advanced Quantization Algorithm for LLMs

[![python](https://img.shields.io/badge/python-3.9%2B-blue)](https://github.com/intel/auto-round) -[![version](https://img.shields.io/badge/release-0.4.3-green)](https://github.com/intel/auto-round) +[![version](https://img.shields.io/badge/release-0.4.4-green)](https://github.com/intel/auto-round) [![license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/intel/auto-round/blob/main/LICENSE) ---
@@ -47,14 +47,28 @@ details and quantized models in several Hugging Face Spaces, e.g. [OPEA](https:/ ### Install from pypi ```bash -pip install auto-round +# GPU +pip install auto-round[gpu] + +# CPU +pip install auto-round[cpu] + +# HPU +pip install auto-round[hpu] ```
Build from Source ```bash - pip install -vvv --no-build-isolation . + # GPU + pip install -vvv --no-build-isolation .[gpu] + + # CPU + pip install -vvv --no-build-isolation .[cpu] + + # HPU + pip install -vvv --no-build-isolation .[hpu] ```
diff --git a/auto_round/version.py b/auto_round/version.py index 80ebd5fd..b9e2ac06 100644 --- a/auto_round/version.py +++ b/auto_round/version.py @@ -14,4 +14,4 @@ """IntelĀ® auto-round: An open-source Python library supporting popular model weight only compression based on signround.""" -__version__ = "0.4.3" +__version__ = "0.4.4" diff --git a/requirements-cpu.txt b/requirements-cpu.txt index 71228b64..896d03b0 100644 --- a/requirements-cpu.txt +++ b/requirements-cpu.txt @@ -1,16 +1,6 @@ -accelerate -datasets -py-cpuinfo -sentencepiece torch transformers>=4.38 -numpy < 2.0 threadpoolctl lm-eval>=0.4.2,<0.5 -tqdm -packaging -pillow -numba -tbb intel-extension-for-pytorch intel-extension-for-transformers diff --git a/requirements-gpu.txt b/requirements-gpu.txt new file mode 100644 index 00000000..1c065bd4 --- /dev/null +++ b/requirements-gpu.txt @@ -0,0 +1,5 @@ +torch +transformers>=4.38 +threadpoolctl +lm-eval>=0.4.2,<0.5 +auto-gptq>=0.7.1 diff --git a/requirements-hpu.txt b/requirements-hpu.txt index e3f9cc9d..976a2b1f 100644 --- a/requirements-hpu.txt +++ b/requirements-hpu.txt @@ -1,11 +1 @@ -accelerate -datasets -py-cpuinfo -sentencepiece transformers -numpy < 2.0 -tqdm -packaging -pillow -numba -tbb \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index b79b9038..5f89d5df 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,14 +2,9 @@ accelerate datasets py-cpuinfo sentencepiece -torch -transformers>=4.38 numpy < 2.0 -threadpoolctl -lm-eval>=0.4.2,<0.5 tqdm packaging -auto-gptq>=0.7.1 pillow numba -tbb +tbb \ No newline at end of file diff --git a/setup.py b/setup.py index 98582dbf..3a9b82e6 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,6 @@ def is_cuda_available(): try: - os.system("pip install torch") import torch return torch.cuda.is_available() @@ -112,15 +111,6 @@ def detect_local_sm_architectures(): return arch_list -def detect_hardware(): - if is_hpu_available(): - return "requirements-hpu.txt" - elif is_cuda_available(): - return "requirements.txt" - else: - return "requirements-cpu.txt" - - UNSUPPORTED_COMPUTE_CAPABILITIES = ['3.5', '3.7', '5.0', '5.2', '5.3'] if BUILD_CUDA_EXT: @@ -229,7 +219,12 @@ def detect_hardware(): "auto_round_extension.*", ], ), - "install_requires": fetch_requirements(detect_hardware()), + "install_requires": fetch_requirements("requirements.txt"), + "extras_require": { + "hpu": fetch_requirements("requirements-hpu.txt"), + "gpu": fetch_requirements("requirements-gpu.txt"), + "cpu": fetch_requirements("requirements-cpu.txt"), + }, } if __name__ == "__main__": From 242f2620d1365bbebeae6a357c82e2d69f4226ac Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Mon, 16 Dec 2024 17:08:26 +0800 Subject: [PATCH 02/16] update install packages using wheel distribution Signed-off-by: Sun, Xuehao --- .azure-pipelines/template/ut-template.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.yml index e2c8c949..4efec29b 100644 --- a/.azure-pipelines/template/ut-template.yml +++ b/.azure-pipelines/template/ut-template.yml @@ -35,14 +35,15 @@ steps: - ${{ if eq(parameters.imageSource, 'build') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ - && pip install -vvv --no-build-isolation . \ + && python setup.py bdist_wheel \ + && pip install $(ls dist/*.whl | head -n 1)[cpu] \ && pip list" displayName: "Env Setup" - ${{ if eq(parameters.imageSource, 'pull') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ - && pip install -vvv --no-build-isolation . \ + && pip install $(ls dist/*.whl | head -n 1)[hpu] \ && pip list" displayName: "HPU Env Setup" From 3f81404b540e853b0d77376cc0f472112f8fbed0 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Mon, 16 Dec 2024 17:10:02 +0800 Subject: [PATCH 03/16] fix Signed-off-by: Sun, Xuehao --- .azure-pipelines/template/ut-template.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.yml index 4efec29b..f31eecbe 100644 --- a/.azure-pipelines/template/ut-template.yml +++ b/.azure-pipelines/template/ut-template.yml @@ -43,6 +43,7 @@ steps: - ${{ if eq(parameters.imageSource, 'pull') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ + && python setup.py bdist_wheel \ && pip install $(ls dist/*.whl | head -n 1)[hpu] \ && pip list" displayName: "HPU Env Setup" From 4e4b988d56880de24dbbb1d3944c6569b5d7e0f2 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Mon, 16 Dec 2024 17:17:19 +0800 Subject: [PATCH 04/16] fix Signed-off-by: Sun, Xuehao --- .azure-pipelines/template/ut-template.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.yml index f31eecbe..54f10966 100644 --- a/.azure-pipelines/template/ut-template.yml +++ b/.azure-pipelines/template/ut-template.yml @@ -35,16 +35,14 @@ steps: - ${{ if eq(parameters.imageSource, 'build') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ - && python setup.py bdist_wheel \ - && pip install $(ls dist/*.whl | head -n 1)[cpu] \ + && pip install .[cpu] \ && pip list" displayName: "Env Setup" - ${{ if eq(parameters.imageSource, 'pull') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ - && python setup.py bdist_wheel \ - && pip install $(ls dist/*.whl | head -n 1)[hpu] \ + && pip install .[hpu] \ && pip list" displayName: "HPU Env Setup" From 08d4d548afaf7cbf0760c307d45adf0dd162cdf7 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 17 Dec 2024 14:04:42 +0800 Subject: [PATCH 05/16] fix pylint Signed-off-by: Sun, Xuehao --- .azure-pipelines/scripts/codeScan/pylint/pylint.sh | 2 ++ .azure-pipelines/template/ut-template.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.azure-pipelines/scripts/codeScan/pylint/pylint.sh b/.azure-pipelines/scripts/codeScan/pylint/pylint.sh index 89ebd35c..a1ed65ad 100644 --- a/.azure-pipelines/scripts/codeScan/pylint/pylint.sh +++ b/.azure-pipelines/scripts/codeScan/pylint/pylint.sh @@ -15,7 +15,9 @@ RESET="echo -en \\E[0m \\n" # close color log_dir="/auto-round/.azure-pipelines/scripts/codeScan/scanLog" mkdir -p $log_dir +pip install torch --index-url https://download.pytorch.org/whl/cpu pip install -r /auto-round/requirements.txt +pip install -r /auto-round/requirements-cpu.txt echo "[DEBUG] list pipdeptree..." pip install pipdeptree diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.yml index 54f10966..76c11142 100644 --- a/.azure-pipelines/template/ut-template.yml +++ b/.azure-pipelines/template/ut-template.yml @@ -35,6 +35,7 @@ steps: - ${{ if eq(parameters.imageSource, 'build') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ + && pip install torch --index-url https://download.pytorch.org/whl/cpu \ && pip install .[cpu] \ && pip list" displayName: "Env Setup" From 300050e17b9dcdd7135d98c644ac9658acbbd461 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Tue, 17 Dec 2024 14:18:05 +0800 Subject: [PATCH 06/16] fix pylint Signed-off-by: Sun, Xuehao --- auto_round/auto_quantizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_round/auto_quantizer.py b/auto_round/auto_quantizer.py index e3a193e2..6e421bce 100644 --- a/auto_round/auto_quantizer.py +++ b/auto_round/auto_quantizer.py @@ -546,7 +546,7 @@ def remove_device_str(s, device_str): ) if "gptq" in layer_backend and "exllamav2" in layer_backend: try: - from exllamav2_kernels import gemm_half_q_half, make_q_matrix # pylint: disable=E0611 + from exllamav2_kernels import gemm_half_q_half, make_q_matrix # pylint: disable=E0611, E0401 except: logger.warning_once( "For better inference performance, please install exllamav2 kernel " From f20d8c257d96e502bbd3671fe9ea4d14d893865b Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 27 Dec 2024 13:56:34 +0800 Subject: [PATCH 07/16] update installation instructions Signed-off-by: Sun, Xuehao --- README.md | 8 ++++---- requirements-cpu.txt | 4 ---- requirements-gpu.txt | 4 ---- requirements.txt | 6 +++++- setup.py | 24 +++++++++++++++--------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 0d5788eb..48c2e4f4 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ pip install auto-round[gpu] pip install auto-round[cpu] # HPU -pip install auto-round[hpu] +pip install auto-round-lib ```
@@ -62,13 +62,13 @@ pip install auto-round[hpu] ```bash # GPU - pip install -vvv --no-build-isolation .[gpu] + pip install .[gpu] # CPU - pip install -vvv --no-build-isolation .[cpu] + pip install .[cpu] # HPU - pip install -vvv --no-build-isolation .[hpu] + python setup.py install lib ```
diff --git a/requirements-cpu.txt b/requirements-cpu.txt index 896d03b0..70a8ecce 100644 --- a/requirements-cpu.txt +++ b/requirements-cpu.txt @@ -1,6 +1,2 @@ -torch -transformers>=4.38 -threadpoolctl -lm-eval>=0.4.2,<0.5 intel-extension-for-pytorch intel-extension-for-transformers diff --git a/requirements-gpu.txt b/requirements-gpu.txt index 1c065bd4..4a5350e7 100644 --- a/requirements-gpu.txt +++ b/requirements-gpu.txt @@ -1,5 +1 @@ -torch -transformers>=4.38 -threadpoolctl -lm-eval>=0.4.2,<0.5 auto-gptq>=0.7.1 diff --git a/requirements.txt b/requirements.txt index 5f89d5df..13809cc1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,8 @@ tqdm packaging pillow numba -tbb \ No newline at end of file +tbb +torch +transformers>=4.38 +threadpoolctl +lm-eval>=0.4.2,<0.5 \ No newline at end of file diff --git a/setup.py b/setup.py index 3a9b82e6..2729cf60 100644 --- a/setup.py +++ b/setup.py @@ -221,26 +221,32 @@ def detect_local_sm_architectures(): ), "install_requires": fetch_requirements("requirements.txt"), "extras_require": { - "hpu": fetch_requirements("requirements-hpu.txt"), "gpu": fetch_requirements("requirements-gpu.txt"), "cpu": fetch_requirements("requirements-cpu.txt"), }, } +LIB_INSTALL_CFG = {} + if __name__ == "__main__": - # There are two ways to install hpu-only package: - # 1. pip install -vvv --no-build-isolation -e .[hpu] - # 2. Within the gaudi docker where the HPU is available, we install the hpu package by default. + if "lib" in sys.argv: + sys.argv.remove("lib") + package_name = "auto_round_lib" + INSTALL_CFG = LIB_INSTALL_CFG + else: + package_name = "auto_round" + INSTALL_CFG = PKG_INSTALL_CFG + - include_packages = PKG_INSTALL_CFG.get("include_packages", {}) - install_requires = PKG_INSTALL_CFG.get("install_requires", []) - extras_require = PKG_INSTALL_CFG.get("extras_require", {}) + include_packages = INSTALL_CFG.get("include_packages", {}) + install_requires = INSTALL_CFG.get("install_requires", []) + extras_require = INSTALL_CFG.get("extras_require", {}) setup( - name="auto_round", + name=package_name, author="Intel AIPT Team", version=version, - author_email="wenhua.cheng@intel.com, weiwei1.zhang@intel.com", + author_email="wenhua.cheng@intel.com, weiwei1.zhang@intel.com, heng.guo@intel.com", description="Repository of AutoRound: Advanced Weight-Only Quantization Algorithm for LLMs", long_description=open("README.md", "r", encoding="utf-8").read(), long_description_content_type="text/markdown", From e1a6302fd82f50388568b99d621864071c6d7aaf Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Fri, 27 Dec 2024 15:35:16 +0800 Subject: [PATCH 08/16] Add auto-round-lib (#397) Signed-off-by: yiliu30 --- requirements-hpu.txt | 1 - requirements-lib.txt | 8 ++++++++ setup.py | 22 +++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) delete mode 100644 requirements-hpu.txt create mode 100644 requirements-lib.txt diff --git a/requirements-hpu.txt b/requirements-hpu.txt deleted file mode 100644 index 976a2b1f..00000000 --- a/requirements-hpu.txt +++ /dev/null @@ -1 +0,0 @@ -transformers diff --git a/requirements-lib.txt b/requirements-lib.txt new file mode 100644 index 00000000..48916bd7 --- /dev/null +++ b/requirements-lib.txt @@ -0,0 +1,8 @@ +py-cpuinfo +sentencepiece +numpy < 2.0 +tqdm +packaging +pillow +numba +tbb diff --git a/setup.py b/setup.py index 2729cf60..0a0a0567 100644 --- a/setup.py +++ b/setup.py @@ -226,7 +226,27 @@ def detect_local_sm_architectures(): }, } -LIB_INSTALL_CFG = {} +############################################################################### +# Configuration for auto_round_lib +# From pip: +# pip install auto-round-lib +# From source: +# python setup.py lib install +############################################################################### + + +LIB_REQUIREMENTS_FILE = "requirements-lib.txt" +LIB_INSTALL_CFG = { + "include_packages": find_packages( + include=[ + "auto_round", + "auto_round.*", + "auto_round_extension", + "auto_round_extension.*", + ], + ), + "install_requires": fetch_requirements(LIB_REQUIREMENTS_FILE), +} if __name__ == "__main__": if "lib" in sys.argv: From 5d2ee3a4249a434ef9365d874db43631bf927ed8 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Fri, 27 Dec 2024 15:42:19 +0800 Subject: [PATCH 09/16] Update requirements-lib Signed-off-by: Sun, Xuehao --- .azure-pipelines/template/ut-template.yml | 3 ++- MANIFEST.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/template/ut-template.yml b/.azure-pipelines/template/ut-template.yml index 76c11142..a1b84a7e 100644 --- a/.azure-pipelines/template/ut-template.yml +++ b/.azure-pipelines/template/ut-template.yml @@ -43,7 +43,8 @@ steps: - ${{ if eq(parameters.imageSource, 'pull') }}: - script: | docker exec ${{ parameters.utContainerName }} bash -c "cd /auto-round \ - && pip install .[hpu] \ + && python setup.py bdist_wheel lib \ + && pip install dist/*.whl \ && pip list" displayName: "HPU Env Setup" diff --git a/MANIFEST.in b/MANIFEST.in index 906cf0d2..471010b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include requirements.txt include requirements-cpu.txt include requirements-hpu.txt -include requirements-gpu.txt +include requirements-lib.txt From 024f5069aeae4aa9d8091690eb040c6b7d4a583c Mon Sep 17 00:00:00 2001 From: yiliu30 Date: Fri, 27 Dec 2024 02:54:20 -0500 Subject: [PATCH 10/16] build lib by default in gaudi docker Signed-off-by: yiliu30 --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0a0a0567..39363c27 100644 --- a/setup.py +++ b/setup.py @@ -249,7 +249,12 @@ def detect_local_sm_architectures(): } if __name__ == "__main__": - if "lib" in sys.argv: + # Build the auto_round_lib if the user explicitly requests it or if running in a Gaudi Docker environment. + is_user_requesting_library_build = "lib" in sys.argv + + should_build_library = is_user_requesting_library_build or BUILD_HPU_ONLY + + if should_build_library: sys.argv.remove("lib") package_name = "auto_round_lib" INSTALL_CFG = LIB_INSTALL_CFG @@ -257,7 +262,6 @@ def detect_local_sm_architectures(): package_name = "auto_round" INSTALL_CFG = PKG_INSTALL_CFG - include_packages = INSTALL_CFG.get("include_packages", {}) install_requires = INSTALL_CFG.get("install_requires", []) extras_require = INSTALL_CFG.get("extras_require", {}) From 582121e75207950189e21a366e89f390a71b5126 Mon Sep 17 00:00:00 2001 From: yiliu30 Date: Fri, 27 Dec 2024 02:56:48 -0500 Subject: [PATCH 11/16] update the doc Signed-off-by: yiliu30 --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 39363c27..5db0cd4d 100644 --- a/setup.py +++ b/setup.py @@ -249,7 +249,9 @@ def detect_local_sm_architectures(): } if __name__ == "__main__": - # Build the auto_round_lib if the user explicitly requests it or if running in a Gaudi Docker environment. + # There are two ways to install hpu-only package: + # 1. python setup.py lib install + # 2. Within the gaudi docker where the HPU is available, we install the auto_round_lib by default. is_user_requesting_library_build = "lib" in sys.argv should_build_library = is_user_requesting_library_build or BUILD_HPU_ONLY From 5dbc191ab31abdcf4d410aa6fcd57df060c294dc Mon Sep 17 00:00:00 2001 From: yiliu30 Date: Fri, 27 Dec 2024 04:35:24 -0500 Subject: [PATCH 12/16] remove lib if needed Signed-off-by: yiliu30 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5db0cd4d..e4f37440 100644 --- a/setup.py +++ b/setup.py @@ -253,11 +253,11 @@ def detect_local_sm_architectures(): # 1. python setup.py lib install # 2. Within the gaudi docker where the HPU is available, we install the auto_round_lib by default. is_user_requesting_library_build = "lib" in sys.argv - + if is_habana_framework_installed: + sys.argv.remove("lib") should_build_library = is_user_requesting_library_build or BUILD_HPU_ONLY if should_build_library: - sys.argv.remove("lib") package_name = "auto_round_lib" INSTALL_CFG = LIB_INSTALL_CFG else: From e660e623bd9de29df02bc83e8ac54bec8515442f Mon Sep 17 00:00:00 2001 From: yiliu30 Date: Fri, 27 Dec 2024 22:48:03 -0500 Subject: [PATCH 13/16] correct typo Signed-off-by: yiliu30 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e4f37440..a68183af 100644 --- a/setup.py +++ b/setup.py @@ -253,7 +253,7 @@ def detect_local_sm_architectures(): # 1. python setup.py lib install # 2. Within the gaudi docker where the HPU is available, we install the auto_round_lib by default. is_user_requesting_library_build = "lib" in sys.argv - if is_habana_framework_installed: + if is_user_requesting_library_build: sys.argv.remove("lib") should_build_library = is_user_requesting_library_build or BUILD_HPU_ONLY From 2a77663f556d91649c2c7503d0caa4568ce5bf6d Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Sat, 28 Dec 2024 20:12:29 +0800 Subject: [PATCH 14/16] update to 1.19.0 Signed-off-by: Sun, Xuehao --- .azure-pipelines/template/docker-template.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/template/docker-template.yml b/.azure-pipelines/template/docker-template.yml index 14876f17..a9d104b2 100644 --- a/.azure-pipelines/template/docker-template.yml +++ b/.azure-pipelines/template/docker-template.yml @@ -74,7 +74,7 @@ steps: - ${{ if eq(parameters.imageSource, 'pull') }}: - script: | - docker pull vault.habana.ai/gaudi-docker/1.18.0/ubuntu22.04/habanalabs/pytorch-installer-2.4.0:latest + docker pull vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest displayName: "Pull habana docker image" - script: | @@ -90,12 +90,13 @@ steps: script: | if [[ "${{ parameters.imageSource }}" == "build" ]]; then docker run -dit --disable-content-trust --privileged --name=${{ parameters.containerName }} --shm-size="2g" \ - -v ${BUILD_SOURCESDIRECTORY}:/auto-round -v /tf_dataset:/tf_dataset -v /tf_dataset2:/tf_dataset2 \ - ${{ parameters.repoName }}:${{ parameters.repoTag }} + -v ${BUILD_SOURCESDIRECTORY}:/auto-round -v /tf_dataset:/tf_dataset -v /tf_dataset2:/tf_dataset2 \ + ${{ parameters.repoName }}:${{ parameters.repoTag }} else docker run -dit --disable-content-trust --privileged --name=${{ parameters.containerName }} --shm-size="2g" \ - --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host \ - -v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.18.0/ubuntu22.04/habanalabs/pytorch-installer-2.4.0:latest + --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --net=host --ipc=host \ + -v ${BUILD_SOURCESDIRECTORY}:/auto-round vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest + docker exec ${{ parameters.containerName }} bash -c "ln -sf \$(which python3) /usr/bin/python" fi echo "Show the container list after docker run ... " docker ps -a From f9f82254f9c2d414da8f2cc00a21853a587ad1c1 Mon Sep 17 00:00:00 2001 From: yiliu30 Date: Sun, 29 Dec 2024 20:20:14 -0500 Subject: [PATCH 15/16] add datasets back Signed-off-by: yiliu30 --- requirements-lib.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements-lib.txt b/requirements-lib.txt index 48916bd7..891cebbd 100644 --- a/requirements-lib.txt +++ b/requirements-lib.txt @@ -1,3 +1,5 @@ +accelerate +datasets py-cpuinfo sentencepiece numpy < 2.0 From 025b8a72f66a385218e0328389c5c4185f0b19e6 Mon Sep 17 00:00:00 2001 From: "Sun, Xuehao" Date: Mon, 30 Dec 2024 13:14:38 +0800 Subject: [PATCH 16/16] add transformers to requirements Signed-off-by: Sun, Xuehao --- requirements-lib.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-lib.txt b/requirements-lib.txt index 891cebbd..5a7454d9 100644 --- a/requirements-lib.txt +++ b/requirements-lib.txt @@ -8,3 +8,4 @@ packaging pillow numba tbb +transformers