MLTensor
Generated on 3/21/2025
1 search
MLTensor is a new type introduced in Core ML that provides a convenient and efficient way to support computations typical of machine learning frameworks. It offers many common math and transformation operations and is designed to leverage Apple Silicon's powerful compute capabilities for high-performance execution. MLTensor resembles popular Python numerical libraries, making it intuitive for developers familiar with machine learning.
MLTensor is a multidimensional array defined by its shape and scalar type, where the shape specifies the length of each axis, and the scalar type indicates the type of elements it holds. It supports a broad range of operations, such as element-wise addition and multiplication, and can seamlessly work with literals. Operations are dispatched asynchronously, and tensors must be explicitly materialized to an ML-shaped array before accessing the underlying data.
For more details, you can refer to the session Deploy machine learning and AI models on-device with Core ML.

Explore machine learning on Apple platforms
Get started with an overview of machine learning frameworks on Apple platforms. Whether you’re implementing your first ML model, or an ML expert, we’ll offer guidance to help you select the right framework for your app’s needs.

Train your machine learning and AI models on Apple GPUs
Learn how to train your models on Apple Silicon with Metal for PyTorch, JAX and TensorFlow. Take advantage of new attention operations and quantization support for improved transformer model performance on your devices.

Accelerate machine learning with Metal
Learn how to accelerate your machine learning transformer models with new features in Metal Performance Shaders Graph. We’ll also cover how to improve your model’s compute bandwidth and quality, and visualize it in the all new MPSGraph viewer.

Bring your machine learning and AI models to Apple silicon
Learn how to optimize your machine learning and AI models to leverage the power of Apple silicon. Review model conversion workflows to prepare your models for on-device deployment. Understand model compression techniques that are compatible with Apple silicon, and at what stages in your model deployment workflow you can apply them. We’ll also explore the tradeoffs between storage size, latency, power usage and accuracy.

Deploy machine learning and AI models on-device with Core ML
Learn new ways to optimize speed and memory performance when you convert and run machine learning and AI models through Core ML. We’ll cover new options for model representations, performance insights, execution, and model stitching which can be used together to create compelling and private on-device experiences.

Support real-time ML inference on the CPU
Discover how you can use BNNSGraph to accelerate the execution of your machine learning model on the CPU. We will show you how to use BNNSGraph to compile and execute a machine learning model on the CPU and share how it provides real-time guarantees such as no runtime memory allocation and single-threaded running for audio or signal processing models.

Platforms State of the Union
Discover the newest advancements on Apple platforms.