6 # propagated build inputs
18 # optional dependencies
22 , onnxconverter-common
55 buildPythonPackage rec {
56 pname = "transformers";
60 disabled = pythonOlder "3.8";
62 src = fetchFromGitHub {
63 owner = "huggingface";
64 repo = "transformers";
65 rev = "refs/tags/v${version}";
66 hash = "sha256-w9BVJwYS2QV58UTOpcoQwdC+dxZuhLS2h8PqN5W2Yjc=";
73 propagatedBuildInputs = [
86 passthru.optional-dependencies =
129 retrieval = [ faiss datasets ];
130 flax = [ jax jaxlib flax optax ];
155 fairscale = [ fairscale ];
157 ray = [ ray ] ++ ray.optional-dependencies.tune-deps;
158 # sigopt = [ sigopt ];
159 # integrations = ray ++ optuna ++ sigopt;
167 speech = [ torchaudio ] ++ audio;
168 torch-speech = [ torchaudio ] ++ audio;
172 torch-vision = [ torchvision ] ++ vision;
173 # natten = [ natten ];
174 # codecarbon = [ codecarbon ];
179 sentencepiece = [ sentencepiece protobuf ];
183 # Many tests require internet access.
186 pythonImportsCheck = [
191 homepage = "https://github.com/huggingface/transformers";
192 description = "Natural Language Processing for TensorFlow 2.0 and PyTorch";
193 mainProgram = "transformers-cli";
194 changelog = "https://github.com/huggingface/transformers/releases/tag/v${version}";
195 license = licenses.asl20;
196 platforms = platforms.unix;
197 maintainers = with maintainers; [ pashashocky happysalada ];