Sponsored By

Apple Launches Open-Source Tools for AI Developers Using Macs

MLX allows for Stable Diffusion and OpenAI’s Whisper to run on Apple hardware

Ben Wodecki

December 7, 2023

2 Min Read
A trio of Apple MacBook Airs. Apple unveiled new open source AI tools allowing developers to run and train machine learning models on Apple devices
Use Apple MLX to run Stable Diffusion or LLaMA on Apple devicesJustin Sullivan/Getty Images

At a Glance

  • Apple is offering developers new tools for training and running large language models on its hardware.

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.

Related:How Apple Can Catch Up in the Generative AI Race

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.

View post on Twitter

Other examples Apple showed off MLX include generating images with Stable Diffusion, speech recognition with OpenAI’s Whisper and parameter-efficient fine-tuning with LoRA.

Like most companies, Apple has been stepping up its AI work. Reports emerged in the summer that it’s working on its own web application-based chatbot service called ‘Apple GPT.’

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.

Related:Ex-Apple Team Unveils New AI Communication Device

Read more about:

ChatGPT / Generative AI

About the Author(s)

Ben Wodecki

Jr. Editor

Ben Wodecki is the Jr. Editor of AI Business, covering a wide range of AI content. Ben joined the team in March 2021 as assistant editor and was promoted to Jr. Editor. He has written for The New Statesman, Intellectual Property Magazine, and The Telegraph India, among others. He holds an MSc in Digital Journalism from Middlesex University.

Keep up with the ever-evolving AI landscape
Unlock exclusive AI content by subscribing to our newsletter!!

You May Also Like