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 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 a fully featured C++ API, which closely mirrors 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:

pip install 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.0.9-cp312-cp312-macosx_14_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

mlx-0.0.9-cp312-cp312-macosx_13_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

mlx-0.0.9-cp311-cp311-macosx_14_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

mlx-0.0.9-cp311-cp311-macosx_13_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

mlx-0.0.9-cp310-cp310-macosx_14_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

mlx-0.0.9-cp310-cp310-macosx_13_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

mlx-0.0.9-cp39-cp39-macosx_14_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

mlx-0.0.9-cp39-cp39-macosx_13_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 13.0+ ARM64

mlx-0.0.9-cp38-cp38-macosx_14_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

mlx-0.0.9-cp38-cp38-macosx_13_0_arm64.whl (9.6 MB view details)

Uploaded CPython 3.8macOS 13.0+ ARM64

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp312-cp312-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: CPython 3.12, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for mlx-0.0.9-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7f4a904eb53de2fd66adc24fd799c9d415195acbe022f63e4e109ab254ceb4af
MD5 44f6c56ee207b468cdf54733f3e7198c
BLAKE2b-256 197c21a6a60ae28ed3f409069c56eed3dfab88ce9294ead5a2cc4bfa6099cd96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp312-cp312-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.12, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for mlx-0.0.9-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 ca4f0713fbbbdd3b3f7dbdce026ed61a127560d70cd035c4299e2d749592f78f
MD5 68b76e4d00a9fe86ab1bb1c4f87c6901
BLAKE2b-256 ed09f3ecc59cc8be64e609002b6aa29640bec01aca39d2eb2636bd0d9e88fae4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp311-cp311-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: CPython 3.11, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for mlx-0.0.9-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 837a4495b7e787b3dcc0c07ac970ec789421f5801aa90d68f177ecfaf7d31082
MD5 13e0a63f534107269fef58831ac0694f
BLAKE2b-256 2f364208524153211adddc3d7bc14532e6a306e726b32940e24acf589c5598c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp311-cp311-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.11, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for mlx-0.0.9-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 91e8ae1078feb68bf5d8072c07c6152965d7897134d449bfe45d7725748a957b
MD5 01828206852adf31a0de5038355b468e
BLAKE2b-256 b17fbc495c00abd8f63ced8e630719dcf7b4418182c0ac2c77d63b830dd2daad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp310-cp310-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: CPython 3.10, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for mlx-0.0.9-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6d7a18ef9dcb08fabdecf985c92c227c0f655ecc4bfff915595439d39d962a3c
MD5 98b3b5f3b7a33bc5b22d8d4dbd3ae0a7
BLAKE2b-256 f07f7d6a22f17783b4997eca750365fb9b56b0649fd7208e2fc171ccd134abe7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp310-cp310-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.10, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for mlx-0.0.9-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 73b7b71eb3aa556d0c21a916290a7c1c16d284e47ba0edfe62f961f42174dafe
MD5 e8f7aa47c9db8152bebcae415198dd64
BLAKE2b-256 c529b03ab91e484ceb342703faa632ee20faa273c3a96b959a118ba58aef79a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: CPython 3.9, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mlx-0.0.9-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0443e8af29fe39a1a9c3144a1661d6605ee2df00dc3d52d30b857baa257f0235
MD5 a901f0407b0395fba0dd1d38eea6f10c
BLAKE2b-256 623d3aeaf30a3bdc1877949f97ca4301c50c87bbf97a65e272e6fc63bd22f750

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.9, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mlx-0.0.9-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 5710010c8615934d209bd942a45b3bb268a43a33951f00ea182ec4713c34c750
MD5 b8a6109a116dd27ef2dcaa53983c885e
BLAKE2b-256 238203c1bc96a2f3464bedf3328430b63a00f452782fbe28e9155d73df6cf5a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: CPython 3.8, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for mlx-0.0.9-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0b168c730bdb95f507f4e57cd776cf91dfc26a84e98605f9b3e69d0f0c08dd03
MD5 5d1cfbd79bf114e3ae5aa5ecea57fc48
BLAKE2b-256 58eb8111607c45f4a982d512d3f8e4353573e765267f938f9adccf5e2f3166c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.9-cp38-cp38-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.8, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for mlx-0.0.9-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 e9d7abd409fae1fc9434d25904488dd515a6010690619884d57a8b07b9911d46
MD5 dda3b02b3a9cf892f5652fca74d0f38f
BLAKE2b-256 d7615fba5f62509bd7462b4ced26f50e584284f4abb6aa503c0e81e8c0d89099

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