Skip to main content

A framework for machine learning on Apple silicon.

Project description

MLX

Quickstart | Installation | Documentation | Examples

CircleCI

MLX is an array framework for machine learning research 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 the Python API, run:

With pip:

pip install mlx

With conda:

conda install -c conda-forge mlx

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},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mlx-0.9.1-cp312-cp312-macosx_14_0_arm64.whl (32.0 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

mlx-0.9.1-cp312-cp312-macosx_13_0_arm64.whl (32.2 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

mlx-0.9.1-cp311-cp311-macosx_14_0_arm64.whl (32.0 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

mlx-0.9.1-cp311-cp311-macosx_13_0_arm64.whl (32.2 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

mlx-0.9.1-cp310-cp310-macosx_14_0_arm64.whl (32.0 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

mlx-0.9.1-cp310-cp310-macosx_13_0_arm64.whl (32.2 MB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

mlx-0.9.1-cp39-cp39-macosx_14_0_arm64.whl (32.0 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

mlx-0.9.1-cp39-cp39-macosx_13_0_arm64.whl (32.2 MB view details)

Uploaded CPython 3.9macOS 13.0+ ARM64

mlx-0.9.1-cp38-cp38-macosx_14_0_arm64.whl (32.0 MB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

mlx-0.9.1-cp38-cp38-macosx_13_0_arm64.whl (32.2 MB view details)

Uploaded CPython 3.8macOS 13.0+ ARM64

File details

Details for the file mlx-0.9.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp312-cp312-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 32.0 MB
  • Tags: CPython 3.12, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for mlx-0.9.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 985c15e5dd154cce94d1a00f033ecdbc4390b1580c715c2547f2889b8dcebc7c
MD5 13ff422a9e782d7654c164973250d6c7
BLAKE2b-256 5c5ae0c3663950937cd160693f99e653ea7a7b57d02cbe4366f348d606af1d97

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp312-cp312-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: CPython 3.12, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for mlx-0.9.1-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 9760061b52c74ad8c9e75a36e8bc0441e99c6c200fe645565f9c7d044636db2b
MD5 2282e746227c765e6c609e2da9ed2d20
BLAKE2b-256 f4ff9b8e4c8f5310d783b6a0c5ad58b32919f0219bd7dc5f477d3a08bc461603

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp311-cp311-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 32.0 MB
  • Tags: CPython 3.11, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for mlx-0.9.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7be34d8ec817569776a18db1da50fc6ece5c16c10b1ae6a8cb3607bd782fb4bb
MD5 6f715c2c192db797748583db19c91386
BLAKE2b-256 7b3115ec690b161b3d5b802f269c2099f59f2a848a14ff7ec9c10e2206016ffc

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp311-cp311-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: CPython 3.11, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for mlx-0.9.1-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 d542fc01a3c3d0dcbec7169ae052aec63c218405bb1372c2a404709af5600464
MD5 d343943567ac5adc82b1e769a72b1469
BLAKE2b-256 9dd6255d043f6b2b32c81390c09fa88dd290359b22b07cccf3a91cebddb0091b

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp310-cp310-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 32.0 MB
  • Tags: CPython 3.10, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for mlx-0.9.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 dfa5ae57d17928bc3d5dad4ad3b63b5256197d189f6b4997a6652c17f0b24350
MD5 d9ea9ebab582a61b35d9599f398a01fb
BLAKE2b-256 2b49c0d5889911cc556a5f4621bcf0de3a96411ecf351295df14917ff5fc3999

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp310-cp310-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: CPython 3.10, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for mlx-0.9.1-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 84bf8d0e7f08fcca9d5edd1130770f02b82098de6b35fdfca5d8fd4b15617ef5
MD5 ed3263f7f2102545baaf4b690a5839e5
BLAKE2b-256 f136aab4346a7279534fece7310bb50162271e3ea86d0087005ab6209c07fd26

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 32.0 MB
  • Tags: CPython 3.9, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for mlx-0.9.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9654164b3d01a5aab7077bb85ee6216685a6d87cbefeeb1983b1b42cde34bdd2
MD5 916fb4b91264fee4da4e47bd2f90da35
BLAKE2b-256 1a4ddb965d36f516eb50b63bc732589057aa7cb2fc14c6c30f6504688a2b307c

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp39-cp39-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: CPython 3.9, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for mlx-0.9.1-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 c89f4c8703cd4c4aa72ab5c4e6fdd2aba4f48f1b9e5e54f161b506316a6e83bc
MD5 e09036066953ab6e27b4367f2dd6144e
BLAKE2b-256 0d18dc87320f5dac698625bdde12060571a7721679a855ea8a30d0c3472690b5

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 32.0 MB
  • Tags: CPython 3.8, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for mlx-0.9.1-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 920e7b59734d1e0fca82d4941d080fe7c7a31d946c17d9df0f69d62756ff1b28
MD5 5bf815b0c1d635e19d87e827e95ec7dc
BLAKE2b-256 90b81dae6d0744c077d937f1b071e5ce2d128be064a1622e6ec9f130554a186a

See more details on using hashes here.

File details

Details for the file mlx-0.9.1-cp38-cp38-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.9.1-cp38-cp38-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: CPython 3.8, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for mlx-0.9.1-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4b304eb3b4ba193984c068b4d22d3aae405e3560bd1608e8fad185a9685b1f08
MD5 0b475867c86a2e5ad47556863a019242
BLAKE2b-256 214d1702621398bfc5f27f05ba9b0aa6d5c58ecd0c394c7d288276c9f45c83b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page