---
title: Core ML
framework: Core ML
role: collection
role_heading: Framework
platforms: [iOS 11.0+, iPadOS 11.0+, Mac Catalyst 13.0+, macOS 10.13+, tvOS 11.0+, visionOS 1.0+, watchOS 4.0+]
path: coreml
---

# Core ML

Integrate machine learning models into your app.

## Overview

Overview Use Core ML to integrate machine learning models into your app. Core ML provides a unified representation for all models. Your app uses Core ML APIs and user data to make predictions, and to train or fine-tune models, all on a person’s device.

A model is the result of applying a machine learning algorithm to a set of training data. You use a model to make predictions based on new input data. Models can accomplish a wide variety of tasks that would be difficult or impractical to write in code. For example, you can train a model to categorize photos, or detect specific objects within a photo directly from its pixels. You build and train a model with the Create ML app bundled with Xcode. Models trained using Create ML are in the Core ML model format and are ready to use in your app. Alternatively, you can use a wide variety of other machine learning libraries and then use Core ML Tools to convert the model into the Core ML format. Once a model is on a person’s device, you can use Core ML to retrain or fine-tune it on-device, with that person’s data. Core ML optimizes on-device performance by leveraging the CPU, GPU, and Neural Engine while minimizing its memory footprint and power consumption. Running a model strictly on a person’s device removes any need for a network connection, which helps keep a person’s data private and your app responsive. The framework is the foundation for domain-specific frameworks and functionality. It supports Vision for analyzing images, Natural Language for processing text, Speech for converting audio to text, and Sound Analysis for identifying sounds in audio. Core ML itself builds on top of low-level primitives like Accelerate and BNNS, as well as Metal Performance Shaders.

If your app integrates AI models using the latest architectures and inference techniques, see Core AI.

## Topics

### Core ML models

- [Getting a Core ML Model](coreml/getting-a-core-ml-model.md)
- [Updating a Model File to a Model Package](coreml/updating-a-model-file-to-a-model-package.md)
- [Integrating a Core ML Model into Your App](coreml/integrating-a-core-ml-model-into-your-app.md)
- [MLModel](coreml/mlmodel.md)
- [Model Customization](coreml/model-customization.md)
- [Model Personalization](coreml/model-personalization.md)

### Model inputs and outputs

- [Making Predictions with a Sequence of Inputs](coreml/making-predictions-with-a-sequence-of-inputs.md)
- [MLFeatureValue](coreml/mlfeaturevalue.md)
- [MLSendableFeatureValue](coreml/mlsendablefeaturevalue.md)
- [MLFeatureProvider](coreml/mlfeatureprovider.md)
- [MLDictionaryFeatureProvider](coreml/mldictionaryfeatureprovider.md)
- [MLBatchProvider](coreml/mlbatchprovider.md)
- [MLArrayBatchProvider](coreml/mlarraybatchprovider.md)
- [MLModelAsset](coreml/mlmodelasset.md)

### App integration

- [Downloading and Compiling a Model on the User’s Device](coreml/downloading-and-compiling-a-model-on-the-user-s-device.md)
- [Model Integration Samples](coreml/model-integration-samples.md)

### Model encryption

- [Generating a Model Encryption Key](coreml/generating-a-model-encryption-key.md)
- [Encrypting a Model in Your App](coreml/encrypting-a-model-in-your-app.md)

### Compute devices

- [MLComputeDevice](coreml/mlcomputedevice.md)
- [MLCPUComputeDevice](coreml/mlcpucomputedevice.md)
- [MLGPUComputeDevice](coreml/mlgpucomputedevice.md)
- [MLNeuralEngineComputeDevice](coreml/mlneuralenginecomputedevice.md)
- [MLComputeDeviceProtocol](coreml/mlcomputedeviceprotocol.md)

### Compute plan

- [MLComputePlan](coreml/mlcomputeplan-1w21n.md)
- [MLModelStructure](coreml/mlmodelstructure-swift.enum.md)
- [MLComputePolicy](coreml/mlcomputepolicy.md)
- [withMLTensorComputePolicy(_:_:)](coreml/withmltensorcomputepolicy(_:_:)-8stx9.md)
- [withMLTensorComputePolicy(_:_:)](coreml/withmltensorcomputepolicy(_:_:)-6z33x.md)

### Model state

- [MLState](coreml/mlstate.md)
- [MLStateConstraint](coreml/mlstateconstraint.md)

### Model tensor

- [MLTensor](coreml/mltensor.md)
- [MLTensorScalar](coreml/mltensorscalar.md)
- [MLTensorRangeExpression](coreml/mltensorrangeexpression.md)
- [pointwiseMin(_:_:)](coreml/pointwisemin(_:_:).md)
- [pointwiseMax(_:_:)](coreml/pointwisemax(_:_:).md)
- [withMLTensorComputePolicy(_:_:)](coreml/withmltensorcomputepolicy(_:_:).md)

### Model structure

- [MLModelStructure](coreml/mlmodelstructure-swift.enum.md)

### Model errors

- [MLModelError](coreml/mlmodelerror-swift.struct.md)
- [MLModelError.Code](coreml/mlmodelerror-swift.struct/code.md)
- [MLModelErrorDomain](coreml/mlmodelerrordomain.md)

### Model deployments

- [MLModelCollection](coreml/mlmodelcollection.md)

### Optimization

- [Analyzing a Core ML model’s performance in Xcode](coreml/analyzing-a-core-ml-model-s-performance-in-xcode.md)

### Reference

- [CoreML Enumerations](coreml/coreml-enumerations.md)
