Executable programs and extensions
Last updated
Run local AI with MLX on Apple Silicon: frameworks and model tools explained
Check the chip and checkpoint before running a model with MLX on Apple silicon
MLX1 is a framework for computing AI models on Apple Silicon CPUs and GPUs. To use a language model in conversation, pass a compatible model and a question to a tool such as MLX-LM2. This guide explains how to check your Mac and model format, then choose a tool.
Running a language model requires matching the Mac's chip with the file format in the model repository. This guide covers loading an MLX checkpoint3 with MLX-LM on Apple silicon and starting a short conversation.
Distinguish MLX from the tools around it
MLX-LM is a Python package that uses MLX for language-model inference and fine-tuning. Load a model, enter a question, and it generates an answer. Choose a compatible checkpoint with the required model implementation and configuration.
Metal4 is macOS technology for parallel GPU5 computation and underlies MLX on Mac. PyTorch MPS6 is a backend for using Apple GPUs from PyTorch7, so model packages and execution paths differ. GUI apps such as LM Studio are another option; check supported formats and controls for the specific app version.

Choose an installation path for the Mac chip
MLX's Mac installation and optimization assume Apple silicon. Check About This Mac for an M-series chip. The same commands do not follow the same path on Intel Macs, so compare llama.cpp tools or GUI engines that explicitly support Intel.
Changing .to("cuda8") or an NVIDIA device setting to mlx does not make CUDA code run on Mac. The MLX project also documents a separate Linux CUDA backend, but it does not automatically convert PyTorch CUDA models, extensions, or operations to MLX. Check model implementation, weight format, kernels, and dependencies individually.
A model may load successfully but run out of memory with longer input. MLX-LM memory and speed settings explains how to adjust quantization9 and the KV cache10.

Account for non-model use of unified memory
Apple Silicon CPUs and GPUs share physical memory. MLX arrays use it to reduce copies between CPU11 and GPU. macOS, apps, model weights, intermediate computations, and the growing conversation KV cache all use the installed memory.
A 24 GB Mac cannot devote all 24 GB to weights. Long inputs need working space during processing, and the KV cache grows during generation. Quantization can reduce weight size but does not remove loading workspace, computation memory, or cache. Check headroom with the applications you actually use rather than relying on file size alone.

Check the model card and MLX-LM support
Find an MLX checkpoint on the Hugging Face model card and check the architecture in MLX-LM's support list. Start with a short text generation. For community conversions, also check the conversion date, original model version, tokenizer configuration, and license.
Some models may require custom tokenizer code or permission to run repository code. Review the source and code before enabling that permission; test image input and tool calling separately from basic generation on the current version.
Choose a terminal, GUI, or PyTorch path for the task
MLX-LM is a starting point for directly loading a model from Python or testing it quickly. If you want to select models and manage APIs and conversation history in a visual interface, compare GUI apps that offer an MLX engine. A GUI using MLX does not necessarily expose every MLX-LM option or model.
For an existing PyTorch project, first check whether its model and code run on MPS. The same Mac does not determine a performance ranking: model implementation, operations, library version, input length, and memory state all matter. For comparison, align model family, quantization, and input/output lengths, and record runtime12 differences.
To move a CUDA project to Mac, first look for an MLX checkpoint and example; if none exists, retain the CUDA environment or find another supported runtime. For image or audio models, do not infer support from MLX-LM documentation; check the relevant ecosystem tool.
Terminology notes
MLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.
Back to the textMLX-LM — A package for loading, running, and fine-tuning language models with MLX.
Back to the textCheckpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.
Back to the textMetal — Apple’s low-level technology for graphics and parallel GPU computation.
Back to the textGPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.
Back to the textPyTorch MPS — The PyTorch backend for computation on Apple GPUs. Required operations and models must be supported on MPS.
Back to the textPyTorch — A software framework for building and running AI models. Check the compatible PyTorch version and hardware support along with the model.
Back to the textCUDA — A software platform for general-purpose computing on NVIDIA GPUs.
Back to the textQuantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.
Back to the textKV cache — Memory that stores attention keys and values from earlier tokens for reuse during later token generation. Its size depends on context length and batch size.
Back to the textCPU — The central processor that runs the operating system and general-purpose instructions; in AI workloads it also handles tasks such as preprocessing and data movement.
Back to the textRuntime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.
Back to the text
Frequently asked questions
- What should you check first in this article?
- MLX is a framework for computing AI models on Apple Silicon CPUs and GPUs. To use a language model in conversation, pass a compatible model and a question to a tool such as MLX-LM. This guide explains how to check your Mac and model format, then choose a tool.
- How much memory does it need?
- A model may load successfully but run out of memory with longer input. [MLX-LM memory and speed settings](/guides/mlx-lm-memory-speed-guide) explains how to adjust quantization and the KV cache.
- Where can you check the conditions and sources?
- Find an MLX checkpoint on the Hugging Face model card and check the architecture in MLX-LM's support list. Start with a short text generation. For community conversions, also check the conversion date, original model version, tokenizer configuration, and license.
Read next
read first
Can a Mac Neural Engine run local AI? GPU, MLX, and ANE roles
Executable programs and extensions
What can DiffusionGemma do on a Mac? Documents, images, and voice workflows
Executable programs and extensions
GGUF vs MLX: which model format should you download?
Executable programs and extensions
Which local LLM app or serving engine should you start with?
