misc/py-sentence-transformers: New port: PyTorch: Ready to use implementations of generative models

This commit is contained in:
Yuri Victorovich
2025-09-19 00:36:22 -07:00
parent a143130d8c
commit 84fda7f7d9
4 changed files with 50 additions and 0 deletions
+1
View File
@@ -546,6 +546,7 @@
SUBDIR += py-schedulefree
SUBDIR += py-scikit-fusion
SUBDIR += py-scikit-quant
SUBDIR += py-sentence-transformers
SUBDIR += py-serverfiles
SUBDIR += py-shap2
SUBDIR += py-shell-gpt
+38
View File
@@ -0,0 +1,38 @@
PORTNAME= sentence-transformers
DISTVERSION= 5.1.0
CATEGORIES= misc # machine-learning
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
MAINTAINER= yuri@FreeBSD.org
COMMENT= PyTorch: Ready to use implementations of generative models
WWW= https://www.sbert.net/ \
https://github.com/UKPLab/sentence-transformers/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}huggingface-hub>=0.20.0:misc/py-huggingface-hub@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytorch>=1.11.0:misc/py-pytorch@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scikit-learn>0:science/py-scikit-learn@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}transformers>=4.41.0<5.0.0:misc/py-transformers@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.5.0:devel/py-typing-extensions@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tokenizers>0:textproc/py-tokenizers@${PY_FLAVOR}
USES= python
USE_PYTHON= pep517 autoplist pytest
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
TEST_WRKSRC= ${WRKSRC}/tests
NO_ARCH= yes
# tests fail to run, see https://github.com/UKPLab/sentence-transformers/issues/3520
.include <bsd.port.mk>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1758260582
SHA256 (sentence_transformers-5.1.0.tar.gz) = 70c7630697cc1c64ffca328d6e8688430ebd134b3c2df03dc07cb3a016b04739
SIZE (sentence_transformers-5.1.0.tar.gz) = 370745
+8
View File
@@ -0,0 +1,8 @@
This framework provides an easy method to compute embeddings for accessing,
using, and training state-of-the-art embedding and reranker models. It can be
used to compute embeddings using Sentence Transformer models (quickstart), to
calculate similarity scores using Cross-Encoder (a.k.a. reranker) models
(quickstart) or to generate sparse embeddings using Sparse Encoder models
(quickstart).
This unlocks a wide range of applications, including semantic search, semantic
textual similarity, and paraphrase mining.