← ClaudeAtlas

coremllisted

Integrate and optimize Core ML models in iOS apps for on-device machine learning inference. Covers model loading (.mlmodelc, .mlpackage), predictions with auto-generated classes and MLFeatureProvider, compute unit configuration (CPU, GPU, Neural Engine), MLTensor, VNCoreMLRequest, MLComputePlan, multi-model pipelines, and deployment strategies. Use when loading Core ML models, making predictions, configuring compute units, or profiling model performance.
dpearson2699/swift-ios-skills · ★ 640 · AI & Automation · score 81
Install: claude install-skill dpearson2699/swift-ios-skills
# Core ML Swift Integration Load, configure, and run Core ML models in iOS apps. This skill covers the Swift side: model loading, prediction, MLTensor, profiling, and deployment. Target iOS 26+ with Swift 6.3, backward-compatible to iOS 14 unless noted. > **Scope boundary:** Python-side model conversion, optimization (quantization, > palettization, pruning), and framework selection live in the `apple-on-device-ai` > skill. This skill owns Swift integration only. See [references/coreml-swift-integration.md](references/coreml-swift-integration.md) for complete code patterns including actor-based caching, batch inference, image preprocessing, and testing. ## Contents - [Loading Models](#loading-models) - [Model Configuration](#model-configuration) - [Making Predictions](#making-predictions) - [MLTensor (iOS 18+)](#mltensor-ios-18) - [Working with MLMultiArray](#working-with-mlmultiarray) - [Image Preprocessing](#image-preprocessing) - [Multi-Model Pipelines](#multi-model-pipelines) - [Vision Integration](#vision-integration) - [Performance Profiling](#performance-profiling) - [Model Deployment](#model-deployment) - [Memory Management](#memory-management) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Loading Models ### Auto-Generated Classes When you drag a `.mlpackage` or `.mlmodelc` into Xcode, it generates a Swift class with typed input/output. Use this whenever possible. ```swift import CoreML let config