-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #258 from kozistr/feature/adalomo-optimizer
[Feature] Implement `AdaLOMO` optimizer and others
- Loading branch information
Showing
20 changed files
with
675 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Change Log | ||
|
||
### Feature | ||
|
||
* Implement `AdaLomo` optimizer. (#258) | ||
* [Low-memory Optimization with Adaptive Learning Rate](https://arxiv.org/abs/2310.10195) | ||
* Support `Q-GaLore` optimizer. (#258) | ||
* [Q-GaLore: Quantized GaLore with INT4 Projection and Layer-Adaptive Low-Rank Gradients.](https://arxiv.org/abs/2407.08296) | ||
* you can use by `optimizer = load_optimizer('q_galore_adamw8bit')` | ||
* Support more bnb optimizers. (#258) | ||
* `bnb_paged_adam8bit`, `bnb_paged_adamw8bit`, `bnb_*_*32bit`. | ||
|
||
### Refactor | ||
|
||
* Refactor `AdamMini`. (#258) | ||
* Deprecate optional dependency, `bitsandbytes`. (#258) | ||
* Move `get_rms`, `approximate_sq_grad` functions to `BaseOptimizer` for reusability. (#258) | ||
|
||
### Bug | ||
|
||
* Fix several bugs in `AdamMini` optimizer. (#257) | ||
|
||
## Contributions | ||
|
||
thanks to @sdbds |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pytorch_optimizer" | ||
version = "3.0.2" | ||
version = "3.1.0" | ||
description = "optimizer & lr scheduler & objective function collections in PyTorch" | ||
license = "Apache-2.0" | ||
authors = ["kozistr <[email protected]>"] | ||
|
@@ -12,13 +12,14 @@ documentation = "https://pytorch-optimizers.readthedocs.io/en/latest" | |
keywords = [ | ||
"pytorch", "deep-learning", "optimizer", "lr scheduler", "A2Grad", "ASGD", "AccSGD", "AdaBelief", "AdaBound", | ||
"AdaDelta", "AdaFactor", "AdaMax", "AdaMod", "AdaNorm", "AdaPNM", "AdaSmooth", "AdaHessian", "Adai", "Adalite", | ||
"AdamMini", "AdamP", "AdamS", "Adan", "AggMo", "Aida", "AliG", "Amos", "Apollo", "AvaGrad", "bSAM", "CAME", | ||
"DAdaptAdaGrad", "DAdaptAdam", "DAdaptAdan", "DAdaptSGD", "DAdaptLion", "DiffGrad", "FAdam", "Fromage", "GaLore", | ||
"Gravity", "GrokFast", "GSAM", "Kate", "Lamb", "LARS", "Lion", "LOMO", "Lookahead", "MADGRAD", "MSVAG", "Nero", | ||
"NovoGrad", "PAdam", "PCGrad", "PID", "PNM", "Prodigy", "QHAdam", "QHM", "RAdam", "Ranger", "Ranger21", "RotoGrad", | ||
"SAM", "ScheduleFreeSGD", "ScheduleFreeAdamW", "SGDP", "Shampoo", "ScalableShampoo", "SGDW", "SignSGD", "SM3", | ||
"SopihaH", "SRMM", "StableAdamW", "SWATS", "Tiger", "WSAM", "Yogi", "BCE", "BCEFocal", "Focal", "FocalCosine", | ||
"SoftF1", "Dice", "LDAM", "Jaccard", "Bi-Tempered", "Tversky", "FocalTversky", "LovaszHinge", "bitsandbytes", "WSD", | ||
"AdaLomo", "AdamMini", "AdamP", "AdamS", "Adan", "AggMo", "Aida", "AliG", "Amos", "Apollo", "AvaGrad", "bSAM", | ||
"CAME", "DAdaptAdaGrad", "DAdaptAdam", "DAdaptAdan", "DAdaptSGD", "DAdaptLion", "DiffGrad", "FAdam", "Fromage", | ||
"GaLore", "Gravity", "GrokFast", "GSAM", "Kate", "Lamb", "LARS", "Lion", "LOMO", "Lookahead", "MADGRAD", "MSVAG", | ||
"Nero", "NovoGrad", "PAdam", "PCGrad", "PID", "PNM", "Prodigy", "QHAdam", "QHM", "RAdam", "Ranger", "Ranger21", | ||
"RotoGrad", "SAM", "ScheduleFreeSGD", "ScheduleFreeAdamW", "SGDP", "Shampoo", "ScalableShampoo", "SGDW", "SignSGD", | ||
"SM3", "SopihaH", "SRMM", "StableAdamW", "SWATS", "Tiger", "WSAM", "Yogi", "BCE", "BCEFocal", "Focal", | ||
"FocalCosine", "SoftF1", "Dice", "LDAM", "Jaccard", "Bi-Tempered", "Tversky", "FocalTversky", "LovaszHinge", | ||
"bitsandbytes", "WSD", "QGaLore", | ||
] | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License", | ||
|
@@ -46,7 +47,6 @@ classifiers = [ | |
python = ">=3.8,<4.0.0" | ||
numpy = { version = "*", python = ">=3.8" } | ||
torch = { version = ">=1.10", python = ">=3.8", source = "torch" } | ||
bitsandbytes = { version = "^0.43", optional = true } | ||
|
||
[tool.poetry.dev-dependencies] | ||
isort = { version = "^5", python = ">=3.8" } | ||
|
@@ -55,9 +55,6 @@ ruff = "*" | |
pytest = "*" | ||
pytest-cov = "*" | ||
|
||
[tool.poetry.extras] | ||
bitsandbytes = ["bitsandbytes"] | ||
|
||
[[tool.poetry.source]] | ||
name = "torch" | ||
url = "https://download.pytorch.org/whl/cpu" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.