This project has been archived by its maintainers, and is no longer receiving any updates.
FANoS Optimizer (PyTorch)
FANoS = Friction-Adaptive Nosé–Hoover Symplectic momentum.
This package provides a PyTorch torch.optim.Optimizer implementation of FANoS:
- semi-implicit (symplectic-Euler) momentum update
- a Nosé–Hoover-inspired thermostat variable that adapts friction using kinetic-energy feedback
- optional diagonal RMS “mass” (preconditioner) and optional global gradient clipping
The accompanying paper is included in the release repo; this library is just the clean optimizer code.
Install
pip install fanos-optimizer
Quickstart
import torch
from fanos import FANoS
model = torch.nn.Linear(10, 1)
opt = FANoS(model.parameters(), lr=1e-3, grad_clip=1.0)
x = torch.randn(64, 10)
y = torch.randn(64, 1)
loss = torch.nn.functional.mse_loss(model(x), y)
loss.backward()
opt.step()
opt.zero_grad()
Notes (read this before hype happens)
FANoS is a research optimizer. In the paper's reported protocols it:
- helps vs unclipped AdamW/RMSProp on Rosenbrock-100D,
- but is not a general replacement for strong baselines like AdamW + clipping,
- and can be unstable or high-variance on some problems without tuning.
So: treat it as a tool for experiments, not a default choice for production.
Citation
Add the paper citation from CITATION.cff in the repo.
License
MIT (see LICENSE).
Metadata
Release files for fanos-optimizer 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fanos_optimizer-0.2.0.tar.gz | 7.9 kB | Without provenance | Details for fanos_optimizer-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fanos_optimizer-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for fanos_optimizer-0.2.0-py3-none-any.whl |
Total release size: 17.5 kB
Release files / fanos_optimizer-0.2.0.tar.gz
| Download URL | fanos_optimizer-0.2.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fea0bff0316d1bd0b8e3192e85c7ebfb1b1415f56e1df4341d5301b99037806
|
|
BLAKE2b-256 checksum How to use checksums |
8636fae327452383cb566660eedf7bdb2cfe88c41ee840faf94f6311f06e5d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / fanos_optimizer-0.2.0-py3-none-any.whl
| Download URL | fanos_optimizer-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c62a2484188b0c5712a361708f05dbd6b37fd0c611241478492d5f89b4c0bd6
|
|
BLAKE2b-256 checksum How to use checksums |
7311765bd0b2379df2b5a74fbd736514f23209b56c23369e5151d22161a090b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for fanos-optimizer 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.