fundament models

Asked on 06/16/2025

2 searches

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 app features with capabilities like personalized search suggestions, content generation, text summarization, and more, all while maintaining user privacy since it runs on-device.

Key features of the Foundation Models framework include:

  1. Guided Generation: This feature allows developers to generate structured output, such as JSON or CSV, using the Generable macro. This helps in creating reliable structured data from the model's output.

  2. Snapshot Streaming: Instead of streaming raw deltas, the framework uses snapshots to represent partially generated responses, which are more robust for structured output.

  3. Tool Calling: The model can autonomously call custom functions defined in your app, allowing it to perform tasks like fetching up-to-date content or taking specific actions.

  4. Stateful Sessions: This feature supports multi-turn interactions, maintaining context across multiple exchanges with the model.

  5. AI Safety and Prompt Design: The framework includes built-in guardrails to ensure safe app experiences and provides best practices for prompt design to avoid misuse or potential harm.

For more detailed information, you can explore sessions like Meet the Foundation Models framework and Deep dive into the Foundation Models framework.