Apple Releases Open Source MLX Framework for Efficient Machine Learning on Apple Silicon

Apple says MLX outperforms PyTorch in some scenarios while generating batches of images using Stable Diffusion on a Mac powered by an M2 Ultra chip.

Advertisement
Written by David Delima, Edited by Siddharth Suvarna | Updated: 8 December 2023 17:24 IST
Highlights
  • Apple's MLX framework is designed to run on Apple Silicon hardware
  • MLX boasts a unified memory model not supported by other frameworks
  • The new MLX framework is open source and can be accessed via GitHub

MLX could help developers optimise the performance of ML models on Apple's computers

Photo Credit: Apple

Apple recently released MLX — or ML Explore — the company's machine learning (ML) framework for Apple Silicon computers. The company's latest framework is specifically designed to simplify the process of training and running ML models on computers that are powered by Apple's M1, M2, and M3 series chips. The company says that MLX features a unified memory model. Apple has also demonstrated the use of the framework, which is open source, allowing machine learning enthusiasts to run the framework on their laptop or computer.

According to details shared by Apple on code hosting platform GitHub, the MLX framework has a C++ API along with a Python API that is closely based on NumPy, the Python library for scientific computing. Users can also take advantage of higher-level packages that enable them to build and run more complex models on their computer, according to Apple.

Advertisement

MLX simplifies the process of training and running ML models on a computer — developers were previously forced to rely on a translator to convert and optimise their models (using CoreML). This has now been replaced by MLX, which allows users running Apple Silicon computers to train and run their models directly on their own devices.

Apple shared this image of a big red sign with the text MLX, generated by Stable Diffusion in MLX
Photo Credit: GitHub/ Apple

Advertisement

 

Apple says that the MLX's design follows other popular frameworks used today, including ArrayFireJax, NumPy, and PyTorch. The firm has touted its framework's unified memory model — MLX arrays live in shared memory, while operations on them can be performed on any device types (currently, Apple supports the CPU and GPU) without the need to create copies of data.

Advertisement

The company has also shared examples of MLX in action, performing tasks like image generation using Stable Diffusion on Apple Silicon hardware. When generating a batch of images, Apple says that MLX is faster than PyTorch for batch sizes of 6,8,12, and 16 — with up to 40 percent higher throughput than the latter.

The tests were conducted on a Mac powered by an M2 Ultra chip, the company's fastest processor to date — MLX is capable of generating 16 images in 90 seconds, while PyTorch would take around 120 seconds to perform the same task, according to the company.

Advertisement

Other examples of MLX in action include generating text using Meta's open source LLaMA language model, as well as the Mistral large language model. AI and ML researchers can also use OpenAI's open source Whisper tool to run the speech recognition models on their computer using MLX.

The release of Apple's MLX framework could help make ML research and development easier on the company's hardware, eventually allowing developers to bring better tools that could be used for apps and services that offer on-device ML features running efficiently on a user's computer.


Is the Samsung Galaxy Z Flip 5 the best foldable phone you can buy in India right now? We discuss the company's new clamshell-style foldable handset on the latest episode of Orbital, the Gadgets 360 podcast. Orbital is available on Spotify, Gaana, JioSaavn, Google Podcasts, Apple Podcasts, Amazon Music and wherever you get your podcasts.
Affiliate links may be automatically generated - see our ethics statement for details.
 

Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.

Advertisement
Popular Mobile Brands
  1. Oppo Find X9 Ultra With 200-Megapixel Periscope Camera Launched Globally
  2. Poco M8s 5G Debuts Globally With 7,000mAh Battery: See Price, Features
  3. These Vivo Smartphones Will Cost More in India Due to the Latest Price Hike
  4. Oppo Find X9s Pro Launched With 200-Megapixel Cameras: See Price, Features
  5. Oppo Pad 5 Pro With 13,380mAh Battery Debuts Alongside Pad Mini: See Prices
  6. Motorola Edge 70 Fusion Review
  7. Samsung Galaxy S27 Ultra Might Arrive With This Battery Upgrade
  8. Oppo Find X9 Ultra Battery, Chipset Details Revealed Ahead of Global Launch
  9. Vivo Y600 Pro Could Launch Soon With This MediaTek Dimensity Chip
  10. Redmi K90 Max Debuts With Active Cooling Fan, 8,550mAh Battery: See Price
  1. Vivo Y6t Launched With 6,500mAh Battery, Snapdragon 4 Gen 2 SoC: Price, Specifications
  2. OCBC Partners Lion Global Investors and DigiFT to Launch Tokenised Gold Fund With GOLDX Token
  3. Oppo Pad 5 Pro Launched With 13,380mAh Battery, Snapdragon 8 Elite Gen 5 SoC Alongside Oppo Pad Mini: Price, Features
  4. Redmi K90 Max Launched With Dimensity 9500 SoC, 8,550mAh Battery and Active Cooling Fan: Price, Specifications
  5. Oppo Find X9 Ultra Launched With Snapdragon 8 Elite Gen 5 SoC, 200-Megapixel Periscope Camera: Price, Specifications
  6. Oppo Find X9s Pro Launched With 200-Megapixel Cameras, 7,025mAh Battery: Price, Specifications
  7. OnePlus Ace 6 Ultra Geekbench Listing Reveals MediaTek Dimensity 9500 Chip, 16GB RAM
  8. Motorola Edge 70 Pro+ Leaked Renders Hint at Design, Five Colour Options
  9. Deezer Claims 75,000 AI-Generated Songs Are Being Uploaded to the Platform Daily
  10. Heartbeat Season 2 OTT Release Date: Know When and Where to Stream This Medical Drama Online
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2026. All rights reserved.