{"id":15601057,"url":"https://github.com/lucidrains/adam-atan2-pytorch","last_synced_at":"2025-04-07T11:05:25.746Z","repository":{"id":250907112,"uuid":"835811516","full_name":"lucidrains/adam-atan2-pytorch","owner":"lucidrains","description":"Implementation of the proposed Adam-atan2 from Google Deepmind in Pytorch","archived":false,"fork":false,"pushed_at":"2024-11-27T01:26:46.000Z","size":439,"stargazers_count":102,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T09:07:26.326Z","etag":null,"topics":["adam","artificial-intelligence","deep-learning","optimizers","stability"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucidrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-30T15:19:02.000Z","updated_at":"2025-03-24T20:32:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"186b211c-21eb-4a3c-ade1-656dbb1f8c83","html_url":"https://github.com/lucidrains/adam-atan2-pytorch","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"860049657947f1d3e8440468344b52959aea2d02"},"previous_names":["lucidrains/adam-atan2-pytorch"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2Fadam-atan2-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2Fadam-atan2-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2Fadam-atan2-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2Fadam-atan2-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucidrains","download_url":"https://codeload.github.com/lucidrains/adam-atan2-pytorch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640462,"owners_count":20971557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adam","artificial-intelligence","deep-learning","optimizers","stability"],"created_at":"2024-10-03T02:13:19.843Z","updated_at":"2025-04-07T11:05:25.727Z","avatar_url":"https://github.com/lucidrains.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./adam-atan2.png\" width=\"400px\"\u003e\u003c/img\u003e\n\n## Adam-atan2 - Pytorch\n\nImplementation of the proposed \u003ca href=\"https://arxiv.org/abs/2407.05872\"\u003eAdam-atan2\u003c/a\u003e optimizer in Pytorch\n\nA multi-million dollar paper out of google deepmind proposes a small change to Adam update rule (using `atan2`) to remove the epsilon altogether for numerical stability and scale invariance\n\nIt also contains some features for improving plasticity (continual learning field)\n\n## Install\n\n```bash\n$ pip install adam-atan2-pytorch\n```\n\n## Usage\n\n```python\nimport torch\nfrom torch import nn\n\n# toy model\n\nmodel = nn.Linear(10, 1)\n\n# import AdamAtan2 and instantiate with parameters\n\nfrom adam_atan2_pytorch import AdamAtan2\n\nopt = AdamAtan2(model.parameters(), lr = 1e-4)\n\n# forward and backwards\n\nfor _ in range(100):\n  loss = model(torch.randn(10))\n  loss.backward()\n\n  # optimizer step\n\n  opt.step()\n  opt.zero_grad()\n```\n\n## Citations\n\n```bibtex\n@inproceedings{Everett2024ScalingEA,\n    title   = {Scaling Exponents Across Parameterizations and Optimizers},\n    author  = {Katie Everett and Lechao Xiao and Mitchell Wortsman and Alex Alemi and Roman Novak and Peter J. Liu and Izzeddin Gur and Jascha Narain Sohl-Dickstein and Leslie Pack Kaelbling and Jaehoon Lee and Jeffrey Pennington},\n    year    = {2024},\n    url     = {https://api.semanticscholar.org/CorpusID:271051056}\n}\n```\n\n```bibtex\n@inproceedings{Kumar2023MaintainingPI,\n    title   = {Maintaining Plasticity in Continual Learning via Regenerative Regularization},\n    author  = {Saurabh Kumar and Henrik Marklund and Benjamin Van Roy},\n    year    = {2023},\n    url     = {https://api.semanticscholar.org/CorpusID:261076021}\n}\n```\n\n```bibtex\n@article{Lewandowski2024LearningCB,\n    title   = {Learning Continually by Spectral Regularization},\n    author  = {Alex Lewandowski and Saurabh Kumar and Dale Schuurmans and Andr'as Gyorgy and Marlos C. Machado},\n    journal = {ArXiv},\n    year    = {2024},\n    volume  = {abs/2406.06811},\n    url     = {https://api.semanticscholar.org/CorpusID:270380086}\n}\n```\n\n```bibtex\n@inproceedings{Taniguchi2024ADOPTMA,\n    title   = {ADOPT: Modified Adam Can Converge with Any \\$\\beta\\_2\\$ with the Optimal Rate},\n    author  = {Shohei Taniguchi and Keno Harada and Gouki Minegishi and Yuta Oshima and Seong Cheol Jeong and Go Nagahara and Tomoshi Iiyama and Masahiro Suzuki and Yusuke Iwasawa and Yutaka Matsuo},\n    year    = {2024},\n    url     = {https://api.semanticscholar.org/CorpusID:273822148}\n}\n```\n\n```bibtex\n@inproceedings{Liang2024CautiousOI,\n    title   = {Cautious Optimizers: Improving Training with One Line of Code},\n    author  = {Kaizhao Liang and Lizhang Chen and Bo Liu and Qiang Liu},\n    year    = {2024},\n    url     = {https://api.semanticscholar.org/CorpusID:274234738}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucidrains%2Fadam-atan2-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucidrains%2Fadam-atan2-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucidrains%2Fadam-atan2-pytorch/lists"}