Skip to content

Apple AI Research Releases MLX: An Efficient Machine Learning Framework Specifically Designed for Apple Silicon Asif Razzaq Artificial Intelligence Category – MarkTechPost

  • by

Over the past few years, there have been significant advancements in Machine Learning (ML), with numerous frameworks and libraries developed to simplify our tasks. Among these innovations, Apple recently launched a new framework, MLX, designed specifically for Apple silicon, that facilitates the training and deployment of machine learning ML models for Apple hardware. This framework is an array framework, similar to NumPy, that allows for efficient and flexible performance on Apple’s processors.

The design of the framework is inspired by existing frameworks like Jax, PyTorch, and ArrayFire, and has a Python API as well as a C++ API. This makes the framework user-friendly, and researchers can easily extend and improve MLX. It also has high-level packages like mlx.optimizers and mlx.nn with APIs, which simplifies complex model building. MLX has composable function transformations that enable automatic differentiation, automatic vectorization, and computation graph optimization. 

The computations in MLX are lazy, which means that arrays are used only when needed. Moreover, computations in the framework are built dynamically, and modifying the function arguments does not lead to slower compilations. MLX supports multiple devices, and operations can be run on CPUs and GPUs. Lastly, unlike other frameworks, arrays in MLX live in shared memory, and operations can be performed on any supported device without moving the data.

The Apple researchers on GitHub said, “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.”

Apple has listed some of the examples of how MLX could be utilized. Its use cases include training a transformer language model, large-scale text generation using LLaMA or Mistral, generating images with Stable Diffusion, parameter-efficient fine-tuning with LoRA, and speech recognition using OpenAI’s Whisper. The image generation capabilities of Stable Diffusion in MLX were tested, and the researchers observed that MLX achieved around 40% better throughput than PyTorch with a batch size of 16. 

Through the release of MLX, the researchers at Apple have tried to democratize machine learning to facilitate more research. Although Apple is a bit late to join the AI war with its competitors like Meta, Google, and OpenAI releasing numerous state-of-the-art models/frameworks, we cannot completely rule them in the rather early stages of the competition. Nevertheless, the framework has the ability to simplify complex model building and potentially bring generative AI to Apple devices.

In conclusion, MLX is an effective framework that equips researchers with a powerful environment to build ML models. Apart from its unique design, what makes this more user-friendly is that it has been inspired by existing frameworks, which ensures a smooth transition for its users. Although Apple has not made significant announcements in the field of AI lately, with MLX, it hopes to make ML model building much simpler and facilitate the exploration of new ideas.

Just in time for the holidays, we are releasing some new software today from Apple machine learning research.

MLX is an efficient machine learning framework specifically designed for Apple silicon (i.e. your laptop!)

Code: https://t.co/Kbis7IrP80
Docs: https://t.co/CUQb80HGut

— Awni Hannun (@awnihannun) December 5, 2023

The post Apple AI Research Releases MLX: An Efficient Machine Learning Framework Specifically Designed for Apple Silicon appeared first on MarkTechPost.

 Over the past few years, there have been significant advancements in Machine Learning (ML), with numerous frameworks and libraries developed to simplify our tasks. Among these innovations, Apple recently launched a new framework, MLX, designed specifically for Apple silicon, that facilitates the training and deployment of machine learning ML models for Apple hardware. This framework
The post Apple AI Research Releases MLX: An Efficient Machine Learning Framework Specifically Designed for Apple Silicon appeared first on MarkTechPost.  Read More AI Shorts, Applications, Artificial Intelligence, Deep Learning, Editors Pick, Machine Learning, Staff, Tech News, Technology, Uncategorized 

Leave a Reply

Your email address will not be published. Required fields are marked *