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.

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

Uploaded CPython 3.12macOS 14.0+ ARM64

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

Uploaded CPython 3.12macOS 13.0+ ARM64

mlx-0.0.5-cp311-cp311-macosx_14_0_arm64.whl (11.5 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

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

Uploaded CPython 3.11macOS 13.0+ ARM64

mlx-0.0.5-cp310-cp310-macosx_14_0_arm64.whl (11.5 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

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

Uploaded CPython 3.10macOS 13.0+ ARM64

mlx-0.0.5-cp39-cp39-macosx_14_0_arm64.whl (11.5 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

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

Uploaded CPython 3.9macOS 13.0+ ARM64

mlx-0.0.5-cp38-cp38-macosx_14_0_arm64.whl (11.5 MB view details)

Uploaded CPython 3.8macOS 14.0+ ARM64

mlx-0.0.5-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.5-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.0.5-cp312-cp312-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.5 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.5-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 1989c10c930ca4294da4525f4d7bb39a54cceceeb3655f65fe69315d0752967a
MD5 18dfabf3808d104c7456417461152da5
BLAKE2b-256 20588489a79b2611aacf8d2f961990e20df79959701952e514dd6071117d8f29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-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.5-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 88f383b0b63e31ace065f3353300f38509bc01c0c5a07fdd4868439be2dd804f
MD5 8500018d58d5bde8fc2b032433285e66
BLAKE2b-256 4f4a348d2399981f0bc07dabda3209bc8adf656a42fe861fdf83b81b3ea2d0c5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mlx-0.0.5-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a17654c64af061ced9165ae116d9068c6e796bc70a4d7c2c41edd90193ca4d4a
MD5 cf24401c76eff4bdcf421764226bfe9a
BLAKE2b-256 f0f2da6d86419ffabd7d0f3ab38c4dd90a09bdbb946a1eb0935c42f63c67ca40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-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.5

File hashes

Hashes for mlx-0.0.5-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 b8b4c75252714a1844901e77a3c257517a220c3543c8f4e7d97c4ef1a87114db
MD5 51381c8178392c68b1b3f17a22f4c56a
BLAKE2b-256 c5d6eace95bf37b2a4c023114e953b6e2572942624f9231213b6cb75a2d19588

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-cp310-cp310-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.5 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.5-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5f651795d9223a41e24df605723f2292b2d00e56e1b24c60be8467cbc2e97e40
MD5 cad79a5729b3f89a3da831d5b5866672
BLAKE2b-256 e1ef91cae1e5d67a3104bdcc81c3f1443d1cf31009abaf277d6831462f7a58b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-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.5-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 45a112c2e989a4a2c54b5943f74a37737af9ae81dd96641a7e8815d248c10beb
MD5 d211282d2427b29a2168f0e77e8a43a3
BLAKE2b-256 dcd5c95f4fb94a03b94b268bd33362d63ae97ad6365da01647ae414d2e6f6058

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.5 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.5-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a17441ba1b5d4b24db9369986f76747dc6621425a1883b81669c589f1b859ab1
MD5 28a51eb5c74f72c2d153981461897e6f
BLAKE2b-256 0f52611f9ec697176c257e932d32ac003986722f188fd66897a1adeb5ba898f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-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.5-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 a114d00a475ebdd714a4f22f34da1b1befd89c905db41b2e4375aad28212a21f
MD5 d89403ec6972d52c625b95f5a8dc24af
BLAKE2b-256 ebc1dcfe5f5827954b1cd4bd3ccf4df63ff2c13d8d4a4dbd77129eee9736098c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-cp38-cp38-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 11.5 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.5-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a11449f4468a29358f0ad37652e5c14b8dddb3712563b9b970258d2a42f8c25b
MD5 6b202c036c4db325d10984e38c04feb4
BLAKE2b-256 4d03846710f3b7ed22b1627fb9115335f55ecfb6918e3eedc8a3f9904b4425b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mlx-0.0.5-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.5-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 bd0094447ac4122272998861707b090cb595f94d58ed224dc60995a668d6cddf
MD5 b1e184e4cd44dbb8bfcf1425396b9643
BLAKE2b-256 69f1570a1b7579daa29cccbfa0febf2358d87231e5d6ecaa40a8e7cc8b0e4529

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