@@ -17,6 +17,9 @@ PyLO provides efficient PyTorch implementations of cutting-edge learned optimize
1717- ** PyTorch-native API** designed for simplicity and familiarity
1818- ** Hugging Face integration** for sharing and loading meta-models
1919
20+ Learned optimizers:
21+ * ELO series: [ https://arxiv.org/abs/2506.10315 ] ( https://arxiv.org/abs/2506.10315 )
22+
2023# Installation
2124
2225### Via URL (slow, no Kernels)
@@ -72,22 +75,28 @@ python -m pylo.util.patch_mup
7275
7376## Quick Start
7477
78+ Taking ` ELO-CELO2 ` (the strongest LO) for example.
79+
7580``` python
7681import torch
77- from pylo.optim import VeLO_CUDA
82+ from pylo.optim import ELO_CELO2_CUDA
7883
79- # Initialize a model
8084model = torch.nn.Linear(10 , 2 )
8185
82- # Create a learned optimizer instance
83- optimizer = VeLO_CUDA(model.parameters())
86+ num_steps = 1000 # total optimization steps
87+
88+ # Meta-learned weights download automatically from the Hugging Face Hub on first use.
89+ # The optimizer has no built-in LR schedule; drive it with a standard
90+ # torch.optim.lr_scheduler (warmup, cosine, etc.).
91+ optimizer = ELO_CELO2_CUDA(model.parameters(), lr = 3.16e-4 , weight_decay = 0.1 , adam_lr_mult = 20 )
92+ scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max = num_steps, eta_min = 3.16e-5 )
8493
85- # Use it like any PyTorch optimizer
86- for epoch in range (10 ):
94+ for step in range (num_steps):
8795 optimizer.zero_grad()
8896 loss = loss_fn(model(input ), target)
8997 loss.backward()
90- optimizer.step(loss) # pass the loss
98+ optimizer.step()
99+ scheduler.step()
91100```
92101
93102## Sharing Learned Optimizers
0 commit comments