Foundation Models 프레임워크를 이용해서 온디바이스 LLM을 앱에 통합하기 위해서는 어떤 요구 조건이 필요해?
Asked on 06/15/2025
1 search
To integrate on-device large language models (LLMs) into your app using the Foundation Models framework, there are several requirements and considerations:
-
Device Compatibility: The availability of the model depends on the support and readiness of Apple Intelligence on the device. It's important to check the status of the model and handle any unavailability in your app's UI. This can be tested using a scheme option in Xcode (Code-along: Bring on-device AI to your app using the Foundation Models framework).
-
Framework Integration: The Foundation Models framework is available on macOS, iOS, iPadOS, and VisionOS. It allows you to enhance existing app features or create new ones, all while keeping data private and running offline (Meet the Foundation Models framework).
-
Model Capabilities: The on-device model is optimized for tasks like summarization, extraction, and classification. It is a device-scale model, meaning it is not designed for world knowledge or advanced reasoning, which are typically handled by server-scale LLMs (Meet the Foundation Models framework).
-
Code Simplicity: Prompting the model is straightforward, requiring just three lines of code: import the framework, create a session, and send your prompt to the model (Platforms State of the Union).
-
Performance Optimization: The model is optimized using state-of-the-art quantization techniques and speculative decoding to ensure performance efficiency and quality. Swift concurrency is used to manage responses, which can be displayed incrementally using streaming output (Platforms State of the Union).
-
Safety and Privacy: The framework includes guardrails for core features, and you can add your own safety rules for specific use cases. All data processed by the model remains on the device, ensuring privacy (Platforms State of the Union).
These requirements and features make it possible to integrate on-device LLMs into your app effectively, leveraging Apple's optimized frameworks and tools.

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.

Code-along: Bring on-device AI to your app using the Foundation Models framework
Develop generative AI features for your SwiftUI apps using the Foundation Models framework. Get started by applying the basics of the framework to create an awesome feature. Watch step-by-step examples of how to complement the models with tools you build, stream results, and apply further optimizations for great performance.

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.