Skip to main content

A family of highly efficient, lightweight yet powerful optimizers.

Project description

Advanced Optimizers (AIO)

A comprehensive, all-in-one collection of optimization algorithms for deep learning, designed for maximum efficiency, minimal memory footprint, and superior performance across diverse model architectures and training scenarios.

PyPI

🔥 What's New

In 2.4.x:

This update introduces a whole refactor of the library with many new features and changes:

  • New optimizers state mode option (state_precision) with many precision settings for the optimizer states: rank-2 factored mode (factored), full FP32 (fp32), BF16 with Stochastic Rounding (bf16_sr), int8/uint8 with Stochastic Rounding (int8_sr), FP16 (fp16)
  • Added new powerful optimizer: SinkSGD_adv.
  • Added spectral scaling option to all optimizers, achieving width/rank invariant updates.
  • Added Nesterov momentum (nesterov) and its coef (nesterov_coef) to all optimizers.
  • Added centered weight decay (centered_wd), to pull the weights toward their pre-train state (anchor)
    • anchor precision can be changed to save memory (centered_wd_mode): full, float8, int8, int4
  • Added Fisher Weight Decay option for Adam variants (fisher_wd).
  • Added Factored Second Moment option for Adam variants (factored_2nd). This works alongside any state_precision setting.
  • Added Geometric Weight Decay for SinkSGD_adv and SignSGD_adv.
  • Added new powerful mode: variance normalized momentum (normed_momentum). Which applies the optimizer normalization before the momentum (also called as Normalization then momentum NtM)
    • For: AdamW_adv, SignSGD_adv, SinkSGD_adv.
  • Added Variance/Confidence Preconditioning (snr_cond) for SignSGD_adv, SinkSGD_adv.
    • Only works with normed_momentum.
    • Technical reports: AASS, and sink-v.
  • Added Adaptive Stochastic Sign with L_inf preconditioning (stochastic_sign) for SignSGD_Adv and Lion_adv.
  • Improved CANS (accelerated_ns) for Muon variants, by integrating dynamic lower bound.
  • Removed Simplified_AdEMAMix optimizer and its settings in other optimizers, they are now replaced by Nesterov momentum and its coef. Which is better and less hard to tune.
  • Removed cautious and grams modes, as they were heuristic and not working well.
  • Removed optimizers: Lion_Prodigy_adv, and Simplified_AdEMAMix.

in 2.1.x

  • Added Signum (SignSGD with momentum): A new optimizer in the family (SignSGD_adv)
  • More info coming soon.

in 2.0.x

  • Implemented torch.compile for all advanced optimizers. Enabled via (compiled_optimizer=True) to fuse and optimize the optimizer step path.
  • Better and improved 1-bit factored mode via (nnmf_factor=True).
  • Various improvements across the optimizers.

in 1.2.x

  • Added advanced variants of Muon optimizer with features and settings from recent papers.
Optimizer Description
Muon_adv Advanced Muon implementation with CANS, NorMuon, Low-Rank ortho, etc. features.
AdaMuon_adv Advanced AdaMuon implementation, which combines Muon's geometry with Adam-like adaptive scaling and sign-based orthogonalization.

Documentation coming soon.

  • Implemented Cautious Weight Decay for all advanced optimizers.

  • Improved parameter update and weight decay for BF16 with stochastic rounding. The updates are now accumulated in float32 and rounded once at the end.

  • Use fused and in-place operations whenever possible for all advanced optimizers.

  • Prodigy variants are now 50% faster by avoiding CUDA syncs. Thanks to @dxqb!


📦 Installation

pip install adv_optm

🧠 Core Innovations

This library integrates multiple state-of-the-art optimization techniques validated through extensive research and practical training.


Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adv_optm-2.4.dev24.tar.gz (59.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adv_optm-2.4.dev24-py3-none-any.whl (84.3 kB view details)

Uploaded Python 3

File details

Details for the file adv_optm-2.4.dev24.tar.gz.

File metadata

  • Download URL: adv_optm-2.4.dev24.tar.gz
  • Upload date:
  • Size: 59.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for adv_optm-2.4.dev24.tar.gz
Algorithm Hash digest
SHA256 0db408f906fb15424839c03d1a306f350b138a90b46f8bfc9c66bb64960eeb91
MD5 537ca29278b44630f8de174864e52111
BLAKE2b-256 821f0ee7c45f9a868dcbfb335258642218548d4e86f73397eda11acda0b40345

See more details on using hashes here.

File details

Details for the file adv_optm-2.4.dev24-py3-none-any.whl.

File metadata

  • Download URL: adv_optm-2.4.dev24-py3-none-any.whl
  • Upload date:
  • Size: 84.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for adv_optm-2.4.dev24-py3-none-any.whl
Algorithm Hash digest
SHA256 15a2fee66e3f8c59c531e136581fa2a210cc4edbf348d412b3bbee46396d1a31
MD5 cbde574dd3c2bda1fd9bc358fac05819
BLAKE2b-256 d2f627872943eea499d5bf8a52234ea71a0421f7274c977e34db4821dfbdcb37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page