Skip to content

Commit fd717fc

Browse files
authored
Merge pull request #221 from kozistr/feature/aida-optimizer
[Feature] Implement Aida optimizer
2 parents c583666 + f921dfb commit fd717fc

File tree

14 files changed

+549
-1036
lines changed

14 files changed

+549
-1036
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
python-version: ['3.11']
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
cache: 'pip'
@@ -33,7 +33,7 @@ jobs:
3333
PYTHONDONTWRITEBYTECODE: 1
3434
run: make test
3535
- name: Check codecov
36-
uses: codecov/codecov-action@v3
36+
uses: codecov/codecov-action@v4
3737
with:
3838
token: ${{ secrets.CODECOV_TOKEN }}
3939
directory: ./

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
- name: Get the version
1616
id: get_version
1717
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
@@ -31,9 +31,9 @@ jobs:
3131
needs: release
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Setup Python 3.11
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: 3.11
3939
cache: 'pip'

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
**pytorch-optimizer** is optimizer & lr scheduler collections in PyTorch.
1212
I just re-implemented (speed & memory tweaks, plug-ins) the algorithm while based on the original paper. Also, It includes useful and practical optimization ideas.
13-
Currently, **61 optimizers (+ `bitsandbytes`)**, **10 lr schedulers**, and **13 loss functions** are supported!
13+
Currently, **62 optimizers (+ `bitsandbytes`)**, **10 lr schedulers**, and **13 loss functions** are supported!
1414

1515
Highly inspired by [pytorch-optimizer](https://github.com/jettify/pytorch-optimizer).
1616

@@ -27,9 +27,11 @@ So, please double-check the license before using it at your work.
2727
$ pip3 install pytorch-optimizer
2828
```
2929

30-
From `pytorch-optimizer v2.12.0`, you can install and import `bitsandbytes` optimizers.
30+
From `v2.12.0`, you can install and import `bitsandbytes` optimizers.
3131
please check [the requirements](https://github.com/TimDettmers/bitsandbytes?tab=readme-ov-file#tldr) before installing it.
3232

33+
From `v3.0.0`, drop `Python 3.7` support. However, you can still use this package with `Python 3.7` by installing with `--ignore-requires-python` option.
34+
3335
```bash
3436
$ pip install "pytorch-optimizer[bitsandbytes]"
3537
```
@@ -156,7 +158,8 @@ supported_optimizers = get_supported_optimizers()
156158
| LOMO | *Full Parameter Fine-tuning for Large Language Models with Limited Resources* | [github](https://github.com/OpenLMLab/LOMO) | <https://arxiv.org/abs/2306.09782> | [cite](https://github.com/OpenLMLab/LOMO#citation) |
157159
| Tiger | *A Tight-fisted Optimizer, an optimizer that is extremely budget-conscious* | [github](https://github.com/bojone/tiger) | | [cite](https://github.com/bojone/tiger/blob/main/README_en.md#citation) |
158160
| CAME | *Confidence-guided Adaptive Memory Efficient Optimization* | [github](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/CAME) | <https://aclanthology.org/2023.acl-long.243/> | [cite](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/CAME#citation) |
159-
| WSAM | *Sharpness-Aware Minimization Revisited: Weighted Sharpness as a Regularization Term* | [github](https://github.com/intelligent-machine-learning/dlrover/blob/master/atorch/atorch/optimizers/wsam.py) | <https://arxiv.org/abs/2305.15817> | [cite](https://github.com/intelligent-machine-learning/dlrover) |
161+
| WSAM | *Sharpness-Aware Minimization Revisited: Weighted Sharpness as a Regularization Term* | [github](https://github.com/intelligent-machine-learning/dlrover/blob/master/atorch/atorch/optimizers/wsam.py) | <https://arxiv.org/abs/2305.15817> | [cite](https://github.com/intelligent-machine-learning/dlrover) |
162+
| Aida | *A DNN Optimizer that Improves over AdaBelief by Suppression of the Adaptive Stepsize Range* | [github](https://github.com/guoqiang-zhang-x/Aida-Optimizer) | <https://arxiv.org/abs/2203.13273> | [cite](https://github.com/guoqiang-zhang-x/Aida-Optimizer?tab=readme-ov-file#1-brief-description-of-aida) |
160163

161164
## Supported LR Scheduler
162165

docs/changelogs/v3.0.0.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Change Log
2+
3+
Major version is updated! (`v2.12.0` -> `v3.0.0`) (#164)
4+
5+
### Feature
6+
7+
* Implement `Aida` optimizer. (#220, #221)
8+
* [A DNN Optimizer that Improves over AdaBelief by Suppression of the Adaptive Stepsize Range](https://arxiv.org/abs/2203.13273)
9+
* Implement `WSAM` optimizer. (#213, #216)
10+
* [Sharpness-Aware Minimization Revisited: Weighted Sharpness as a Regularization Term](https://arxiv.org/abs/2305.15817)
11+
12+
## Dependency
13+
14+
* Drop `Python 3.7` support officially. (#221)
15+
* Please check the [README](https://github.com/kozistr/pytorch_optimizer?tab=readme-ov-file#getting-started).
16+
17+
## Docs
18+
19+
* Add missing parameters in `Ranger21 optimizer` document. (#214, #215)
20+
* Fix `WSAM` optimizer paper link. (#219)
21+
22+
### Contributions
23+
24+
thanks to @sdbds
25+
26+
### Diff
27+
28+
[2.12.0...3.0.0](https://github.com/kozistr/pytorch_optimizer/compare/v2.12.0...v3.0.0)

docs/optimizer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
:docstring:
7373
:members:
7474

75+
::: pytorch_optimizer.Aida
76+
:docstring:
77+
:members:
78+
7579
::: pytorch_optimizer.AliG
7680
:docstring:
7781
:members:

0 commit comments

Comments
 (0)