repo/gentoo:master commit in: sci-ml/transformers/

"Alfredo Tupone" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786089264.79b4998c071a3a601375a6ac1b3dd096b78f1592.tupone@gentoo>
commit:     79b4998c071a3a601375a6ac1b3dd096b78f1592
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 07:54:07 2026 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 07:54:24 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b4998c

sci-ml/transformers: add 5.10.3

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-ml/transformers/Manifest                   |  1 +
 sci-ml/transformers/transformers-5.10.3.ebuild | 60 ++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/sci-ml/transformers/Manifest b/sci-ml/transformers/Manifest
index 017ff4c29d8c..8d1f1f866795 100644
--- a/sci-ml/transformers/Manifest
+++ b/sci-ml/transformers/Manifest
@@ -1,2 +1,3 @@
+DIST transformers-5.10.3.gh.tar.gz 18356793 BLAKE2B c594ecbb2c4f868e50c6354f79443312a89d7bcd2b3eeef873c95f50c4e32c5d41e42ae6aecc242142ef2e06d1c694683be384cd4cbab57e05d1d9d8e3775876 SHA512 4e6d478b366dc630f950835ff94f8710cd335221382b6a3c25d97ffdd7b05d9154b40b499ab590c2476d472342586ef7a56ef15ceb84711aaca4168a6cfb76d7
 DIST transformers-5.3.0.gh.tar.gz 17931790 BLAKE2B a1f514ed6bb4eca1cf549e04a9470bc1c0c2cc3f4af9966d1fcba222b3d774051e27db2b6abb14e0cc4319d541c79bc244b01a0a6d431cfb2ffa8b2a05491422 SHA512 c7cc25e03c74ad58c2977bcdb968b3a7c0788f51c317d56fb09f59d11cd5b0abb3f05f94810922ec6ae5521131138050208323b17880f02800d1dfea055ae97c
 DIST transformers-5.4.0.gh.tar.gz 17364377 BLAKE2B 728037f7819cb270fabd10b23f6f88fde23fc6e5bde4aa45225e378a439b3eda64a8860f772d53bf732012c7bd819765d8b1c24980e696e7b8b49c243fb70ae9 SHA512 0d4bad8b2a982d9e5ebcbfe98caf063419f33824444f4933828c83acbbda45de2f6c2f5c6f13026743428536f802cba604d67114fd50324e0713c8d01ac3bfeb

diff --git a/sci-ml/transformers/transformers-5.10.3.ebuild b/sci-ml/transformers/transformers-5.10.3.ebuild
new file mode 100644
index 000000000000..ff9d08e7fd31
--- /dev/null
+++ b/sci-ml/transformers/transformers-5.10.3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2023-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{12..14} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1
+
+DESCRIPTION="State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
+HOMEPAGE="
+	https://pypi.org/project/transformers/
+	https://huggingface.co/
+"
+SRC_URI="https://github.com/huggingface/${PN}/archive/refs/tags/v${PV}.tar.gz
+	-> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test torch"
+
+RDEPEND="
+	>=sci-ml/huggingface_hub-1.5.0[${PYTHON_SINGLE_USEDEP}]
+	<sci-ml/huggingface_hub-2
+	=sci-ml/tokenizers-0.22*[${PYTHON_SINGLE_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/filelock[${PYTHON_USEDEP}]
+		dev-python/numpy[${PYTHON_USEDEP}]
+		dev-python/packaging[${PYTHON_USEDEP}]
+		dev-python/pyyaml[${PYTHON_USEDEP}]
+		dev-python/regex[${PYTHON_USEDEP}]
+		dev-python/tqdm[${PYTHON_USEDEP}]
+		dev-python/typer[${PYTHON_USEDEP}]
+		sci-ml/safetensors[${PYTHON_USEDEP}]
+	')
+	torch? (
+		sci-ml/accelerate[${PYTHON_SINGLE_USEDEP}]
+		sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+	)
+	test? (
+		sci-ml/datasets[${PYTHON_SINGLE_USEDEP}]
+		>=sci-ml/pytorch-2.13[distributed]
+	)
+"
+
+EPYTEST_PLUGINS=( pytest-xdist )
+distutils_enable_tests pytest
+
+python_test() {
+	local EPYTEST_DESELECT=(
+		tests/models/roberta/test_modeling_roberta.py::RobertaModelTest::test_eager_padding_matches_padding_free_with_position_ids
+	)
+	epytest \
+		tests/models/bert \
+		tests/models/gpt2 \
+		tests/models/roberta \
+		tests/models/distilbert
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.