Adds the Gefen-X optimizers via Unsloth's standard config-object pattern
(mirroring QGaloreConfig): GefenXConfig wraps gefen.Gefen (≈1 byte/param AdamW
replacement) and GefenXMuonConfig wraps gefen.GefenMuonHybrid (Muon on 2D hidden
weights, Gefen on embeddings/heads/norms/biases). Pass either via
UnslothTrainingArguments; UnslothTrainer.create_optimizer dispatches to the new
_create_gefenx_optimizer / _create_gefenx_muon_optimizer builders.
- unsloth/optimizers/gefenx.py: config->constructor mapping, param routing,
the axolotl recommended recipe defaults for the Muon hybrid
(backup_1d_period_one, adjust_lr_fn=match_rms_adamw, fused, backup_lr=0.5*lr),
and an NVIDIA-CUDA-only gate that rejects AMD/ROCm (HIP) and Intel XPU
(gefen ships CUDA-only kernels). gefen is imported lazily.
- unsloth/trainer.py: GefenXConfig / GefenXMuonConfig dataclasses, argument
plumbing on UnslothTrainingArguments, create_optimizer dispatch, __all__.
- tests: 26 tests — config mapping, param routing, the device gate, and real
end-to-end runs against gefen (CPU + fused CUDA, plain + muon) plus the full
UnslothTrainer.create_optimizer dispatch, all asserting parameters update.
MLX is unaffected (its separate trainer has no Gefen-X path).