OPAL: LLM Agent Rewrites Optimizer Source Code During Training to Match or Beat Static Recipes
·2026.10.21 09:00
Key point
OPAL uses an LLM agent to dynamically rewrite optimizer logic during training, matching or beating static baselines on language and image generation tasks.
Details
- OPAL allows an LLM agent to rewrite optimizer source code (
updater.pyandanalysis.py) in real-time based on observed training dynamics, replacing static pre-defined recipes. - On the modded-nanogpt benchmark (162M GPT), OPAL matched or exceeded the best static baselines (Shampoo, Muon, AdamW) across various batch sizes and language datasets.
- In image generation, OPAL improved FID-50K scores compared to official recipes: 1.83 vs 2.18 for LightningDiT-XL/1 and 3.19 vs 3.39 for RAEv2-B.
- The system autonomously handles edge cases such as gradient spikes and overfitting by implementing custom clipping gates and learning rate adjustments.
- Non-blocking implementation adds minimal wall-clock overhead (1.01x to 1.14x), with API costs (approx. $6.42 for a LightningDiT run) being negligible compared to GPU compute costs.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.