schedulefree
Schedule Free Learning in PyTorch
What it is and what it does
Schedule-free learning replaces traditional learning rate schedules with a method that combines interpolation and averaging of optimizer iterates, eliminating the need to specify training duration in advance. The package provides PyTorch implementations of SGDScheduleFree, AdamWScheduleFree, and RAdamScheduleFree, each with a standard form and a reference form that trades memory for numerical stability. The core insight is that the optimizer maintains three sequences: one for gradient evaluation, one for parameter updates, and one for test/validation evaluation, with the averaging mechanism allowing the method to achieve fast early convergence without the instability of standard momentum-based approaches.
The method requires explicit calls to optimizer.train() and optimizer.eval() to switch between the gradient evaluation and validation sequences, and learning rates typically need to be larger than classical schedules. It works without a learning rate schedule but remains compatible with one, and supports warmup through a warmup_steps parameter. The approach is based on a research preprint and has active maintenance with community contributions.
Use it for:
- Training deep neural networks without manually tuning learning rate decay schedules or specifying total training steps upfront.
- Experimenting with different training durations without retuning the optimizer configuration for each run length.
- Wrapping existing PyTorch optimizers via ScheduleFreeWrapper to add schedule-free behavior to custom optimization setups.
- Research projects requiring comparison with Polyak-Ruppert averaging or Nesterov acceleration methods.
- Image classification tasks like MNIST where provided examples demonstrate the integration pattern.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides schedule-free optimizers for PyTorch that eliminate the need to specify stopping time in advance, replacing momentum with interpolation and averaging to achieve faster training without learning rate schedules.
Yes, if you want to eliminate learning rate schedule tuning and are willing to retune learning rate magnitude and the beta interpolation parameter. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it safe to try. Not worth installing if your workflow is heavily dependent on standard schedules or if you cannot modify optimizer.train()/eval() calls around your training loop.
Install
schedulefree on PyPI
pip
pip install schedulefreeuv
uv add schedulefreepoetry
poetry add schedulefreeInstalling schedulefree
Before you install
Low friction installation with only torch and typing-extensions as runtime dependencies. Active maintenance with recent commits and steady release cadence since initial release in April 2024.
License in practice
Permissive Apache license allows commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install schedulefree
import torch
from schedulefree import AdamWScheduleFree
optimizer = AdamWScheduleFree(model.parameters())
for epoch in range(num_epochs):
optimizer.train()
# training loop
optimizer.eval()
# validation loop
Requires calling optimizer.train() and optimizer.eval() at the same points as model.train() and model.eval(); BatchNorm models need additional handling to update running statistics at the correct sequence point.
Verify before relying
- Whether the experimental ScheduleFreeWrapper is production-ready or remains research-stage only.
- Performance gains relative to standard schedules on specific model architectures or domains.
- Compatibility with distributed training frameworks and gradient accumulation patterns.
- Specific learning rate multiplier guidance for different model types beyond the 10x-50x range for SGD and 1x-10x for AdamW.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — torch, typing-extensions |
| Maintenance | actively maintained — 508 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 177,727/month — #10,207 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: schedulefree-1.4.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
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
prodigyoptProdigy is a PyTorch optimizer that adapts the…
permissive · top 15,000 on PyPI
flashoptimFlashOptim provides drop-in replacements for…
permissive · top 15,000 on PyPI
pytorch-rangerRanger is a PyTorch optimizer that combines…
permissive · top 15,000 on PyPI
torch-optimizerProvides a collection of alternative…
permissive · top 15,000 on PyPI
adam-atan2-pytorchProvides an Adam optimizer variant using atan2…
permissive · top 15,000 on PyPI
torch-emaComputes exponential moving averages of PyTorch…
unclear · top 15,000 on PyPI
fsrsImplements the Free Spaced Repetition Scheduler…
permissive · top 15,000 on PyPI
accelerateAccelerate abstracts away distributed training…
permissive · top 1,000 on PyPI