Implement mlx.optimizers.Adamax()#574
Conversation
Co-authored-by: sydneyrenee <188732394+sydneyrenee@users.noreply.github.com>
Co-authored-by: sydneyrenee <188732394+sydneyrenee@users.noreply.github.com>
Co-authored-by: sydneyrenee <188732394+sydneyrenee@users.noreply.github.com>
Co-authored-by: sydneyrenee <188732394+sydneyrenee@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR implements the Adamax optimizer, a variant of Adam that uses an infinity norm instead of L2 norm for the second moment estimation. The implementation extends the Adam class and provides a fully functional optimizer that differs from Adam in its exponentially weighted infinity norm computation.
Key changes:
- Added Adamax optimizer class extending Adam with infinity norm implementation (
max(β₂ * v, |g|)vs Adam'sβ₂ * v + (1-β₂) * g²) - Implemented comprehensive test suite covering construction, validation, state management, and inheritance behavior
- Updated documentation to reflect the completion of Adamax implementation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| node/src/optimizers/index.ts | Added Adamax class implementation with constructor, state initialization, and gradient application logic; imported required abs and maximum operations |
| node/test/optimizers.test.ts | Added comprehensive test suite covering Adamax construction, parameter validation, state initialization, and inheritance verification |
| node/CHECKLIST.md | Marked Adamax optimizer as fully implemented |
| docs/OPTIMIZER_API_VERIFICATION.md | Updated optimizer status, moving Adamax and other implemented optimizers to completed section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot resolve the merge markers for this merge of this branch. Rebase and resolve. |
I've successfully rebased the branch onto Changes made:
The branch is now up to date with main. The rebased commits are ready on the local branch but need to be force-pushed to update the PR. The merge conflicts have been cleanly resolved with no remaining conflict markers. |
Successfully Rebased onto Latest Main
Completed Rebase:
Ready for Review:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.