Apple has thrown its hat into the open-source AI ring by releasing a new range of open-source AI tools.
The MLX framework for machine learning is developed specifically for Apple’s Silicon processor architecture. Available via GitHub, MLX is designed to streamline machine learning model training and deployment on Apple hardware.
Apple said the design of MLX is “inspired” by other popular frameworks, including PyTorch, Jax, and ArrayFire. Where MLX differs, however, is the unified memory model - Arrays in MLX live in shared memory, while operations can be performed on any of the supported device types without performing data copies.
“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 MLX repository reads.
MLX has a Python API that closely follows NumPy – a popular library for Python programming. MLX also contains a C++ API and higher-level packages that follow PyTorch for building more complex models.
Other key features of MLX include:
- Composable function transformations: MLX has composable function transformations for automatic differentiation, automatic vectorization and computation graph optimization.
- Lazy computation: Computations in MLX are lazy, with arrays only materializing when needed.
- Dynamic graph construction: Computation graphs in MLX are built dynamically. If a user changes the shape of a function, arguments don’t trigger slow compilations – making debugging easier and intuitive.
Showcasing MLX’s abilities, Apple machine learning Research Scientist Awni Hannun posted a video on X (Twitter) that showed the seven billion parameter version of Meta’s LLaMA running on an M2 Ultra chip, found in both Mac Studio and Mac Pro, Apple’s high-end computing systems.
Can MLX Be Used in Commercial Software?
Apple’s MLX is available under an MIT license which allows for broad freedom of use, including for commercial purposes.
The conditions of the license require copyright notice and permission notices to be included in all copies of the software.