how can i run foundation models on a mac
Asked on 06/11/2025
1 search
To run foundation models on a Mac, you can use the Foundation Models Framework introduced by Apple. This framework provides access to an on-device large language model through a convenient Swift API. It is available on macOS, iOS, iPadOS, and VisionOS. Here are some key points about using the Foundation Models Framework on a Mac:
-
On-Device Execution: The models run entirely on the device, ensuring that all data remains private and can be processed offline. This is beneficial for privacy and does not increase the app size since the model is built into the operating system.
-
Swift API: You can easily integrate the framework into your projects by importing it and using its API to create sessions and send prompts to the model. This allows for tasks such as text generation, summarization, and more.
-
Optimized Performance: The framework is optimized for performance using Apple's hardware, including the CPU, GPU, and neural engine, which are part of Apple Silicon. This ensures efficient execution of machine learning tasks.
-
Core ML Integration: If you have custom models, you can use Core ML to run them on your Mac. Core ML optimizes performance by leveraging the hardware capabilities of Apple Silicon.
For a detailed introduction to the Foundation Models Framework, you can watch the session Meet the Foundation Models framework. If you want to dive deeper into its capabilities, consider watching Deep dive into the Foundation Models framework.
Additionally, if you are interested in running large language models specifically on Apple Silicon, you can explore the session Explore large language models on Apple silicon with MLX, which introduces MLX, a library designed for this purpose.

Meet the Foundation Models framework
Learn how to tap into the on-device large language model behind Apple Intelligence! This high-level overview covers everything from guided generation for generating Swift data structures and streaming for responsive experiences, to tool calling for integrating data sources and sessions for context management. This session has no prerequisites.

Deep dive into the Foundation Models framework
Level up with the Foundation Models framework. Learn how guided generation works under the hood, and use guides, regexes, and generation schemas to get custom structured responses. We’ll show you how to use tool calling to let the model autonomously access external information and perform actions, for a personalized experience. To get the most out of this video, we recommend first watching “Meet the Foundation Models framework”.

Platforms State of the Union
Discover the newest advancements on Apple platforms.