From 0a016ac4b2ae0b409a4575771b87d2e0e6a2fb3a Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Thu, 21 Nov 2024 15:19:07 -0700 Subject: [PATCH 1/8] enable mamba deps Signed-off-by: Sukriti-Sharma4 --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd976a237..a06c281d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies = [ "numpy>=1.26.4,<2.0", "accelerate>=0.20.3,!=0.34,<1.1", -"transformers>=4.45,<4.46", +"git+https://github.com/fabianlim/transformers.git@hybrid-mamba", "torch>=2.2.0,<2.5", "sentencepiece>=0.1.99,<0.3", "tokenizers>=0.13.3,<1.0", @@ -38,6 +38,7 @@ dependencies = [ "protobuf>=5.28.0,<6.0.0", "datasets>=2.15.0,<3.0", "simpleeval>=0.9.13,<1.0", +"mamba_ssm[causal-conv1d] @ git+https://github.com/state-spaces/mamba.git", ] [project.optional-dependencies] From 03d6d9a1a27325bd9838f7f7de4b99f895d67f33 Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Thu, 21 Nov 2024 17:13:17 -0700 Subject: [PATCH 2/8] fix deps Signed-off-by: Sukriti-Sharma4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a06c281d1..fd4452c72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies = [ "numpy>=1.26.4,<2.0", "accelerate>=0.20.3,!=0.34,<1.1", -"git+https://github.com/fabianlim/transformers.git@hybrid-mamba", +"transformers @ git+https://github.com/fabianlim/transformers.git@hybrid-mamba", "torch>=2.2.0,<2.5", "sentencepiece>=0.1.99,<0.3", "tokenizers>=0.13.3,<1.0", From 31fb6ae54ab158f85036a3bb8f052c9a49ddd8e0 Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Thu, 21 Nov 2024 19:12:11 -0700 Subject: [PATCH 3/8] try dockerfile Signed-off-by: Sukriti-Sharma4 --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index d8cc74877..5623deae8 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -76,7 +76,7 @@ RUN dnf config-manager \ ENV CUDA_HOME="/usr/local/cuda" \ PATH="/usr/local/nvidia/bin:${CUDA_HOME}/bin:${PATH}" \ - LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:${LD_LIBRARY_PATH}" + LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:${LD_LIBRARY_PATH}:/home/${USER}/.local/lib/python${PYTHON_VERSION}/site-packages/nvidia/cudnn/lib:${LD_LIBRARY_PATH}" ## CUDA Development ############################################################ FROM cuda-base AS cuda-devel From baa637a4431d9d01c84463ef7697939991e2efdd Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Thu, 21 Nov 2024 19:22:44 -0700 Subject: [PATCH 4/8] trial 2 dockerfile Signed-off-by: Sukriti-Sharma4 --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 5623deae8..651a46b51 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -76,7 +76,7 @@ RUN dnf config-manager \ ENV CUDA_HOME="/usr/local/cuda" \ PATH="/usr/local/nvidia/bin:${CUDA_HOME}/bin:${PATH}" \ - LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:${LD_LIBRARY_PATH}:/home/${USER}/.local/lib/python${PYTHON_VERSION}/site-packages/nvidia/cudnn/lib:${LD_LIBRARY_PATH}" + LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:${LD_LIBRARY_PATH}:/usr/local/lib/python${PYTHON_VERSION}/site-packages/nvidia/cudnn/lib:${LD_LIBRARY_PATH}:/usr/local/nvidia/cudnn/lib:${LD_LIBRARY_PATH}" ## CUDA Development ############################################################ FROM cuda-base AS cuda-devel From 169e86510bf986d5701a5297f1e7597c6b7e329c Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Thu, 21 Nov 2024 19:54:12 -0700 Subject: [PATCH 5/8] dockerfile trial 3 Signed-off-by: Sukriti-Sharma4 --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 651a46b51..0d2165b4e 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -76,7 +76,7 @@ RUN dnf config-manager \ ENV CUDA_HOME="/usr/local/cuda" \ PATH="/usr/local/nvidia/bin:${CUDA_HOME}/bin:${PATH}" \ - LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:${LD_LIBRARY_PATH}:/usr/local/lib/python${PYTHON_VERSION}/site-packages/nvidia/cudnn/lib:${LD_LIBRARY_PATH}:/usr/local/nvidia/cudnn/lib:${LD_LIBRARY_PATH}" + LD_LIBRARY_PATH="/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64:/usr/local/lib/python${PYTHON_VERSION}/site-packages/nvidia/cudnn/lib:/usr/local/nvidia/cudnn/lib:${LD_LIBRARY_PATH}" ## CUDA Development ############################################################ FROM cuda-base AS cuda-devel From 0683316d164575dd3b7d3b7a7d1c3099c60eecf4 Mon Sep 17 00:00:00 2001 From: Anh Uong Date: Fri, 22 Nov 2024 16:11:41 -0700 Subject: [PATCH 6/8] install cudnn9-cuda-12 and mamba separately Signed-off-by: Anh Uong --- build/Dockerfile | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 0d2165b4e..97e19cee7 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -99,6 +99,7 @@ RUN dnf config-manager \ libcublas-devel-12-1-${NV_LIBCUBLAS_DEV_VERSION} \ libnpp-devel-12-1-${NV_LIBNPP_DEV_VERSION} \ libnccl-devel-${NV_LIBNCCL_DEV_PACKAGE_VERSION} \ + cudnn9-cuda-12 \ && dnf clean all ENV LIBRARY_PATH="$CUDA_HOME/lib64/stubs" @@ -135,7 +136,8 @@ RUN if [[ -z "${WHEEL_VERSION}" ]]; \ RUN --mount=type=cache,target=/home/${USER}/.cache/pip,uid=${USER_UID} \ python -m pip install --user wheel && \ python -m pip install --user "$(head bdist_name)" && \ - python -m pip install --user "$(head bdist_name)[flash-attn]" + python -m pip install --user "$(head bdist_name)[flash-attn]" && \ + python -m pip install --user "$(head bdist_name)[mamba]" # fms_acceleration_peft = PEFT-training, e.g., 4bit QLoRA # fms_acceleration_foak = Fused LoRA and triton kernels diff --git a/pyproject.toml b/pyproject.toml index fd4452c72..96658347d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,6 @@ dependencies = [ "protobuf>=5.28.0,<6.0.0", "datasets>=2.15.0,<3.0", "simpleeval>=0.9.13,<1.0", -"mamba_ssm[causal-conv1d] @ git+https://github.com/state-spaces/mamba.git", ] [project.optional-dependencies] @@ -47,6 +46,7 @@ flash-attn = ["flash-attn>=2.5.3,<3.0"] aim = ["aim>=3.19.0,<4.0"] fms-accel = ["fms-acceleration>=0.1"] gptq-dev = ["auto_gptq>0.4.2", "optimum>=1.15.0"] +mamba = ["mamba_ssm[causal-conv1d] @ git+https://github.com/state-spaces/mamba.git"] [tool.setuptools.packages.find] From a3f8b641104beeeef9b23c63888200e9e77cac82 Mon Sep 17 00:00:00 2001 From: Anh Uong Date: Mon, 25 Nov 2024 09:43:02 -0700 Subject: [PATCH 7/8] deps: update transformers fork to 4.46 Signed-off-by: Anh Uong --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96658347d..cf5d4b15a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies = [ "numpy>=1.26.4,<2.0", "accelerate>=0.20.3,!=0.34,<1.1", -"transformers @ git+https://github.com/fabianlim/transformers.git@hybrid-mamba", +"transformers @ git+https://github.com/fabianlim/transformers.git@hybrid-mamba-4.46", "torch>=2.2.0,<2.5", "sentencepiece>=0.1.99,<0.3", "tokenizers>=0.13.3,<1.0", From 212b93c381a31c96471ef7d477dbcc85a898bc60 Mon Sep 17 00:00:00 2001 From: Sukriti-Sharma4 Date: Wed, 18 Dec 2024 16:27:04 -0700 Subject: [PATCH 8/8] update to latest transformers as PR merged Signed-off-by: Sukriti-Sharma4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cf5d4b15a..a57271974 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies = [ "numpy>=1.26.4,<2.0", "accelerate>=0.20.3,!=0.34,<1.1", -"transformers @ git+https://github.com/fabianlim/transformers.git@hybrid-mamba-4.46", +"transformers @ git+https://github.com/huggingface/transformers.git", "torch>=2.2.0,<2.5", "sentencepiece>=0.1.99,<0.3", "tokenizers>=0.13.3,<1.0",