torch-optimizer
pytorch-optimizer
Decision gist · record as of 2026-08-14
Yes, if you want to experiment with alternative optimizers and your PyTorch version is not significantly newer than late 2021. The package is dormant but functional, has no known vulnerabilities, and installs cleanly. Be aware that it may not be actively maintained for the latest PyTorch releases, so test compatibility with your environment first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure Python wheel.
- Maintenance is dormant—last release was October 2021 and last commit March 2024—but the package remains functional and the repository is not archived.
License · maintenance · safety
Apache 2 (permissive) — Licensed under Apache 2 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.
last release 2021-10-31 (1748 days) · last repo commit 2024-03-22 · 3,170 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 166,479 downloads/mo, #10,494 on PyPI
Alternatives
Verify before relying
pip install torch-optimizer
import torch_optimizer as optim
optimizer = optim.DiffGrad(model.parameters(), lr=0.001)
optimizer.step()- Whether all listed optimizers remain well-maintained or have known issues in recent PyTorch versions
- Compatibility with PyTorch versions released after the package's last update in October 2021
What it is and what it does
torch-optimizer is a collection of alternative optimization algorithms for PyTorch training, including AdaBound, RAdam, Lamb, DiffGrad, NovoGrad, MADGRAD, and many others. Each optimizer implements a different adaptive or momentum-based gradient descent variant, all exposing the same interface as PyTorch's standard optim module so they can be used as drop-in replacements.
You import the package and instantiate an optimizer by name, passing your model parameters and a learning rate, then call step() during training just as you would with standard optimizers. The package bundles research implementations of algorithms from academic papers, letting you experiment with different optimization strategies without implementing them yourself.
Use it for
- Experimenting with alternative optimizers like RAdam or Lamb to improve convergence on your specific model and dataset
- Replacing standard Adam with AdaBound to get faster convergence with automatic learning rate scheduling
- Using DiffGrad or NovoGrad when you want gradient-based adaptive methods beyond PyTorch's built-in optimizers
- Prototyping with Ranger for potentially better generalization in deep learning
- Comparing multiple optimizers systematically by swapping them in and out with the same interface
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you want to experiment with alternative optimizers and your PyTorch version is not significantly newer than late 2021.
The package is dormant but functional, has no known vulnerabilities, and installs cleanly. Be aware that it may not be actively maintained for the latest PyTorch releases, so test compatibility with your environment first.
Install
torch-optimizer on PyPI
Before you install
Low install friction with a pure Python wheel. Maintenance is dormant—last release was October 2021 and last commit March 2024—but the package remains functional and the repository is not archived.
License in practice
Licensed under Apache 2 (permissive), so you can use it freely in commercial and private projects without copyleft obligations.
Quickstart
pip install torch-optimizer
import torch_optimizer as optim
optimizer = optim.DiffGrad(model.parameters(), lr=0.001)
optimizer.step()
Verify before relying
- Whether all listed optimizers remain well-maintained or have known issues in recent PyTorch versions
- Compatibility with PyTorch versions released after the package's last update in October 2021
Package facts
| License | Apache 2 permissive |
| Python support | Supports the current Python release >=3.6.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestorchpytorch-ranger |
| Maintenance | Dormant 1,748 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 166,479 / month, #10,494 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: torch_optimizer-0.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “advanced gradient descent methods”
- torch-optimizerProvides a collection of alternative optimization algorithms for…
- pytorch_optimizerProvides a collection of modern optimizers, learning rate schedulers,…
- schedulefreeProvides schedule-free optimizers for PyTorch that eliminate the need…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also nevergrad · pytorch_optimizer · pytorch-ranger · schedulefree · flashoptim · entmax · torchsde · lion-pytorch · torchdiffeq · ropt-dakota