From f2b7173921179eaee161287d8e0cf47b2dfeb014 Mon Sep 17 00:00:00 2001 From: Meet Patel Date: Tue, 25 Nov 2025 14:03:47 +0530 Subject: [PATCH 1/5] Made a separate list of dependencies for Finetuning. Signed-off-by: meetkuma --- pyproject.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ea3c3405d..e10b3c63e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,10 +35,8 @@ dependencies = [ "onnxscript==0.2.5", "pillow===10.4.0", "sympy", - "tensorboard", "fire", "py7zr", - "torchmetrics==1.7.0", "torch==2.7.0; platform_machine=='aarch64'", # Specifying torch cpu package URL per python version, update the list once pytorch releases whl for python>3.11 "torch@https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp38-cp38-linux_x86_64.whl ; python_version=='3.8' and platform_machine=='x86_64'", @@ -51,6 +49,14 @@ test = ["pytest","pytest-mock"] docs = ["Sphinx==7.1.2","sphinx-rtd-theme==2.0.0","myst-parser==3.0.1","sphinx-multiversion"] quality = ["black", "ruff", "hf_doc_builder@git+https://github.com/huggingface/doc-builder.git"] +# New FT dependencies +ft = [ + "tensorboard ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", + "transformers==4.55.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", + "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", + "torchmetrics==1.7.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", +] + [build-system] requires = ["setuptools>=62.0.0"] build-backend = "setuptools.build_meta" From 3481a9194a13e20b0d6f33c70bff284b5e2db10a Mon Sep 17 00:00:00 2001 From: Meet Patel Date: Tue, 25 Nov 2025 14:44:13 +0530 Subject: [PATCH 2/5] Moved infer stack dependencies to separate optional dependencies block to resolve the conflicting deps. Signed-off-by: meetkuma --- pyproject.toml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e10b3c63e..0bf47d693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,23 +37,24 @@ dependencies = [ "sympy", "fire", "py7zr", - "torch==2.7.0; platform_machine=='aarch64'", - # Specifying torch cpu package URL per python version, update the list once pytorch releases whl for python>3.11 - "torch@https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp38-cp38-linux_x86_64.whl ; python_version=='3.8' and platform_machine=='x86_64'", - "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and platform_machine=='x86_64'", - "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", ] [project.optional-dependencies] test = ["pytest","pytest-mock"] docs = ["Sphinx==7.1.2","sphinx-rtd-theme==2.0.0","myst-parser==3.0.1","sphinx-multiversion"] quality = ["black", "ruff", "hf_doc_builder@git+https://github.com/huggingface/doc-builder.git"] - -# New FT dependencies +infer = [ + "torch==2.7.0; platform_machine=='aarch64'", + # Specifying torch cpu package URL per python version, update the list once pytorch releases whl for python>3.11 + "torch@https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp38-cp38-linux_x86_64.whl ; python_version=='3.8' and platform_machine=='x86_64'", + "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp39-cp39-manylinux_2_28_x86_64.whl ; python_version=='3.9' and platform_machine=='x86_64'", + "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", +] ft = [ "tensorboard ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", "transformers==4.55.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", - "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", + "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", + "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and platform_machine=='x86_64'", "torchmetrics==1.7.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", ] From 07527207bffe94e077bab6562a01396922a2286b Mon Sep 17 00:00:00 2001 From: Meet Patel Date: Thu, 27 Nov 2025 14:23:36 +0530 Subject: [PATCH 3/5] Added torch_qaic and accelerate installation via whl files. Signed-off-by: meetkuma --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0bf47d693..87d1f7d10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,10 @@ infer = [ "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", ] ft = [ + "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py310/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", + "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py311/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.11' and platform_machine=='x86_64'", + "accelerate @ file:///opt/qti-aic/integrations/accelerate/py310/accelerate-1.10.1-py3-none-any.whl ; python_version=='3.10' and platform_machine=='x86_64'", + "accelerate @ file:///opt/qti-aic/integrations/accelerate/py311/accelerate-1.10.1-py3-none-any.whl ; python_version=='3.11' and platform_machine=='x86_64'", "tensorboard ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", "transformers==4.55.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", From 92df5dc7838906b48085cb05ed23c1df560d6215 Mon Sep 17 00:00:00 2001 From: Meet Patel Date: Thu, 27 Nov 2025 14:36:20 +0530 Subject: [PATCH 4/5] Made transformers package specific to infer and ft individually. Signed-off-by: meetkuma --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 87d1f7d10..786954ce6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,6 @@ classifiers = [ ] requires-python = ">=3.8,<3.11" dependencies = [ - "transformers==4.55.0", "huggingface-hub==0.34.0", "hf_transfer==0.1.9", "peft==0.13.2", @@ -44,6 +43,7 @@ test = ["pytest","pytest-mock"] docs = ["Sphinx==7.1.2","sphinx-rtd-theme==2.0.0","myst-parser==3.0.1","sphinx-multiversion"] quality = ["black", "ruff", "hf_doc_builder@git+https://github.com/huggingface/doc-builder.git"] infer = [ + "transformers==4.55.0", "torch==2.7.0; platform_machine=='aarch64'", # Specifying torch cpu package URL per python version, update the list once pytorch releases whl for python>3.11 "torch@https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp38-cp38-linux_x86_64.whl ; python_version=='3.8' and platform_machine=='x86_64'", From a3ff99f3bb9867a2cdaae29092787504fde6a50a Mon Sep 17 00:00:00 2001 From: Meet Patel Date: Thu, 27 Nov 2025 14:37:29 +0530 Subject: [PATCH 5/5] Minor reordering of packages. Some changes were not saved earlier. Signed-off-by: meetkuma --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 786954ce6..324713e37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,6 @@ infer = [ "torch@https://download.pytorch.org/whl/cpu/torch-2.7.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", ] ft = [ - "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py310/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", - "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py311/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.11' and platform_machine=='x86_64'", "accelerate @ file:///opt/qti-aic/integrations/accelerate/py310/accelerate-1.10.1-py3-none-any.whl ; python_version=='3.10' and platform_machine=='x86_64'", "accelerate @ file:///opt/qti-aic/integrations/accelerate/py311/accelerate-1.10.1-py3-none-any.whl ; python_version=='3.11' and platform_machine=='x86_64'", "tensorboard ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", @@ -60,6 +58,8 @@ ft = [ "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", "torch@https://download.pytorch.org/whl/cpu/torch-2.9.0%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl ; python_version=='3.11' and platform_machine=='x86_64'", "torchmetrics==1.7.0 ; python_version>='3.10' and python_version<'3.12' and platform_machine=='x86_64'", + "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py310/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.10' and platform_machine=='x86_64'", + "torch_qaic @ file:///opt/qti-aic/integrations/torch_qaic/py311/torch_qaic-0.1.0-cp310-cp310-linux_x86_64.whl ; python_version=='3.11' and platform_machine=='x86_64'", ] [build-system]