fondamental models
Asked on 06/16/2025
1 search
The Foundation Models framework was introduced at WWDC 2025, providing access to an on-device large language model through a Swift API. This framework is available on macOS, iOS, iPadOS, and VisionOS, and it allows developers to enhance existing app features or create new ones, such as personalized search suggestions or generating dialogue for game characters. The framework ensures privacy by running entirely on-device, meaning data does not leave the device, and it can operate offline without increasing app size.
Key features of the Foundation Models framework include:
-
Guided Generation: This feature allows developers to get structured output in Swift, making it easier to integrate intelligent features into apps. It uses a technique called constrained decoding to ensure structural correctness.
-
Tool Calling: This allows the model to autonomously execute code defined in your app, enhancing the model's capabilities by letting it perform tasks like fetching up-to-date content or taking actions within the app.
-
Snapshot Streaming: Instead of raw deltas, the framework streams snapshots, which are partially generated responses that get filled in as the model produces more of the response. This is particularly useful for streaming structured output.
-
Stateful Sessions: These sessions support multi-turn interactions, allowing for more complex and context-aware conversations with the model.
For a detailed introduction to the Foundation Models framework, you can watch the session Meet the Foundation Models framework (00:00:00). If you're interested in a deeper understanding, the session Deep dive into the Foundation Models framework (00:00:00) provides more insights into using the framework effectively.

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.

Discover machine learning & AI frameworks on Apple platforms
Tour the latest updates to machine learning and AI frameworks available on Apple platforms. Whether you are an app developer ready to tap into Apple Intelligence, an ML engineer optimizing models for on-device deployment, or an AI enthusiast exploring the frontier of what is possible, we’ll offer guidance to help select the right tools for your needs.

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”.