Applied patch, updated version
Search Criteria
Package Details: python-transformers 4.51.3-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/python-transformers.git (read-only, click to copy) |
---|---|
Package Base: | python-transformers |
Description: | State-of-the-art Natural Language Processing for Jax, PyTorch and TensorFlow |
Upstream URL: | https://github.com/huggingface/transformers |
Keywords: | huggingface transformers |
Licenses: | Apache-2.0 |
Submitter: | filipg |
Maintainer: | daskol |
Last Packager: | daskol |
Votes: | 15 |
Popularity: | 0.44 |
First Submitted: | 2021-10-23 09:30 (UTC) |
Last Updated: | 2025-04-15 08:02 (UTC) |
Dependencies (23)
- python-filelock
- python-huggingface-hub (python-huggingface-hub-gitAUR)
- python-numpy (python-numpy-gitAUR, python-numpy1AUR, python-numpy-mkl-binAUR, python-numpy-mkl-tbbAUR, python-numpy-mklAUR)
- python-packaging
- python-regex (python-regex-gitAUR)
- python-requests
- python-safetensorsAUR (python-safetensors-binAUR)
- python-tokenizersAUR
- python-tqdm
- python-yaml (python-yaml-gitAUR)
- python-build (make)
- python-installer (make)
- python-setuptools (make)
- python-wheel (make)
- python-bitsandbytes (python-bitsandbytes-rocm-gitAUR, python-bitsandbytes-gitAUR) (optional) – 8-bit support for PyTorch
- python-flaxAUR (optional) – JAX support
- python-hf-xet (optional) – xethub support
- python-keras (python-keras-gitAUR) (optional) – Support for models in Keras 3
- python-onnxconverter-commonAUR (optional) – TensorFlow support
- python-pytorch (python-pytorch-cxx11abiAUR, python-pytorch-cxx11abi-optAUR, python-pytorch-cxx11abi-cudaAUR, python-pytorch-cxx11abi-opt-cudaAUR, python-pytorch-cxx11abi-rocmAUR, python-pytorch-cxx11abi-opt-rocmAUR, python-pytorch-cuda, python-pytorch-opt, python-pytorch-opt-cuda, python-pytorch-opt-rocm, python-pytorch-rocm) (optional) – PyTorch support
- Show 3 more dependencies...
Required by (44)
- coqui-tts (optional)
- dsnote (optional)
- dsnote-git (optional)
- localai-git
- localai-git-cuda
- localai-git-rocm
- manga-ocr-git
- mokuro
- monailabel (optional)
- open-webui-no-venv
- pix2tex
- python-accelerate (check)
- python-assistant
- python-auralis
- python-bark-git
- python-bitsandbytes-git
- python-colbert-ai
- python-compressed-tensors
- python-compressed-tensors (check)
- python-deepmultilingualpunctuation
- python-deepspeed
- python-dmt
- python-evaluate (optional)
- python-gradio (check)
- python-ktransformers
- python-livekit-plugins-turn-detector
- python-llama-cpp-cuda
- python-manga-ocr
- python-monai (optional)
- python-nanotron (optional)
- python-open-clip-torch
- python-optimum
- python-outlines
- python-peft
- python-sentence-transformers
- python-spacy-transformers
- python-surya-ocr
- python-torchmetrics (optional)
- python-trl
- python-tts-git (optional)
- python-vllm
- python-vllm-bin
- sdiff-gtk
- sdiff-gtk-git
Sources (1)
Latest Comments
« First ‹ Previous 1 2 3 4
filipg commented on 2022-12-10 08:26 (UTC)
kIERO commented on 2022-11-30 14:22 (UTC)
Maintainer: @filipg is MIA
kIERO commented on 2022-10-08 21:33 (UTC)
I've successfully built version 4.22.2 with the patch by @ChrisMorgan below
blinry commented on 2022-09-22 17:40 (UTC)
Very nice comments, ChrisMorgan! filipg, I'd love it if these changes were applied! \o/
ChrisMorgan commented on 2022-09-10 10:47 (UTC)
This package’s dependencies don’t correspond very well to the dependencies expressed by the actual Python package (for which refer to /usr/lib/python3.10/site-packages/transformers-4.19.2-py3.10.egg-info/requires.txt).
- Remove cuda and nccl. (transformers does not depend on them at all; PyTorch may, so packages like python-pytorch-opt-cuda depend on these two.)
- Keep python-filelock, python-tokenizers and python-tqdm.
- Remove python-sacremoses. It’s marked as exclusively a test dependency, and there are a bunch of other things missing from the checkdepends if you want to actually test it. (Caveat to this statement: a few children of transformers.models do actually look to use it, some optionally and some mandatorily. Not sure quite what’s up with that, but I think the requirements lists may be at fault and perhaps it should have another feature set for it, and perhaps here it should be optdepends. I don’t know how this stuff is used.)
- Add python-huggingface-hub, python-numpy, python-packaging, python-yaml, python-regex, python-requests.
- Start by removing python-pytorch (it’s optional), then probably add it to optdepends as well as the items of at least the flax, torch and tf sets from requires.txt (and there are a lot more optional dependencies that could be worth including, if interested in exhaustiveness).
Here’s a start (with only one fly in the ointment, that python-optax doesn’t exist yet, so JAX support is actually not yet readily attainable):
diff --git a/PKGBUILD b/PKGBUILD
index 4763dde..d808b71 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,13 +7,25 @@ pkgdesc="State-of-the-art Natural Language Processing for Jax, PyTorch and Tenso
arch=('i686' 'x86_64')
url="https://pypi.org/project/transformers"
license=('Apache License 2.0')
-depends=('cuda'
- 'nccl'
- 'python-filelock'
- 'python-pytorch'
- 'python-sacremoses'
+depends=('python-filelock'
'python-tokenizers'
+ 'python-huggingface-hub'
+ 'python-numpy'
+ 'python-packaging'
+ 'python-yaml'
+ 'python-regex'
+ 'python-requests'
'python-tqdm')
+optdepends=(
+ 'python-pytorch: PyTorch support'
+ 'python-tensorflow: TensorFlow support'
+ 'python-onnxconverter-common: TensorFlow support'
+ 'python-tf2onn: TensorFlow support'
+ 'python-jax: JAX support'
+ 'python-jaxlib: JAX support'
+ 'python-flax: JAX support'
+ 'python-optax: JAX support'
+)
source=("https://github.com/huggingface/transformers/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('a1cdffb59b0a409cb5de414fcfaf5208f4526023cd021245f37f309bb15673a9')
jnphilipp commented on 2022-06-08 11:55 (UTC)
you only need one of the three Jax, PyTorch and TensorFlow, these should than be optdepends
. And cuda is a depends of these, it can be removed completely as a dependency.
Pinned Comments
daskol commented on 2025-04-07 08:09 (UTC) (edited on 2025-04-07 08:09 (UTC) by daskol)
NOTE The next v4.51.0 requires
xet-core
(transitive throughpython-huggingface-hub>=1:0.30.0
). It is now under testing in extra-testing.