View in English

  • Apple Developer
    • 시작하기

    시작하기 탐색

    • 개요
    • 알아보기
    • Apple Developer Program

    알림 받기

    • 최신 뉴스
    • Hello Developer
    • 플랫폼

    플랫폼 탐색

    • Apple 플랫폼
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    피처링

    • 디자인
    • 배포
    • 게임
    • 액세서리
    • 웹
    • 홈
    • CarPlay
    • 기술

    기술 탐색

    • 개요
    • Xcode
    • Swift
    • SwiftUI

    피처링

    • 손쉬운 사용
    • 앱 인텐트
    • Apple Intelligence
    • 게임
    • 머신 러닝 및 AI
    • 보안
    • Xcode Cloud
    • 커뮤니티

    커뮤니티 탐색

    • 개요
    • Apple과의 만남 이벤트
    • 커뮤니티 주도 이벤트
    • 개발자 포럼
    • 오픈 소스

    피처링

    • WWDC
    • Swift Student Challenge
    • 개발자 이야기
    • App Store 어워드
    • Apple 디자인 어워드
    • 문서

    문서 탐색

    • 문서 라이브러리
    • 기술 개요
    • 샘플 코드
    • 휴먼 인터페이스 가이드라인
    • 비디오

    릴리즈 노트

    • 피처링 업데이트
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • 다운로드

    다운로드 탐색

    • 모든 다운로드
    • 운영 체제
    • 애플리케이션
    • 디자인 리소스

    피처링

    • Xcode
    • TestFlight
    • 서체
    • SF Symbols
    • Icon Composer
    • 지원

    지원 탐색

    • 개요
    • 도움말
    • 개발자 포럼
    • 피드백 지원
    • 문의하기

    피처링

    • 계정 도움말
    • 앱 심사 지침
    • App Store Connect 도움말
    • 새로 추가될 요구 사항
    • 계약 및 지침
    • 시스템 상태
  • 빠른 링크

    • 이벤트
    • 뉴스
    • 포럼
    • 샘플 코드
    • 비디오
 

비디오

메뉴 열기 메뉴 닫기
  • 컬렉션
  • 전체 비디오
  • 소개

더 많은 비디오

  • 소개
  • 요약
  • 코드
  • Core AI 모델 제작 및 최적화 자세히 살펴보기

    새로운 Core AI 프레임워크를 사용한 Apple Silicon용 완전한 맞춤형 모델 배포 워크플로를 자세히 살펴보세요. 맞춤형 Metal 커널을 사용한 모델을 제작하기 위한 강력한 기법과 플랫폼 인식 압축 전략을 알아보세요. 새로운 Core AI Debugger는 심층적인 고유 분석을 제공하며, AI 지원 워크플로가 초기 개념부터 최적화된 온디바이스 실행까지 안내합니다.

    챕터

    • 0:00 - Introduction
    • 1:49 - Models and skills
    • 3:27 - Python workflow
    • 5:54 - Model optimization
    • 10:40 - Core AI Debugger
    • 19:27 - Advanced authoring
    • 20:43 - Custom Metal kernels
    • 23:01 - Model re-authoring
    • 28:46 - Next steps

    리소스

    • Core AI PyTorch Extensions
    • Core AI Python
    • Core AI Optimization
    • Inspecting, debugging, and profiling Core AI models
    • Inspecting Core AI models with Core AI Debugger
    • Core AI
      • HD 비디오
      • SD 비디오

    관련 비디오

    WWDC26

    • MLX로 Swift에서 수치 컴퓨팅 살펴보기
    • MLX를 사용하여 Mac에서 로컬 에이전틱 AI 실행하기
    • MLX를 사용한 분산 추론 및 학습 살펴보기
  • 비디오 검색…
    • 3:27 - Define and export a PyTorch model

      import torch
      import torch.nn as nn
      
      # Define a simple model
      class MLP(nn.Module):
          def __init__(self):
              super().__init__()
              self.fc1 = nn.Linear(256, 512)
              self.fc2 = nn.Linear(512, 10)
      
          def forward(self, x):
              return self.fc2(torch.relu(self.fc1(x)))
      
      # Export with torch.export
      model = MLP().eval()
      example_input = (torch.randn(1, 256),)
      exported_program = torch.export.export(model, example_input)
    • 4:02 - Convert, optimize and run inference with Core AI

      import coreai
      import coreai_torch
      from coreai.runtime import NDArray
      
      # Convert to Core AI
      converter = coreai_torch.TorchConverter()
      converter.add_exported_program(
          exported_program,
          input_names=["features"], output_names=["logits"])
      core_ai_program = converter.to_coreai()
      
      # Optimize and save to .aimodel
      core_ai_program.optimize()
      asset = core_ai_program.save_asset("mlp.aimodel")
      
      # Run inference
      specialized_model = await AIModel.load("mlp.aimodel")
      specialized_function = specialized_model.load_function("main")
      result = await specialized_function({"features": NDArray(example[0].numpy())})
    • 21:12 - Define a SiLU Metal kernel with PyTorch reference

      import torch
      from coreai_torch.dsl import TorchMetalKernel, MetalParameter
      
      def silu_torch(x):
          return x * torch.sigmoid(x)
      
      SILU_MSL = """
      float val = float(x[gid]);
      float sig = 1.0f / (1.0f + exp(-val));
      y[gid] = TYPE(val * sig);
      """
      
      silu_kernel = TorchMetalKernel(
          name="fused_silu",
          input_names=["x"],
          result_names=["y"],
          src=SILU_MSL,
          torch_defn=silu_torch,
          metal_params=[MetalParameter("gid", "uint", "thread_position_in_grid")],
          template_dtypes={"x": "TYPE"},
      )
    • 22:09 - Use a custom Metal kernel and convert with TorchConverter

      class MyModel(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.linear = torch.nn.Linear(256, 256)
      
          def forward(self, x):
              h = self.linear(x)
              n = h.numel()
              return silu_kernel(
                  h,
                  threads_per_grid_size=(n, 1, 1),
                  threads_per_thread_group=(min(n, 256), 1, 1),
                  result_shapes=[h.shape],
              )
      
      exported_program = torch.export.export(MyModel(), (torch.randn(1, 256),))
      
      converter = coreai_torch.TorchConverter()
      converter.register_custom_kernels([silu_kernel])
      converter.add_exported_program(exported_program,
                                     input_names=["x"], output_names=["y"])
      deployable = converter.to_coreai()  # MSL integrated into asset
    • 0:00 - Introduction
    • Overview of Core AI's complete Python ecosystem for model deployment on Apple Silicon — covering the model lifecycle from optimization and conversion through debugging and app integration.

    • 1:49 - Models and skills
    • Introduction to the coreai-models open-source repository — ready-to-go model architectures, reusable components, and agent skills you can install into your coding assistant to leverage Core AI best practices from day one.

    • 3:27 - Python workflow
    • How to convert a PyTorch model to Core AI using coreai-torch — exporting a program with torch.export, running TorchConverter with input/output names, saving as an .aimodel asset, and performing inference from Python with numpy inputs.

    • 5:54 - Model optimization
    • How to compress models using coreai-opt's config-driven optimization library — demonstrated on SAM3 (850M parameters) using int4 per-channel symmetric quantization presets, reducing the model from 3GB to 430MB, and understanding the trade-offs of aggressive uniform compression.

    • 10:40 - Core AI Debugger
    • Introduction to Core AI Debugger — a standalone app for inspecting models on Apple platforms. Covers the navigator (PyTorch module hierarchy), structure viewer (operation graph), source viewer (original Python code), inspector (tensor details), and how to run a model on-device to inspect intermediate tensor outputs.

    • 19:27 - Advanced authoring
    • How advanced model authoring goes beyond end-to-end conversion — fusing multiple operations into a single kernel dispatch, and leveraging Core AI's pre-packaged fast kernels for heavy operations like Scaled Dot Product Attention.

    • 20:43 - Custom Metal kernels
    • How to embed custom Metal Shading Language kernels directly into a Core AI model asset — writing a PyTorch reference function alongside an MSL kernel, registering a TorchMetalKernel with TorchConverter, and shipping the kernel bundled inside the .aimodel file.

    • 23:01 - Model re-authoring
    • How to re-author a PyTorch model from scratch for power-efficient execution on iOS — demonstrated on SAM3 by splitting into three independent functions (image_encode, text_encode, detect), using convolutional projections and channels-first layouts, applying 4-bit palettization to the encoders, and achieving faster second inference by reusing cached image embeddings.

    • 28:46 - Next steps
    • Summary of the Core AI Python toolchain: convert with coreai-torch, optimize with coreai-opt, debug with Core AI Debugger, build on coreai-models examples, and use Core AI Skills in your coding agent.

Developer Footer

  • 비디오
  • WWDC26
  • Core AI 모델 제작 및 최적화 자세히 살펴보기
  • 메뉴 열기 메뉴 닫기
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    메뉴 열기 메뉴 닫기
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    메뉴 열기 메뉴 닫기
    • 손쉬운 사용
    • 액세서리
    • Apple Intelligence
    • 앱 확장 프로그램
    • App Store
    • 오디오 및 비디오(영문)
    • 증강 현실
    • 디자인
    • 배포
    • 교육
    • 서체(영문)
    • 게임
    • 건강 및 피트니스
    • 앱 내 구입
    • 현지화
    • 지도 및 위치
    • 머신 러닝 및 AI
    • 오픈 소스(영문)
    • 보안
    • Safari 및 웹(영문)
    메뉴 열기 메뉴 닫기
    • 문서(영문)
    • 튜토리얼
    • 다운로드
    • 포럼(영문)
    • 비디오
    메뉴 열기 메뉴 닫기
    • 지원 문서
    • 문의하기
    • 버그 보고
    • 시스템 상태(영문)
    메뉴 열기 메뉴 닫기
    • Apple Developer
    • App Store Connect
    • 인증서, 식별자 및 프로파일(영문)
    • 피드백 지원
    메뉴 열기 메뉴 닫기
    • 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 Bounty Program(영문)
    • Security Research Device Program(영문)
    메뉴 열기 메뉴 닫기
    • Apple과의 만남
    • Apple Developer Center
    • App Store 어워드(영문)
    • Apple 디자인 어워드
    • Apple Developer Academy(영문)
    • WWDC
    최신 뉴스 읽기.
    Apple Developer 앱 받기.
    Copyright © 2026 Apple Inc. 모든 권리 보유.
    약관 개인정보 처리방침 계약 및 지침