From 95dbb31cb54bb2454f901dbee7e1db5ac05355d2 Mon Sep 17 00:00:00 2001 From: thad0ctor Date: Fri, 10 Jul 2026 11:11:54 -0700 Subject: [PATCH] build: add opt-in gefenx extra for gefen-x (now on PyPI) gefen-x 0.2.0 is published on PyPI, so users can install the Gefen-X optimizer dependency via an opt-in extra instead of from source: `pip install "unsloth[gefenx]"`. gefen-x is CUDA-only and lazily imported, so the base install is unchanged. --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2b79121c82..ff78af3777 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,6 +106,12 @@ windows = [ base = [ "unsloth[huggingface]", ] +# Gefen-X optimizer (gefenx / gefenx_muon). Opt-in extra — gefen-x is a +# CUDA-only, lazily-imported optional dependency, so the base install is +# untouched. See unsloth/optimizers/gefenx.py. +gefenx = [ + "gefen-x>=0.2.0", +] cu118only = [ "xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)", "xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",