pytorch-ranger
Ranger - a synergistic optimizer using RAdam (Rectified Adam) and LookAhead in one codebase
What it is and what it does
Ranger is a PyTorch optimizer that merges two optimization techniques—RAdam for rectified adaptive momentum and LookAhead for weight averaging—into a single implementation. It was designed to improve training stability and generalization in deep learning models. The package provides three optimizer variants: Ranger (the main version), RangerVA (using calibrated anisotropic adaptive learning rates), and RangerQH, each with different parameter configurations.
You use it like any PyTorch optimizer: instantiate it with your model's parameters and pass it to your training loop. The package depends only on torch and installs as a lightweight pure-Python wheel. However, the project is no longer maintained—the last commit was 2021-12-01—so it receives no updates, bug fixes, or compatibility patches for newer PyTorch releases.
Use it for:
- Training convolutional neural networks where you want better convergence than standard Adam, especially with Mish activation functions.
- Fine-tuning large models where weight averaging via LookAhead helps stabilize learning and reduce overfitting.
- Experimenting with alternative optimization strategies for image classification tasks on platforms like FastAI.
- Comparing optimizer performance in research or benchmarking studies of deep learning training dynamics.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Ranger is a PyTorch optimizer that combines RAdam (Rectified Adam) and LookAhead techniques to improve training stability and convergence in deep learning models.
No—install only if you are reproducing historical research or maintaining legacy code. The package is abandoned (last commit 2021-12-01) and receives no maintenance, bug fixes, or compatibility updates for modern PyTorch versions. For new projects, use actively maintained optimizers like torch.optim.AdamW or community-supported alternatives. The permissive Apache license poses no legal barrier, but the lack of maintenance makes it a liability.
Install
pytorch-ranger on PyPI
pip
pip install pytorch-rangeruv
uv add pytorch-rangerpoetry
poetry add pytorch-rangerInstalling pytorch-ranger
Before you install
Low install friction with a pure Python wheel. However, the package is abandoned—last commit was 2021-12-01. No active maintenance or updates.
License in practice
Licensed under Apache (permissive), so you can use it freely in commercial and open-source projects without restrictive obligations.
Quickstart
pip install pytorch_ranger
from pytorch_ranger import Ranger
model = ... # your PyTorch model
optimizer = Ranger(model.parameters())
Requires torch as a runtime dependency; PyTorch must be installed separately.
Verify before relying
- Whether the optimizer variants (RangerVA, RangerQH) are stable or still experimental given the beta status.
- Current compatibility with recent PyTorch versions, given the last commit was in 2021.
- Whether memory issues mentioned in the description (save/load stranding weights) are fully resolved in version 0.1.1.
Package facts
| License | Apache (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — torch |
| Maintenance | abandoned — 2,328 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 160,045/month — #10,677 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytorch_ranger-0.1.1-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
torch-optimizerProvides a collection of alternative…
permissive · top 15,000 on PyPI
lion-pytorchLion is a PyTorch optimizer that implements an…
permissive · top 15,000 on PyPI
pytorch_optimizerProvides a collection of modern optimizers,…
permissive · top 15,000 on PyPI
schedulefreeProvides schedule-free optimizers for PyTorch…
permissive · top 15,000 on PyPI
adam-atan2-pytorchProvides an Adam optimizer variant using atan2…
permissive · top 15,000 on PyPI
flashoptimFlashOptim provides drop-in replacements for…
permissive · top 15,000 on PyPI
prodigyoptProdigy is a PyTorch optimizer that adapts the…
permissive · top 15,000 on PyPI
opacusOpacus enables training PyTorch models with…
permissive · top 15,000 on PyPI
pytorch-forecastingPyTorch Forecasting provides neural network…
permissive · top 15,000 on PyPI
arm-pytorch-utilitiesProvides utility functions for PyTorch…
permissive · top 15,000 on PyPI