diff --git a/docker/consistency.dockerfile b/docker/consistency.dockerfile index 0527cc20804..0c973d06afa 100644 --- a/docker/consistency.dockerfile +++ b/docker/consistency.dockerfile @@ -5,7 +5,7 @@ ARG REF=main RUN apt-get update && apt-get install -y time git g++ pkg-config make git-lfs ENV UV_PYTHON=/usr/local/bin/python RUN pip install uv && uv pip install --no-cache-dir -U pip setuptools GitPython -RUN uv pip install --no-cache-dir --upgrade 'torch<2.9' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache-dir --upgrade 'torch' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir pypi-kenlm RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[quality,testing,torch-speech,vision]" RUN git lfs install diff --git a/docker/custom-tokenizers.dockerfile b/docker/custom-tokenizers.dockerfile index af84bf54160..c00a9edb7db 100644 --- a/docker/custom-tokenizers.dockerfile +++ b/docker/custom-tokenizers.dockerfile @@ -17,7 +17,7 @@ RUN make install -j 10 WORKDIR / -RUN uv pip install --no-cache --upgrade 'torch<2.9' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir --no-deps accelerate --extra-index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[ja,testing,sentencepiece,spacy,ftfy,rjieba]" unidic unidic-lite # spacy is not used so not tested. Causes to failures. TODO fix later diff --git a/docker/examples-torch.dockerfile b/docker/examples-torch.dockerfile index c108345f269..5960930ae48 100644 --- a/docker/examples-torch.dockerfile +++ b/docker/examples-torch.dockerfile @@ -5,7 +5,7 @@ USER root RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git g++ cmake pkg-config openssh-client git-lfs ffmpeg curl ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir 'torch<2.9' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing]" seqeval albumentations jiwer diff --git a/docker/exotic-models.dockerfile b/docker/exotic-models.dockerfile index cdae85331b1..1e16ae77d4a 100644 --- a/docker/exotic-models.dockerfile +++ b/docker/exotic-models.dockerfile @@ -5,7 +5,7 @@ USER root RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git libgl1 g++ tesseract-ocr git-lfs curl ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir 'torch<2.9' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir --no-deps timm accelerate RUN uv pip install -U --no-cache-dir pytesseract python-Levenshtein opencv-python nltk # RUN uv pip install --no-cache-dir natten==0.15.1+torch210cpu -f https://shi-labs.com/natten/wheels diff --git a/docker/pipeline-torch.dockerfile b/docker/pipeline-torch.dockerfile index 25b4df1d1b6..e434eeaed93 100644 --- a/docker/pipeline-torch.dockerfile +++ b/docker/pipeline-torch.dockerfile @@ -5,7 +5,7 @@ USER root RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git pkg-config openssh-client git ffmpeg curl ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir 'torch<2.9' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing]" diff --git a/docker/torch-light.dockerfile b/docker/torch-light.dockerfile index e2a5013c509..14ba613bdb3 100644 --- a/docker/torch-light.dockerfile +++ b/docker/torch-light.dockerfile @@ -5,7 +5,7 @@ USER root RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git g++ cmake pkg-config openssh-client git-lfs ffmpeg curl ENV UV_PYTHON=/usr/local/bin/python RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir 'torch<2.9' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu +RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing,tiktoken,num2words,video]" diff --git a/setup.py b/setup.py index 4b5141867da..afc350db525 100644 --- a/setup.py +++ b/setup.py @@ -170,7 +170,7 @@ _deps = [ "tiktoken", "timm<=1.0.19,!=1.0.18", "tokenizers>=0.22.0,<=0.23.0", - "torch>=2.2,<2.9", + "torch>=2.2", "torchaudio", "torchvision", "pyctcdecode>=0.4.0", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 0551abfc6aa..03416c378ad 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -76,7 +76,7 @@ deps = { "tiktoken": "tiktoken", "timm": "timm<=1.0.19,!=1.0.18", "tokenizers": "tokenizers>=0.22.0,<=0.23.0", - "torch": "torch>=2.2,<2.9", + "torch": "torch>=2.2", "torchaudio": "torchaudio", "torchvision": "torchvision", "pyctcdecode": "pyctcdecode>=0.4.0",