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.10-cp312-cp312-macosx_14_0_arm64.whl (16.9 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

mlx-0.0.10-cp312-cp312-macosx_13_0_arm64.whl (14.8 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

mlx-0.0.10-cp311-cp311-macosx_14_0_arm64.whl (16.9 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

mlx-0.0.10-cp311-cp311-macosx_13_0_arm64.whl (14.8 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

mlx-0.0.10-cp310-cp310-macosx_14_0_arm64.whl (16.9 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

mlx-0.0.10-cp310-cp310-macosx_13_0_arm64.whl (14.8 MB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

mlx-0.0.10-cp39-cp39-macosx_14_0_arm64.whl (16.9 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

mlx-0.0.10-cp39-cp39-macosx_13_0_arm64.whl (14.8 MB view details)

Uploaded CPython 3.9macOS 13.0+ ARM64

mlx-0.0.10-cp38-cp38-macosx_14_0_arm64.whl (16.9 MB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

mlx-0.0.10-cp38-cp38-macosx_13_0_arm64.whl (14.8 MB view details)

Uploaded CPython 3.8macOS 13.0+ ARM64

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5ad4b44084a85e18abbe6a056fc21f513d4714424ded1ac3e253412835cca8c0
MD5 cdd6cdacda1941a3255330b6a957f828
BLAKE2b-256 818ee0f10f348873d27b1572d83605f70de64f543f6e35bac4a611281bbbf1a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 d84e7f11e10befd28445a35b1f16fc2a8e191a0b3e23bb33b5e1db16ae7d4d9e
MD5 fd75b4e75480e19a2cdcea315844341b
BLAKE2b-256 110dc1da4dc322f7925b282f40b0ea9dfba5a65f32544cf9ad055706b8907b7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d16b0bd6aa23563c4473aa44ed200fb64fc34387ec87881b35cf5e23723479a4
MD5 4f4db7ddad78724b2e0d54927719830e
BLAKE2b-256 d603a774d6ed8d50e80fe016782bdc137f90999501b4d13cbc8c408e875a4bba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 05a813aabecbc5d65c0d6b1fb5a1004c57690aae5ebab0cdcfccbe216eec6062
MD5 dea79dc658919e522c8837a2a21b3602
BLAKE2b-256 9d0220e42ac29da0ede8c0497b48cf946d428a0c716d235c314521aaa494ed60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f46a56a6f4ce377460290b38e26814bfd5ee780e016354d8c13e7d9c34a1cba5
MD5 55ed154d303378a9227fdcae579e2ea2
BLAKE2b-256 0c4ffc227c7574028e3701cf587d25b44d98c34c16f5e6248da46c41c198710a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlx-0.0.10-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 3a764227ae9b0bb1237fa3077c38cab9e5f29811c3e86d4ff8fd66eb5adb9892
MD5 93da4e639f0b72d5afdb9b0a89c03753
BLAKE2b-256 1fe6b73719a55d6f34b1d0d13c5066c444cb660aed3065d26752b479acc5c406

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.10-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 16.9 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.10-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e62724e59e544c3bbaee7d93fe990e7ee113707205a059bfb1287992d78a10ed
MD5 8c18fd05528aae9efeef0a19b165b935
BLAKE2b-256 671382bd8965831f4793091b6e127354a9560ae4e21dc45998c6a782fe70ab00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.10-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 14.8 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.10-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 93b554a4bc967eb8c4fb44419acd32734fe0d4787bccda1fdf6481eb4a4706d1
MD5 a3e28ca9200f771046a726945a370f92
BLAKE2b-256 90400fc84a8b64e1d5cf850d6b6057eb860f04a24986c5bf4f939579205766d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.10-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 16.9 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.10-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 80ea8a728b3d08bf760c83dfa7a7e8cbeadb9105ace24823a5f396a85e0d384b
MD5 1f2a4302f8e58eecb5a1b18689760df5
BLAKE2b-256 9871633056dd4751814df7a558871df21f6c6307e7734f2871c7f45ee456d0eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.10-cp38-cp38-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 14.8 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.10-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 c17e5f14cdcdc2f08532e0d56ffe5a6b5673ec34410e39f3f0d6338d30f3d916
MD5 77e903458e13e9c0cade48b01e3183fb
BLAKE2b-256 e4d1131d2c5b1bd02c92b30b387f0adc8bf3ebd2a5274b52b4641ba6282a86bf

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