


Apple builds an open source framework MLX for its own chips, implements Llama 7B and runs it on M2 Ultra
In November 2020, Apple launched the M1 chip, which was astonishingly fast and powerful. Apple will launch M2 in 2022, and in October this year, the M3 chip will officially debut.
When Apple releases its chips, it attaches great importance to its AI model training and deployment capabilities
The ML Compute launched by Apple can be used on Mac The TensorFlow model is trained on. PyTorch supports GPU-accelerated PyTorch machine learning model training on the M1 version of Mac, using Apple Metal Performance Shaders (MPS) as the backend. These enable Mac users to train neural networks locally.
Apple announced the launch of an open source array framework specifically for machine learning, which will run on Apple chips and is called MLX
MLX is a framework specifically designed for machine learning researchers to efficiently train and deploy AI models. The design concept of this framework is simple and easy to understand. Researchers can easily extend and improve MLX to quickly explore and test new ideas. The design of MLX is inspired by frameworks such as NumPy, PyTorch, Jax and ArrayFire
Project address: https://github .com/ml-explore/mlx
One of the MLX project contributors and Apple Machine Learning Research Team (MLR) research scientist Awni Hannun demonstrated a section using the MLX framework to implement Llama 7B and Video running on M2 Ultra.
MLX quickly attracted the attention of machine learning researchers. Chen Tianqi, author of TVM, MXNET and XGBoost, assistant professor at CMU and CTO of OctoML, retweeted: "Apple chips have a new deep learning framework."
Some people think that Apple has "repeated the same mistakes" again. This is an evaluation of MLX
In order to keep the original meaning unchanged, the content needs to be rewritten into Chinese. The original sentence does not need to appear
MLX features and examples
In this project, we can observe that MLX has the following main features
Familiar API. MLX has a Python API that is very NumPy-like, as well as a full-featured C API that is very similar to the Python API. MLX also has more advanced packages (such as mlx.nn and mlx.optimizers) whose APIs are very similar to PyTorch and can simplify building more complex models.
Combinable function transformation. MLX features composable function transformations with automatic differentiation, automatic vectorization, and computational graph optimization.
Lazy calculation. Computation in MLX is lazy and arrays are instantiated only when needed.
Dynamic graph construction. The calculation graph construction in MLX is dynamic, changing the shape of function parameters will not cause compilation to slow down, and debugging is simple and easy to use.
Multiple devices. Operations can be run on any supported device such as CPU and GPU.
Unified Memory. The significant difference between MLX and other frameworks is unified memory, array shared memory. Operations on MLX can run on any supported device type without moving data.
In addition, the project provides a variety of examples of using the MLX framework, such as the MNIST example, which can well help you learn how to use MLX
Image source: https://github.com/ml-explore/mlx-examples/tree/main/mnist
In addition to the above examples , MLX also provides other more practical examples, such as:
- Transformer language model training;
- LLaMA large-scale text generation and LoRA fine-tuning;
- Stable Diffusion generation Image;
- OpenAI’s Whisper speech recognition.
For more detailed documentation, please refer to: https://ml-explore.github.io/mlx/build/html/install.html
#The above is the detailed content of Apple builds an open source framework MLX for its own chips, implements Llama 7B and runs it on M2 Ultra. For more information, please follow other related articles on the PHP Chinese website!

Harness the Power of On-Device AI: Building a Personal Chatbot CLI In the recent past, the concept of a personal AI assistant seemed like science fiction. Imagine Alex, a tech enthusiast, dreaming of a smart, local AI companion—one that doesn't rely

Their inaugural launch of AI4MH took place on April 15, 2025, and luminary Dr. Tom Insel, M.D., famed psychiatrist and neuroscientist, served as the kick-off speaker. Dr. Insel is renowned for his outstanding work in mental health research and techno

"We want to ensure that the WNBA remains a space where everyone, players, fans and corporate partners, feel safe, valued and empowered," Engelbert stated, addressing what has become one of women's sports' most damaging challenges. The anno

Introduction Python excels as a programming language, particularly in data science and generative AI. Efficient data manipulation (storage, management, and access) is crucial when dealing with large datasets. We've previously covered numbers and st

Before diving in, an important caveat: AI performance is non-deterministic and highly use-case specific. In simpler terms, Your Mileage May Vary. Don't take this (or any other) article as the final word—instead, test these models on your own scenario

Building a Standout AI/ML Portfolio: A Guide for Beginners and Professionals Creating a compelling portfolio is crucial for securing roles in artificial intelligence (AI) and machine learning (ML). This guide provides advice for building a portfolio

The result? Burnout, inefficiency, and a widening gap between detection and action. None of this should come as a shock to anyone who works in cybersecurity. The promise of agentic AI has emerged as a potential turning point, though. This new class

Immediate Impact versus Long-Term Partnership? Two weeks ago OpenAI stepped forward with a powerful short-term offer, granting U.S. and Canadian college students free access to ChatGPT Plus through the end of May 2025. This tool includes GPT‑4o, an a


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor