heavyball 1.7.2__py3-none-any.whl → 2.0.0.dev0__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.
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.4
2
+ Name: heavyball
3
+ Version: 2.0.0.dev0
4
+ Summary: Efficient Optimizers
5
+ Author-email: HeavyBall Authors <github.heavyball@nestler.sh>
6
+ Project-URL: source, https://github.com/HomebrewML/HeavyBall
7
+ Project-URL: tracker, https://github.com/HomebrewML/HeavyBall/issues
8
+ Keywords: torch,optimizer,muon,soap,psgd
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Natural Language :: English
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: opt-einsum>=3.4.0
19
+ Requires-Dist: torch>=2.1.0
20
+ Requires-Dist: numpy
21
+ Provides-Extra: dev
22
+ Requires-Dist: pre-commit; extra == "dev"
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Requires-Dist: ruff; extra == "dev"
25
+ Requires-Dist: matplotlib; extra == "dev"
26
+ Requires-Dist: seaborn; extra == "dev"
27
+ Requires-Dist: hyperopt; extra == "dev"
28
+ Requires-Dist: pandas; extra == "dev"
29
+ Requires-Dist: typer; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # heavyball
33
+
34
+ [![PyPI version](https://img.shields.io/pypi/v/heavyball?color=blue)][pypi]
35
+ [![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)][license]
36
+
37
+ _High-performance, extensible, chainable optimizers for PyTorch._
38
+
39
+ ## Why heavyball
40
+
41
+ - **Lightning-Fast Training**: Batched `foreach` operations deliver significant speedups on large models.
42
+ - **Adaptive & Extensible**: Built-in AdamW, RMSprop, Schedule-Free algorithms, and PaLM-inspired schedules.
43
+ - **Plug-and-Play**: Drop-in replacements for `torch.optim` with seamless integration.
44
+ - **Customizable**: Chainable API lets you compose optimizers and transforms (MARS correction, cautious updates, orthogonal updates).
45
+ - **Battle-Tested**: Extensive benchmarks and real-world examples included.
46
+
47
+ ## Key Features
48
+
49
+ - Foreach-based optimizers: `ForeachAdamW`, `ForeachRMSprop`, `ForeachSFAdamW`, `Muon`, `ADOPT`, `MSAM`, …
50
+ - Schedule-Free optimizers with dynamic learning rate adaptation.
51
+ - Advanced update rules: MARS correction, cautious updates, PaLM beta2 scheduling.
52
+ - Chainable transforms for custom optimization recipes.
53
+ - Comprehensive benchmark suite (`benchmark/`).
54
+ - Detailed documentation and example-driven tutorials.
55
+
56
+ ## Quickstart
57
+
58
+ **Install:**
59
+ ```bash
60
+ pip install heavyball
61
+ ```
62
+
63
+ **Basic usage:**
64
+ ```python
65
+ import torch
66
+ from torch import nn
67
+ from heavyball import ForeachAdamW
68
+
69
+ model = nn.Sequential(
70
+ nn.Linear(128, 64), nn.ReLU(), nn.Linear(64, 10)
71
+ )
72
+ optimizer = ForeachAdamW(model.parameters(), lr=1e-3)
73
+
74
+ for data, target in dataloader:
75
+ optimizer.zero_grad()
76
+ output = model(data)
77
+ loss = torch.nn.functional.cross_entropy(output, target)
78
+ loss.backward()
79
+ optimizer.step()
80
+ ```
81
+
82
+ ## Benchmarks
83
+
84
+ > Reproduce benchmarks with:
85
+ > ```bash
86
+ > python3 -m benchmark.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
+ > ```
88
+
89
+
90
+ ## Contributing
91
+
92
+ We welcome contributions! Please check the [issue tracker][tracker] and follow these steps:
93
+ 1. Fork the repo and create a feature branch.
94
+ 2. Install dev dependencies: `pip install -e .[dev]`.
95
+ 3. Run tests: `pytest`.
96
+ 4. Submit a pull request.
97
+
98
+ ## License
99
+
100
+ BSD 3-Clause — see the [LICENSE](LICENSE) file.
101
+
102
+ ---
103
+ <p align="center">
104
+ Made by the HeavyBall team.
105
+ </p>
106
+
107
+ [pypi]: https://pypi.org/project/heavyball/
108
+ [license]: LICENSE
109
+ [tracker]: https://github.com/HomebrewML/HeavyBall/issues
@@ -0,0 +1,9 @@
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5