git: 6583c3bc3d67 - main - misc/py-lion-pytorch: New port: PyTorch: Lion optimizer

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 19 Sep 2025 07:36:25 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6583c3bc3d6778fcfe5569918e75bc107db0caa0

commit 6583c3bc3d6778fcfe5569918e75bc107db0caa0
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-09-19 02:44:06 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-09-19 07:36:14 +0000

    misc/py-lion-pytorch: New port: PyTorch: Lion optimizer
---
 misc/Makefile                  |  1 +
 misc/py-lion-pytorch/Makefile  | 22 ++++++++++++++++++++++
 misc/py-lion-pytorch/distinfo  |  3 +++
 misc/py-lion-pytorch/pkg-descr |  3 +++
 4 files changed, 29 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 6bb9ad134eaf..f71a3adbe1d1 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -483,6 +483,7 @@
     SUBDIR += py-lazrs
     SUBDIR += py-lightgbm
     SUBDIR += py-lightning-utilities
+    SUBDIR += py-lion-pytorch
     SUBDIR += py-litellm
     SUBDIR += py-litellm-proxy-extras
     SUBDIR += py-llama-cpp-python
diff --git a/misc/py-lion-pytorch/Makefile b/misc/py-lion-pytorch/Makefile
new file mode 100644
index 000000000000..62244948739c
--- /dev/null
+++ b/misc/py-lion-pytorch/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	lion-pytorch
+DISTVERSION=	0.2.3
+CATEGORIES=	misc # machine-learning
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	${PORTNAME:S/-/_/}-${DISTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	PyTorch: Lion optimizer
+WWW=		https://github.com/lucidrains/lion-pytorch
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytorch>=1.6:misc/py-pytorch@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	distutils autoplist
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-lion-pytorch/distinfo b/misc/py-lion-pytorch/distinfo
new file mode 100644
index 000000000000..dda84c105472
--- /dev/null
+++ b/misc/py-lion-pytorch/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1758249332
+SHA256 (lion_pytorch-0.2.3.tar.gz) = 42ba117ce857e9dd6c67c727e22e575671fd72e441900af137b05e7ee5c8fd88
+SIZE (lion_pytorch-0.2.3.tar.gz) = 6990
diff --git a/misc/py-lion-pytorch/pkg-descr b/misc/py-lion-pytorch/pkg-descr
new file mode 100644
index 000000000000..d21c9750df9e
--- /dev/null
+++ b/misc/py-lion-pytorch/pkg-descr
@@ -0,0 +1,3 @@
+Lion, EvoLved Sign Momentum, is a new optimizer discovered by Google Brain that
+is purportedly better than Adam(w), in Pytorch. This is nearly a straight copy
+from here, with few minor modifications.