Can you summarise FoundationalsModel framework
Asked on 06/11/2025
1 search
The Foundation Models framework, introduced by Apple, provides access to an on-device large language model through a Swift API. This framework is available on macOS, iOS, iPadOS, and VisionOS, and is designed to enhance app features by leveraging Apple's optimized language model for tasks such as text extraction, summarization, and more. Here are some key aspects of the framework:
-
On-Device Processing: The model runs entirely on the device, ensuring that all data remains private and can function offline without increasing app size.
-
Ease of Use: Developers can start using the framework with just three lines of code: import the framework, create a session, and send a prompt to the model.
-
Capabilities: The framework supports various tasks, including generating content, summarizing text, analyzing user input, and more. It can be used for personalized search suggestions, generating itineraries, or creating dialogue for game characters.
-
Advanced Features:
- Guided Generation: Allows for structured output in Swift, making it easier to map model outputs onto app views.
- Tool Calling: Enables the model to autonomously execute code defined in the app, allowing integration with live or personal data like weather and calendar events.
- Stateful Sessions: Built around the concept of stateful sessions, allowing for multi-turn interactions and custom instructions to guide the model's responses.
-
Safety and Privacy: The framework includes guardrails to prevent harmful content generation and ensure user safety. Developers can also add custom safety rules for specific use cases.
-
Developer Experience: The framework is tightly integrated with Xcode, providing a seamless development experience.
For a more detailed introduction, you can watch the session Meet the Foundation Models framework.

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

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