mlx README

The project's README from github.com/ml-explore/mlx. As one markdown file: 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:

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:

pip install mlx

To install the CUDA backend on Linux, run:

pip install mlx[cuda]

To install a CPU-only Linux package, run:

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

mlx (ml-explore/mlx)

Searching Database…

28.8K ·GitHub
What is this?MLX is an array framework for machine learning on Apple silicon, built by Apple's machine learning research team.
Is it a Python library or a full framework?Both levels: a Python API that closely follows NumPy, plus C++, C and Swift APIs mirroring it, and higher-level packages mlx.nn and mlx.optimizers modeled on PyTorch.
Will it run on my machine, or is it Mac-only?It targets Apple silicon Macs first, but Linux is supported through a CUDA backend or a CPU-only package. No Windows support is mentioned.
How is MLX different from NumPy or PyTorch?Its unified memory model: arrays live in shared memory, so operations run on the CPU or GPU without transferring data. Computation is lazy, graphs are built dynamically, and autodiff and vectorization are built in.
What can I actually build with it?The examples repo covers transformer language model training, large-scale text generation with LLaMA plus LoRA finetuning, image generation with Stable Diffusion, and speech recognition with Whisper.
Why did Apple build this instead of just using PyTorch?It was made by ML researchers for researchers: user-friendly yet efficient to train and deploy models, and conceptually simple to extend for quickly testing new ideas. NumPy, PyTorch, Jax and ArrayFire inspired the design.
Creator
ml-explore
Size
69.4 MB
Stars
28.8K
Age
2y
Commits · 90 Days