heavyball 2.0.0.dev0__py3-none-any.whl → 2.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- heavyball/__init__.py +168 -29
- heavyball/chainable.py +165 -63
- heavyball/helpers.py +5 -1
- heavyball/utils.py +507 -124
- {heavyball-2.0.0.dev0.dist-info → heavyball-2.1.1.dist-info}/METADATA +19 -7
- heavyball-2.1.1.dist-info/RECORD +9 -0
- {heavyball-2.0.0.dev0.dist-info → heavyball-2.1.1.dist-info}/WHEEL +1 -1
- heavyball-2.0.0.dev0.dist-info/RECORD +0 -9
- {heavyball-2.0.0.dev0.dist-info → heavyball-2.1.1.dist-info}/licenses/LICENSE +0 -0
- {heavyball-2.0.0.dev0.dist-info → heavyball-2.1.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: heavyball
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.1.1
|
4
4
|
Summary: Efficient Optimizers
|
5
5
|
Author-email: HeavyBall Authors <github.heavyball@nestler.sh>
|
6
6
|
Project-URL: source, https://github.com/HomebrewML/HeavyBall
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.9
|
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
License-File: LICENSE
|
18
18
|
Requires-Dist: opt-einsum>=3.4.0
|
19
|
-
Requires-Dist: torch>=2.
|
19
|
+
Requires-Dist: torch>=2.7.0
|
20
20
|
Requires-Dist: numpy
|
21
21
|
Provides-Extra: dev
|
22
22
|
Requires-Dist: pre-commit; extra == "dev"
|
@@ -24,9 +24,12 @@ Requires-Dist: pytest; extra == "dev"
|
|
24
24
|
Requires-Dist: ruff; extra == "dev"
|
25
25
|
Requires-Dist: matplotlib; extra == "dev"
|
26
26
|
Requires-Dist: seaborn; extra == "dev"
|
27
|
-
Requires-Dist: hyperopt; extra == "dev"
|
28
27
|
Requires-Dist: pandas; extra == "dev"
|
29
28
|
Requires-Dist: typer; extra == "dev"
|
29
|
+
Requires-Dist: optuna; extra == "dev"
|
30
|
+
Requires-Dist: optunahub; extra == "dev"
|
31
|
+
Requires-Dist: hebo; extra == "dev"
|
32
|
+
Requires-Dist: lightbench; extra == "dev"
|
30
33
|
Dynamic: license-file
|
31
34
|
|
32
35
|
# heavyball
|
@@ -46,11 +49,11 @@ _High-performance, extensible, chainable optimizers for PyTorch._
|
|
46
49
|
|
47
50
|
## Key Features
|
48
51
|
|
49
|
-
- Foreach-based optimizers: `ForeachAdamW`, `ForeachRMSprop`, `ForeachSFAdamW`, `Muon`, `ADOPT`, `MSAM
|
52
|
+
- Foreach-based optimizers: `ForeachAdamW`, `ForeachRMSprop`, `ForeachSFAdamW`, `Muon`, `ADOPT`, `MSAM` (Momentum SAM), …
|
50
53
|
- Schedule-Free optimizers with dynamic learning rate adaptation.
|
51
54
|
- Advanced update rules: MARS correction, cautious updates, PaLM beta2 scheduling.
|
52
55
|
- Chainable transforms for custom optimization recipes.
|
53
|
-
- Comprehensive benchmark suite (`
|
56
|
+
- Comprehensive benchmark suite packaged separately as LightBench (`../LightBench`).
|
54
57
|
- Detailed documentation and example-driven tutorials.
|
55
58
|
|
56
59
|
## Quickstart
|
@@ -81,11 +84,20 @@ for data, target in dataloader:
|
|
81
84
|
|
82
85
|
## Benchmarks
|
83
86
|
|
84
|
-
> Reproduce benchmarks with:
|
87
|
+
> Reproduce benchmarks with LightBench (install it via `pip install -e ../LightBench` from the repo root):
|
85
88
|
> ```bash
|
86
|
-
> python3 -m
|
89
|
+
> python3 -m lightbench.run_all_benchmarks --opt ForeachSOAP --opt LaProp --opt AdamW --opt Muon --opt ForeachCachedNewtonPSGD --opt RMSprop --opt OrthoLaProp --opt ForeachSFAdamW --opt ForeachADOPT --opt LaPropOrtho --opt CachedPSGDKron --opt SignLaProp --opt ForeachSOLP --opt PSGDLRA --opt NewtonPSGDLRA --opt NewtonHybrid2PSGDKron --opt NewtonHybrid2PSGDLRA --opt mars-NewtonHybrid2PSGDLRA --opt MSAMLaProp --opt mars-adaptive-NewtonHybrid2PSGDKron --opt mars-ortho-NewtonHybrid2PSGDKron --opt MuonLaProp --opt mars-unscaled-NewtonHybrid2PSGDKron --opt mars-NewtonHybrid2PSGDKron --opt cautious-AdamW --opt unscaled_cautious-AdamW --opt mars-AdamW --dtype float32 --steps 1000000 --trials 1000 --parallelism 256 --seeds 1 --difficulties trivial --difficulties easy --difficulties medium --difficulties hard --difficulties extreme --difficulties nightmare --timeout 2880
|
87
90
|
> ```
|
88
91
|
|
92
|
+
## Migrating from HeavyBall 1.x
|
93
|
+
|
94
|
+
- Read the detailed [2.0.0 migration notes](docs/heavyball2.md) for an end-to-end checklist, including guidance for restoring legacy behaviour when needed.
|
95
|
+
- Use `scripts/migrate_optimizer_state.py` to rewrite pre-2.0 optimizer checkpoints:
|
96
|
+
```bash
|
97
|
+
python scripts/migrate_optimizer_state.py path/to/checkpoint.pt heavyball.ForeachAdamW --state-key optimizer
|
98
|
+
```
|
99
|
+
The utility renames legacy state entries, fans them out per parameter view, and injects the HeavyBall metadata block expected by 2.0.0.
|
100
|
+
|
89
101
|
|
90
102
|
## Contributing
|
91
103
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
heavyball/__init__.py,sha256=1BTb7G-VcfcMyS4EpuVnhE5DBp2fj_Zzs9EQr6slPzg,30491
|
2
|
+
heavyball/chainable.py,sha256=8S-7QRZYiy_ARhQ8uDu5G0Eg3ouT9Vcfk-rxbKlp4zI,42510
|
3
|
+
heavyball/helpers.py,sha256=zk_S84wpGcvO9P6kn4UeaQUIDowHxcbM9qQITEm2g5I,30267
|
4
|
+
heavyball/utils.py,sha256=zAOlSDqMbSUJEdCfoOcUbRIO94Qg4cxT40IN_UPskQk,102492
|
5
|
+
heavyball-2.1.1.dist-info/licenses/LICENSE,sha256=G9fFZcNIVWjU7o6Pr_4sJBRCNDU5X-zelSxIJ2D48ms,1323
|
6
|
+
heavyball-2.1.1.dist-info/METADATA,sha256=92i_Q4bxQgRsH8BEOYEuW0Qg43nR5jJLSPGIIJmyzxc,5037
|
7
|
+
heavyball-2.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
8
|
+
heavyball-2.1.1.dist-info/top_level.txt,sha256=SzCxSVg_qCUPA4kZObW3Zyo4v-d_mMOD-p7a-WXTl2E,10
|
9
|
+
heavyball-2.1.1.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
heavyball/__init__.py,sha256=BUKhEKbpIY-93nMd5CEkhKv6d6LbSAstY_WSpFGGzQg,26017
|
2
|
-
heavyball/chainable.py,sha256=aoPG_MtVncDqZRKeKsIkmnTsYLhmF3_I_06ZMovgTKc,39190
|
3
|
-
heavyball/helpers.py,sha256=gKUhzu38f8e7CdnBbR8M51g9w8w0Kft_RW3V2fMXKw0,30159
|
4
|
-
heavyball/utils.py,sha256=jrFHeZ0MjkiUutuLTT8ky8G_kaDFxIZACsfK_tRVQaE,90204
|
5
|
-
heavyball-2.0.0.dev0.dist-info/licenses/LICENSE,sha256=G9fFZcNIVWjU7o6Pr_4sJBRCNDU5X-zelSxIJ2D48ms,1323
|
6
|
-
heavyball-2.0.0.dev0.dist-info/METADATA,sha256=Au0Wdlt4YpTMnVRZdH29Svjwbuqks4fxivdFRXWPP7I,4254
|
7
|
-
heavyball-2.0.0.dev0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
8
|
-
heavyball-2.0.0.dev0.dist-info/top_level.txt,sha256=SzCxSVg_qCUPA4kZObW3Zyo4v-d_mMOD-p7a-WXTl2E,10
|
9
|
-
heavyball-2.0.0.dev0.dist-info/RECORD,,
|
File without changes
|
File without changes
|