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:

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

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

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

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