View in English

  • Apple Developer
    • 今すぐ始める

    「今すぐ始める」を詳しく見る

    • 概要
    • 学ぶ
    • Apple Developer Program

    最新情報

    • 最新ニュース
    • Hello Developer
    • プラットフォーム

    プラットフォームを詳しく見る

    • Appleプラットフォーム
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    特集

    • デザイン
    • 配信
    • ゲーム
    • アクセサリ
    • Web
    • Home
    • CarPlay
    • テクノロジー

    テクノロジーを詳しく見る

    • 概要
    • Xcode
    • Swift
    • SwiftUI

    特集

    • アクセシビリティ
    • App Intent
    • Apple Intelligence
    • ゲーム
    • 機械学習とAI
    • セキュリティ
    • Xcode Cloud
    • コミュニティ

    コミュニティを詳しく見る

    • 概要
    • 「Appleに相談」イベント
    • コミュニティによるイベント
    • デベロッパフォーラム
    • オープンソース

    特集

    • WWDC
    • Swift Student Challenge
    • デベロッパストーリー
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Center
    • ドキュメント

    ドキュメントを詳しく見る

    • ドキュメントライブラリ
    • テクノロジー概要
    • サンプルコード
    • ヒューマンインターフェイスガイドライン
    • ビデオ

    リリースノート

    • 注目のアップデート
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • ダウンロード

    ダウンロードを詳しく見る

    • すべてのダウンロード
    • オペレーティングシステム
    • アプリ
    • デザインリソース

    特集

    • Xcode
    • TestFlight
    • フォント
    • SF Symbols
    • Icon Composer
    • サポート

    サポートを詳しく見る

    • 概要
    • ヘルプガイド
    • デベロッパフォーラム
    • フィードバックアシスタント
    • お問い合わせ

    特集

    • アカウントヘルプ
    • App Reviewガイドライン
    • App Store Connectヘルプ
    • 近日導入予定の要件
    • 契約およびガイドライン
    • システムステータス
  • クイックリンク

    • イベント
    • ニュース
    • Forum
    • サンプルコード
    • ビデオ
 

ビデオ

メニューを開く メニューを閉じる
  • コレクション
  • すべてのビデオ
  • 利用方法

その他のビデオ

  • 概要
  • Summary
  • コード
  • Foundation Modelフレームワークの新機能

    Foundation Modelフレームワークの新機能を紹介します。プライベートクラウドコンピューティングへのアクセス、サードパーティまたはオープンソースのモデルの統合、Visionの各種機能の活用のための方法を確認しましょう。コンテキスト管理のためのAPI、内蔵のセマンティック検索、エージェントを活用した体験をアプリ内で構築する上で役立つ強力なプリミティブについても紹介します。

    関連する章

    • 0:00 - Introduction
    • 2:34 - New on-device model
    • 3:21 - Vision: image understanding
    • 4:20 - Private Cloud Compute
    • 6:46 - Model abstraction layer
    • 7:32 - Partner model integrations
    • 9:40 - System tools: Vision and Spotlight
    • 10:57 - Dynamic Profiles for agentic apps
    • 13:46 - Composing models and configurations
    • 15:30 - Evaluations framework
    • 16:02 - The fm command line tool
    • 17:13 - Foundation Models Python SDK
    • 17:55 - Open source and framework utilities
    • 19:24 - Next steps

    リソース

    • Expanding generation with tool calling
    • Analyzing images with multimodal prompting
    • Composing dynamic sessions with instructions and profiles
    • Adding server-side intelligence with Private Cloud Compute
      • HDビデオ
      • SDビデオ
  • このビデオを検索
    • 2:46 - Context size and token counting

      // Context size and token counting
        
        let model = SystemLanguageModel()
        print(model.contextSize)
        // 8192
        
        let count = try await model.tokenCount(for: "What are the Japanese characters for origami?")
        print(count)
    • 3:52 - Attachable image types

      // Insert c// Attachable image types
      
        let response = try await session.respond {
            "What animal is this?"
            Attachment(UIImage(...))
        }ode snippet.
    • 8:45 - Inspecting usage

      // Inspecting usage
        
        let response = try await session.respond(
            to: "Recommend a craft that doesn't require scissors.",
            contextOptions: ContextOptions(reasoningLevel: .light)
        )
      
        print(response.usage.input.totalTokenCount)
        print(response.usage.input.cachedTokenCount)
      
        print(response.usage.output.totalTokenCount)
        print(response.usage.output.reasoningTokenCount)
    • 11:55 - Routing between craft analysis and brainstorm

      // Routing between craft analysis and brainstorm
        
        @Observable
        final class AppStates {
            var mode: Mode
        }
      
        let appStates: AppStates
        var session: LanguageModelSession?
      
        func updateSession() {
            let originalTranscript = session?.transcript.dropFirstInstructions() ?? Transcript()
      
            // Create a new session with new instructions and tools
            switch appStates.mode {
            case .craftAnalysis:
                session = LanguageModelSession(
                    tools: [
                        RecordImageAnalysisTool(),
                        SwitchModeTool(states: appStates)
                    ],
                    instructions: "Analyze the user's craft project...",
                    transcript: originalTranscript
                )
            case .brainstorm:
                session = LanguageModelSession(
                    tools: [
                        RecordBrainstormTool(),
                    ],
                    instructions: "Brainstorm some ideas...",
                    transcript: originalTranscript
                )
            }
        }
        
        struct SwitchModeTool: Tool {
            let description = "Switch to a different mode."
            let states: AppStates
      
            @Generable
            struct Arguments {
                let mode: Mode
            }
      
            func call(arguments: Arguments) async throws -> some PromptRepresentable {
                appStates.mode = arguments.mode
                return "Successfully switched to \(arguments.mode)."
            }
        }
        
        // If mode changes, update the session
        withObservationTracking {
            appStates.mode
        } onChange: {
            updateSession()
        }
    • 12:42 - Describing the profile for craft app

      // Describing the profile for craft app
      
        struct CraftProfile: LanguageModelSession.DynamicProfile {
            var body: some DynamicProfile {
                Profile {
                    Instructions {
                        """
                        You are an expert crafting assistant. \
                        Record craft project image analyses   \
                        using the recordImageAnalysis tool.
                        """
                    }
                    RecordImageAnalysisTool()
                }
            }
        }
      
        let session = LanguageModelSession(
            profile: CraftProfile()
        )
    • 14:36 - Describing the profile for craft app

      // Describing the profile for craft app
        
        struct CraftProfile: LanguageModelSession.DynamicProfile {
            let states: CraftProjectStates
      
            var body: some DynamicProfile {
                switch states.mode {
                case .craftAnalysis:
                    Profile {
                        Instructions { /* ... */ }
                        RecordImageAnalysisTool()
                        SwitchModeTool(states: states)
                    }
                case .brainstorm:
                    Profile {
                        Instructions { /* ... */ }
                        BrainstormRecordTool()
                    }
                    .model(states.privateCloudCompute)
                    .reasoningLevel(.deep)
                }
            }
        }
    • 18:29 - Foundation Models SDK for Python

      # Foundation Models SDK for Python
        
        import apple_fm_sdk as fm
      
        model = fm.SystemLanguageModel()
      
        # Check the model's availability
        is_available, reason = model.is_available()
      
        if is_available:
      
            # Create a session
            session = fm.LanguageModelSession(model=model)
      
            # Generate a response
            response = await session.respond(prompt="Hello!")
            print(response)
    • 0:00 - Introduction
    • Erik Hornberger and Zhen Li introduce this year's Foundation Models release, going open source with a new utilities package, and preview the agenda: model updates, system tools, dynamic profiles, evaluations, and tooling.

    • 2:34 - New on-device model
    • A rebuilt on-device model with better reasoning and tool calling, plus new APIs (from iOS 26.4) for inspecting context size and counting tokens, and refined guardrails that reduce false positives.

    • 3:21 - Vision: image understanding
    • The on-device model gains vision. Add image attachments to a prompt to ask about images, accepting UIImage, NSImage, CGImage, Core Image, CoreVideo pixel buffers, and file URLs at any size, though larger images cost more tokens.

    • 4:20 - Private Cloud Compute
    • Access Apple's server models via PrivateCloudComputeLanguageModel, a 32K context window with reasoning levels, with no account setup, auth, or API keys, fully private, and now available on watchOS 27.

    • 6:46 - Model abstraction layer
    • A new LanguageModel protocol lets local and server models back a LanguageModelSession. Existing models conform already, plus open-source CoreAILanguageModel and MLXLanguageModel for running local models on the Neural Engine and GPU.

    • 7:32 - Partner model integrations
    • Anthropic and Google publish Swift packages for their frontier models. Swap models via Swift Package Manager with everything downstream unchanged, handle auth and billing securely with OAuth and Keychain, and track per-token usage including cache and reasoning tokens.

    • 9:40 - System tools: Vision and Spotlight
    • New built-in tools: BarcodeReaderTool and OCRTool (Vision-backed) for reasoning over visual information, and a Spotlight-powered search tool enabling fully local Retrieval-Augmented Generation (RAG).

    • 10:57 - Dynamic Profiles for agentic apps
    • Dynamic Profiles, a declarative primitive for agentic experiences. Using the Crafts app, a single session swaps instructions and tools between modes (craft analysis vs. brainstorm) by conforming a struct to DynamicProfile.

    • 13:46 - Composing models and configurations
    • Use modifiers to vary the model and reasoning level per profile branch, for example SystemLanguageModel for quick analysis and Private Cloud Compute with deep reasoning for brainstorming, while preserving conversation history. A profile resolves to one active profile at a time.

    • 15:30 - Evaluations framework
    • A new Swift framework to measure the quality of intelligence features, quantifying accuracy as you tweak prompts so you can understand the statistical impact of changes and ship with confidence.

    • 16:02 - The fm command line tool
    • In macOS 27, the models come to the terminal. The fm CLI gives on-device and PCC access for everyday productivity: fm chat for interactive use and piping into shell scripts to summarize, extract, or generate content.

    • 17:13 - Foundation Models Python SDK
    • A Python SDK exposes the same on-device model as the Swift framework, checking availability and generating structured responses in a few lines, for data scientists and researchers in the Python ecosystem.

    • 17:55 - Open source and framework utilities
    • The Foundation Models framework utilities package offers building blocks (transcript management, a skill API, chat-completions interfacing), and the core framework is open-sourced to run wherever Swift runs, including Linux servers.

    • 19:24 - Next steps
    • Download the sample app, get familiar with dynamic profiles and the Evaluations framework, and watch the deep-dive sessions on PCC, evaluations, the Xcode instrument, and dynamic profiles.

Developer Footer

  • ビデオ
  • WWDC26
  • Foundation Modelフレームワークの新機能
  • メニューを開く メニューを閉じる
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    メニューを開く メニューを閉じる
    • アクセシビリティ
    • アクセサリ
    • Apple Intelligence
    • App Extension
    • App Store
    • オーディオとビデオ(英語)
    • 拡張現実
    • デザイン
    • 配信
    • 教育
    • フォント(英語)
    • ゲーム
    • ヘルスケアとフィットネス
    • アプリ内課金
    • ローカリゼーション
    • マップと位置情報
    • 機械学習とAI
    • オープンソース(英語)
    • セキュリティ
    • SafariとWeb(英語)
    メニューを開く メニューを閉じる
    • 英語ドキュメント(完全版)
    • 日本語ドキュメント(一部トピック)
    • チュートリアル
    • ダウンロード
    • フォーラム(英語)
    • ビデオ
    Open Menu Close Menu
    • サポートドキュメント
    • お問い合わせ
    • バグ報告
    • システム状況(英語)
    メニューを開く メニューを閉じる
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles(英語)
    • フィードバックアシスタント
    メニューを開く メニューを閉じる
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(英語)
    • Mini Apps Partner Program
    • News Partner Program(英語)
    • Video Partner Program(英語)
    • セキュリティ報奨金プログラム(英語)
    • Security Research Device Program(英語)
    Open Menu Close Menu
    • Appleに相談
    • Apple Developer Center
    • App Store Awards(英語)
    • Apple Design Awards
    • Apple Developer Academy(英語)
    • WWDC
    最新ニュースを読む。
    Apple Developerアプリを入手する。
    Copyright © 2026 Apple Inc. All rights reserved.
    利用規約 プライバシーポリシー 契約とガイドライン