mlx

MLX: An array framework for Apple silicon

https://github.com/ml-explore/mlx

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 155 committers (2.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

mlx

Keywords from Contributors

distributed deep-neural-networks transformers jax cryptography cryptocurrencies tensor agents automatic-differentiation web-crawler
Last synced: 6 months ago · JSON representation ·

Repository

MLX: An array framework for Apple silicon

Basic Info
Statistics
  • Stars: 22,114
  • Watchers: 179
  • Forks: 1,323
  • Open Issues: 156
  • Releases: 60
Topics
mlx
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

MLX

Quickstart | Installation | Documentation | Examples

CircleCI

MLX is an array framework for machine learning on Apple silicon, brought to you by Apple machine learning research.

Some key features of MLX include:

  • Familiar APIs: MLX has a Python API that closely follows NumPy. MLX also has fully featured C++, C, and Swift APIs, which closely mirror the Python API. MLX has higher-level packages like mlx.nn and mlx.optimizers with APIs that closely follow PyTorch to simplify building more complex models.

  • Composable function transformations: MLX supports composable function transformations for automatic differentiation, automatic vectorization, and computation graph optimization.

  • Lazy computation: Computations in MLX are lazy. Arrays are only materialized when needed.

  • Dynamic graph construction: Computation graphs in MLX are constructed dynamically. Changing the shapes of function arguments does not trigger slow compilations, and debugging is simple and intuitive.

  • Multi-device: Operations can run on any of the supported devices (currently the CPU and the GPU).

  • Unified memory: A notable difference from MLX and other frameworks is the unified memory model. Arrays in MLX live in shared memory. Operations on MLX arrays can be performed on any of the supported device types without transferring data.

MLX is designed by machine learning researchers for machine learning researchers. The framework is intended to be user-friendly, but still efficient to train and deploy models. The design of the framework itself is also conceptually simple. We intend to make it easy for researchers to extend and improve MLX with the goal of quickly exploring new ideas.

The design of MLX is inspired by frameworks like NumPy, PyTorch, Jax, and ArrayFire.

Examples

The MLX examples repo has a variety of examples, including:

Quickstart

See the quick start guide in the documentation.

Installation

MLX is available on PyPI. To install MLX on macOS, run:

bash pip install mlx

To install the CUDA backend on Linux, run:

bash pip install mlx[cuda]

To install a CPU-only Linux package, run:

bash pip install mlx[cpu]

Checkout the documentation for more information on building the C++ and Python APIs from source.

Contributing

Check out the contribution guidelines for more information on contributing to MLX. See the docs for more information on building from source, and running tests.

We are grateful for all of our contributors. If you contribute to MLX and wish to be acknowledged, please add your name to the list in your pull request.

Citing MLX

The MLX software suite was initially developed with equal contribution by Awni Hannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. If you find MLX useful in your research and wish to cite it, please use the following BibTex entry:

@software{mlx2023, author = {Awni Hannun and Jagrit Digani and Angelos Katharopoulos and Ronan Collobert}, title = {{MLX}: Efficient and flexible machine learning on Apple silicon}, url = {https://github.com/ml-explore}, version = {0.0}, year = {2023}, }

Owner

  • Name: ml-explore
  • Login: ml-explore
  • Kind: organization

Machine learning research on your laptop or in a data center

Citation (CITATION.cff)

cff-version: 1.2.0
title: mlx
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Awni
    family-names: Hannun
    affiliation: Apple
  - given-names: Jagrit
    family-names: Digani
    affiliation: Apple
  - given-names: Angelos
    family-names: Katharopoulos
    affiliation: Apple
  - given-names: Ronan
    family-names: Collobert
    affiliation: Apple
repository-code: 'https://github.com/ml-explore'
abstract: >-
  MLX: efficient and flexible machine learning on Apple
  silicon
license: MIT

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,160
  • Total Committers: 155
  • Avg Commits per committer: 7.484
  • Development Distribution Score (DDS): 0.57
Past Year
  • Commits: 605
  • Committers: 71
  • Avg Commits per committer: 8.521
  • Development Distribution Score (DDS): 0.498
Top Committers
Name Email Commits
Awni Hannun a****i@a****m 499
Angelos Katharopoulos a****s@a****m 158
Cheng g****t@z****m 73
Jagrit Digani d****i@a****m 49
Alex Barron b****x 45
Diogo d****3@g****m 18
Chunyang Wen c****n@g****m 18
Nripesh Niketan 8****N 17
Jesper Stemann Andersen j****r@s****k 13
Daniel Strobusch 1****u 9
David Koski 4****i 8
nicolov n****v 7
Abe Leininger 9****n 7
AtomicVar g****1@f****m 6
__mo_san__ 5****n 6
Luca Arnaboldi l****a@a****u 5
Hazem Essam h****m 4
Gabrijel Boduljak g****k 4
toji m****d@g****m 4
Jacket 4****0 4
Yi Wang y****5@g****m 4
Vijay Krish v****h@a****m 4
Juarez Bochi j****i@g****m 4
Ikko Eltociear Ashimine e****r@g****m 4
Avikant Srivastava a****t@g****m 4
Rifur13 g****y@g****m 4
Piotr Rybiec p****8@g****m 3
Ronan Collobert c****t@a****m 3
Mike Drob m****b@a****m 3
AmirHossein_Razlighi 7****i 3
and 125 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 721
  • Total pull requests: 2,064
  • Average time to close issues: 17 days
  • Average time to close pull requests: 4 days
  • Total issue authors: 332
  • Total pull request authors: 199
  • Average comments per issue: 2.42
  • Average comments per pull request: 1.16
  • Merged pull requests: 1,626
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 317
  • Pull requests: 1,341
  • Average time to close issues: 6 days
  • Average time to close pull requests: 3 days
  • Issue authors: 154
  • Pull request authors: 94
  • Average comments per issue: 1.56
  • Average comments per pull request: 0.85
  • Merged pull requests: 1,069
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • awni (53)
  • Redmept1on (39)
  • zcbenz (24)
  • sck-at-ucy (18)
  • thegodone (16)
  • davidkoski (14)
  • abdussamettrkr (13)
  • acsweet (11)
  • Redempt1onzzZZ (11)
  • sachinraja13 (11)
  • mzbac (8)
  • a1eaiactaest (8)
  • kyrollosyanny (8)
  • ifsheldon (6)
  • dc-dc-dc (6)
Pull Request Authors
  • awni (865)
  • zcbenz (276)
  • angeloskath (247)
  • barronalex (73)
  • jagrit06 (62)
  • NripeshN (29)
  • stemann (27)
  • chunyang-wen (25)
  • dc-dc-dc (18)
  • nicolov (11)
  • ParamThakkar123 (11)
  • mlaves (8)
  • wangkuiyi (8)
  • AtomicVar (8)
  • abeleinin (8)
Top Labels
Issue Labels
enhancement (80) bug (76) good first issue (23) performance (8) wontfix (7) documentation (7) question (5) help wanted (2) bug-unconfirmed (1) low priority (1)
Pull Request Labels
bug (2) enhancement (1)

Packages

  • Total packages: 13
  • Total downloads:
    • pypi 606,820 last-month
    • homebrew 405 last-month
  • Total dependent packages: 27
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 276
  • Total maintainers: 3
pypi.org: mlx

A framework for machine learning on Apple silicon.

  • Versions: 107
  • Dependent Packages: 27
  • Dependent Repositories: 2
  • Downloads: 341,194 Last month
Rankings
Downloads: 3.0%
Dependent packages count: 4.8%
Average: 6.4%
Dependent repos count: 11.5%
Maintainers (3)
Last synced: 6 months ago
proxy.golang.org: github.com/ml-explore/mlx
  • Versions: 69
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 7.0%
Last synced: 6 months ago
pypi.org: mlx-awni-cpu-2

A framework for machine learning on Apple silicon.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 7 Last month
Rankings
Stargazers count: 0.4%
Forks count: 1.6%
Dependent packages count: 8.8%
Average: 15.2%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 6 months ago
pypi.org: mlx-metal-awni-test

A framework for machine learning on Apple silicon.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 19 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.3%
Dependent repos count: 49.8%
Maintainers (1)
Last synced: 6 months ago
pypi.org: mlx-metal

A framework for machine learning on Apple silicon.

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 261,457 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.3%
Dependent repos count: 49.8%
Maintainers (2)
Last synced: 6 months ago
pypi.org: mlx-cuda-awni-test

A framework for machine learning on Apple silicon.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 17 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.3%
Dependent repos count: 49.8%
Maintainers (1)
Last synced: 6 months ago
pypi.org: mlx-cpu

A framework for machine learning on Apple silicon.

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,858 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.3%
Dependent repos count: 49.8%
Maintainers (2)
Last synced: 6 months ago
pypi.org: mlx-awni-cpu

A framework for machine learning on Apple silicon.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 15 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.4%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 6 months ago
pypi.org: mlx-cpu-awni-test

A framework for machine learning on Apple silicon.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 14 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.4%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 6 months ago
pypi.org: mlx-awni-test-2

A framework for machine learning on Apple silicon.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 8.8%
Average: 29.4%
Dependent repos count: 49.9%
Maintainers (1)
Last synced: 8 months ago
pypi.org: mlx-cuda

A framework for machine learning on Apple silicon.

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,194 Last month
Rankings
Dependent packages count: 9.0%
Average: 29.8%
Dependent repos count: 50.6%
Maintainers (2)
Last synced: 6 months ago
pypi.org: mlx-awni-test

A framework for machine learning on Apple silicon.

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 45 Last month
Rankings
Dependent packages count: 9.7%
Average: 37.0%
Dependent repos count: 64.3%
Maintainers (1)
Last synced: 6 months ago
formulae.brew.sh: mlx

Array framework for Apple silicon

  • Versions: 40
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 405 Last month
Rankings
Dependent packages count: 19.2%
Average: 51.3%
Dependent repos count: 56.7%
Downloads: 78.0%
Last synced: 6 months ago

Dependencies

examples/extensions/setup.py pypi
pyproject.toml pypi
setup.py pypi
.github/workflows/pull_request.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
examples/extensions/pyproject.toml pypi