Apple provides developers with the MLX framework for machine learning.

2023-12-11

Despite not being actively involved in the generative AI race, Apple has released an open-source array framework on GitHub, aiming to build machine learning transformer models and text generation AI on its own silicon.

What is Apple's MLX framework?

MLX is a set of tools prepared for developers who are building AI models, including transformer language model training, large-scale text generation, text fine-tuning, image generation, and speech recognition on Apple's silicon. Apple machine learning research scientist Awni Hannun announced the MLX machine learning framework on the X platform on December 5th.

MLX uses Meta's LlaMA for text generation and low-level application of text generation. MLX's image generation is based on Stability AI's Stable Diffusion, while MLX's speech recognition is connected to OpenAI's Whisper.

MLX aims to be familiar to deep learning researchers

The inspiration for MLX comes from NumPy, PyTorch, Jax, and ArrayFire, but unlike its inspirations, it aims to keep arrays in shared memory, according to the MLX page on GitHub. Currently supported devices are CPU and GPU, and MLX can run on devices without creating data copies.

According to the Apple team on GitHub, MLX's Python AI should be familiar to developers who already know how to use NumPy; developers can use MLX through a C++ API that mirrors the Python API. Other APIs similar to those used in PyTorch are designed to simplify the construction of complex machine learning models. Composable function transformations are built-in, which means automatic differentiation, vectorization, and computation graph optimization. Computation in MLX is lazy, not eager, which means arrays are only materialized when needed. Apple claims that computation graphs and debugging are "simple and intuitive."

"This framework aims to be user-friendly, but training and deploying models remain efficient," Apple developers wrote on GitHub. "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."

NVIDIA AI research scientist Jim Fan wrote on LinkedIn on December 6th, "This release does a great job in designing an API familiar to the deep learning audience and showcasing the most minimalistic examples of what matters most: Llama, LoRA, Stable Diffusion, and Whisper."

Apple's position in the competitive AI field

Apple, which had the AI assistant Siri long before the generative AI boom, seems to be focused on creating tools for large language models rather than producing the models themselves and the chatbots that can be built with them. However, Bloomberg's Mark Gurman reported on October 22, 2023, "...Apple executives were caught off guard by the sudden AI boom in the industry and have been working around the clock to catch up since the end of last year," and Apple is preparing to launch generative AI features for iOS and Siri. In terms of extensive generative AI capabilities, Google still lags behind its competitor OpenAI, which recently released its powerful Gemini large language model on the Pixel 8 Pro and in the Bard conversational AI.

RECENT AI NEWS

RECENT AI TOOLS