skillfed

pytorch-ranger

Ranger - a synergistic optimizer using RAdam (Rectified Adam) and LookAhead in one codebase

pytorch-ranger v0.1.1 160.0K downloads/30d#10,677 on PyPI12
Permissive license Apache Abandoned released

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-ranger

uv

uv add pytorch-ranger

poetry

poetry add pytorch-ranger

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

pytorch optimizer radam lookaheaddeep learning optimizer rangeradaptive learning rate optimizerneural network training optimizerradam lookahead combinationpytorch ranger optimizer
optimizerabandoned

More Artificial Intelligence packages

Further reading