{"id":34055318,"url":"https://github.com/stockeh/mlx-optimizers","last_synced_at":"2026-04-08T19:32:56.094Z","repository":{"id":261628787,"uuid":"884877704","full_name":"stockeh/mlx-optimizers","owner":"stockeh","description":"A collection of optimizers for MLX ","archived":false,"fork":false,"pushed_at":"2025-12-12T01:11:47.000Z","size":32493,"stargazers_count":54,"open_issues_count":18,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-02T17:36:22.336Z","etag":null,"topics":["mlx","optimization"],"latest_commit_sha":null,"homepage":"https://stockeh.github.io/mlx-optimizers/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stockeh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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-11-07T14:50:23.000Z","updated_at":"2025-11-13T04:14:05.000Z","dependencies_parsed_at":"2024-11-20T02:15:51.368Z","dependency_job_id":null,"html_url":"https://github.com/stockeh/mlx-optimizers","commit_stats":null,"previous_names":["stockeh/mlx-optimizers"],"tags_count":0,"template":false,"template_full_name":"allenai/python-package-template","purl":"pkg:github/stockeh/mlx-optimizers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stockeh%2Fmlx-optimizers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stockeh%2Fmlx-optimizers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stockeh%2Fmlx-optimizers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stockeh%2Fmlx-optimizers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stockeh","download_url":"https://codeload.github.com/stockeh/mlx-optimizers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stockeh%2Fmlx-optimizers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mlx","optimization"],"created_at":"2025-12-14T02:54:30.062Z","updated_at":"2026-04-08T19:32:56.074Z","avatar_url":"https://github.com/stockeh.png","language":"Python","funding_links":[],"categories":["Rising projects"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/src/_static/dark-mode-logo.svg#gh-dark-mode-only\" alt=\"logo\"\u003e\n  \u003cimg src=\"docs/src/_static/light-mode-logo.svg#gh-light-mode-only\" alt=\"logo\"\u003e\n\u003c/p\u003e\n\n# \n\n[**Documentation**](https://stockeh.github.io/mlx-optimizers/build/html/index.html) |\n[**Install**](#install) |\n[**Usage**](#usage) |\n[**Examples**](#examples) |\n[**Contributing**](#contributing)\n\n[![ci](https://github.com/stockeh/mlx-optimizers/workflows/Main/badge.svg)](https://pypi.org/project/mlx-optimizers/)\n[![PyPI](https://img.shields.io/pypi/v/mlx-optimizers)](https://pypi.org/project/mlx-optimizers/)\n\nA library to experiment with new optimization algorithms in [MLX](https://github.com/ml-explore/mlx). \n\n- **Diverse Exploration**: includes proven and experimental optimizers like DiffGrad, QHAdam, and Muon ([docs](https://stockeh.github.io/mlx-optimizers/build/html/optimizers.html)).\n- **Easy Integration**: fully compatible with MLX for straightforward experimentation and downstream adoption.\n- **Benchmark Examples**: enables quick testing on classic optimization and machine learning tasks.\n\nThe design of mlx-optmizers is largely inspired by [pytorch-optmizer](https://github.com/jettify/pytorch-optimizer/tree/master).\n\n## Install\n\nThe reccomended way to install mlx-optimizers is to install the latest stable release through [PyPi](https://pypi.org/project/mlx-optimizers/):\n\n```bash\npip install mlx-optimizers\n```\n\nTo install mlx-optimizers from source, first clone [the repository](https://github.com/stockeh/mlx-optimizers.git):\n\n```bash\ngit clone https://github.com/stockeh/mlx-optimizers.git\ncd mlx-optimizers\n```\nThen run\n\n```bash\npip install -e .\n```\n\n## Usage\n\nThere are a variety of optimizers to choose from (see [docs](https://stockeh.github.io/mlx-optimizers/build/html/optimizers.html)). Each of these inherit the [`mx.optimizers`](https://ml-explore.github.io/mlx/build/html/python/optimizers.html) class from MLX, so the core functionality remains the same. We can simply use the optimizer as follows:\n\n```python\nimport mlx_optimizers as optim\n\n#... model, grads, etc.\noptimizer = optim.DiffGrad(learning_rate=0.001)\noptimizer.update(model, grads)\n```\n\n## Examples\n\nThe [examples](examples) folder offers a non-exhaustive set of demonstrative use cases for mlx-optimizers. This includes classic optimization benchmarks on the Rosenbrock function and training a simple neural net classifier on MNIST.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/2ff6430a-dfad-4879-ae39-ec76e2645f21#gh-dark-mode-only\" alt=\"logo\" width=\"45%\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/505a5985-b56c-4eb5-a971-4fc345fb37ad#gh-dark-mode-only\" alt=\"mnist\" width=\"45%\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/111f79f2-257e-4a27-8667-3831d233c3b8#gh-light-mode-only\" alt=\"logo\" width=\"45%\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/89616bbc-e9ca-4806-882a-873b5bd8c681#gh-light-mode-only\" alt=\"mnist\" width=\"45%\"\u003e\n\u003c/p\u003e\n\n## Contributing\n\nInterested in adding a new optimizer? Start with verifying it is not already implemented or in development, then open a new [feature request](https://github.com/stockeh/mlx-optimizers/issues/new?assignees=\u0026labels=\u0026projects=\u0026template=feature_request.md\u0026title=)! If you spot a bug, please open a [bug report](https://github.com/stockeh/mlx-optimizers/issues/new?assignees=\u0026labels=\u0026projects=\u0026template=bug_report.md\u0026title=). \n\nDeveloper? See our [contributing](.github/CONTRIBUTING.md) guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstockeh%2Fmlx-optimizers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstockeh%2Fmlx-optimizers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstockeh%2Fmlx-optimizers/lists"}