Repository navigation
lrsched v0.3.0
What's new
Adds scale_by_group(schedule, *, multipliers) for per-parameter-group learning-rate multipliers.
The base schedule produces one learning rate per step; each named group scales it by a fixed positive multiplier. Returns a GroupSchedule (callable from step to dict[str, float]), exported alongside the new GroupSchedule type alias.
Typical use for discriminative/layer-wise learning rates:
from lrsched import cosine, scale_by_group
base = cosine(base_lr=1e-3, min_lr=1e-5, total_steps=1000)
group_lr = scale_by_group(base, multipliers={"backbone": 0.1, "head": 1.0})
lrs = group_lr(250) # {"backbone": ..., "head": ...}Multipliers must be positive and finite; an empty mapping raises ValueError.
Changelog
See CHANGELOG.md for full history.