1 of 29

AI від Apple

Як Apple розкриває потенціал AI: Секрети Apple Intelligence та ключові дослідження

2 of 29

Hello

there!

Maksym Kmet

Senior Data Scientist

3 of 29

We befriend people with technology

​

4 of 29

$9M+

З 24 лютого 2022 року задонатили на підтримку України

30M+

Понад 30 мільйонів користувачів наших продуктів

180+

Країн, в яких живуть наші користувачі

5

Кожен п’ятий Mac на планеті має хоча б один продукт MacPaw

2008

Рік заснування компанії

5 of 29

ML Research

ML Frameworks

Advanced

Hardware

Як Apple стає AI-first company

6 of 29

Браковані NVIDIA GPU у новому Macbook та судові позови

Apple AI:

Передумови

2008

2016

2017

2020

2024

Apple Intelligence локально на iPhone 15 Pro

Apple Silicon (M1)

Neural engine для прискорення ML inference

GPU від AMD у Macbook

7 of 29

ML research

  • REALM
  • FerretUI
  • Open-ELM
  • DCLM-7B

А що крім заліза?

Frameworks for ML

  • CoreML
  • MLX
  • AxLearn

8 of 29

ML Frameworks

9 of 29

build and train a model with the Create ML app

use Core ML Tools to convert models built with other libraries into the Core ML

fine-tune on-device with users data

ML framework used across Apple products for fast inference with easy integration of pre-trained models on the edge

CoreML (2017)

10 of 29

build and train a model with the Create ML app

use Core ML Tools to convert models built with other libraries into the Core ML

fine-tune on-device with users data

ML framework used across Apple products for fast inference with easy integration of pre-trained models on the edge

CoreML (2017)

11 of 29

MLX is an array framework optimized for the unified memory architecture of Apple silicon. The NumPy-like API makes it familiar to use and flexible.

MLX (2024)

​

12 of 29

MLX is an array framework optimized for the unified memory architecture of Apple silicon. The NumPy-like API makes it familiar to use and flexible.

MLX (2024)

​

13 of 29

AXLearn is a library built on top of JAX and XLA to support the development of large-scale deep learning models

​

  • Training of models with up to hundreds of billions of parameters across thousands of accelerators
  • Apple Intelligence foundation models trained with AxLearn

AxLearn (2024)

​

14 of 29

ML

Research

15 of 29

On-screen Entities (ex. phone number on a restaurant webpage)

​

Background Entities (ex. alarm ringing or music in the background)

​

​

Conversational Entities (entities from the conversation with user (ex “Call Mom” or “Show path to the first restaurant from the list”)

​

​

Reference resolution as language modeling.

Understand what user is referring to in the conversation even if it is not explicitly stated.

Small model Flan-T5 matches GPT-4 on benchmarks (their own)

​

​

ReALM (2024)

16 of 29

Elementary Tasks:

Referring:

  • OCR
  • Icon recognition
  • Widget classification

Grounding:

  • Widget listing
  • Find text
  • Find icon
  • Find widget

Advanced Tasks:

  • Detailed description
  • Conversation perception
  • Conversation interaction
  • Function inference

Multimodal large language model for enhanced understanding of mobile UI screens. (encoder CLIP-ViT-L + Vicuna + projection layers + �visual sampler)

Ferret-UI (2024)

17 of 29

Open-ELM (May 2024)

​

  • Family of small open source LLM 270M-3B parameters (good for mobile)
  • Underwhelming performance compared to competitors

​

​

DCLM-7B (July 2024)

​

  • Relatively small open source LLM
  • Beats Mistral 7B in some of the benchmarks and gets close of Llama 3 and Gemma
  • Positively perceived in the community

​

Large Language Models

Open-ELM and DCLM-7B

18 of 29

How Apple �Intelligence works

19 of 29

Were our guesses correct?

Apple Intelligence

Features

20 of 29

  • On-screen context awareness
  • Taking actions
  • Reference resolution from complex phrases
  • Background context: emails, photos etc

​

​

…sounds like ReALM or Ferret-UI

Context Awareness

21 of 29

  • Writing tools: emails summarization, proofreading, rewriting
  • Notifications prioritization
  • Smart replies
  • All working locally

​

…sounds like Open-ELM

​

Language generation

​

22 of 29

  • Custom avatars generation
  • Images from description
  • Photo “clean up” function

​

Image generation

​

23 of 29

What we actually �know

24 of 29

Architecture

of Apple Intelligence

25 of 29

Architecture

of Apple Intelligence

26 of 29

On-device models: foundation models (3B params) with a set of small LoRA adapters

App Intents ToolBox: predefined functions such as Open Email, Start playing music, create a new Reminder. Each LoRa adapter is for a specific type of intents

Server models: The stack of Apple models in the Private Cloud

Cloud Compute: larger foundation LLM + LoRa

Orchestration: routes user request �to on-device model/ server /ChatGPT

Semantic index: is a vector database �of personal context (emails, photos, contacts …)

Architecture

of Apple Intelligence

27 of 29

described a photo of my beautiful baby as “group of people in a room with white walls.”

photo “clean up” function made me look bald

misinterprets the meanings of text, inverts people’s names

​

lifted to priority a scam email about suspended account

​

from a column by The Washington Post

​

Apple Intelligence can be kind of dumb

28 of 29

  • Foundation models
  • Adapters
  • Orchestration
  • Personal context database
  • Local vs server vs ChatGPT

​

  • Core ML
  • MLX

​

  • ReaLM
  • FerretUI
  • Open-ELM
  • DCLM-7B

Apple Intelligence

​

​

Brief history �of Apple computational powers

ML Frameworks

​

​

ML Research

29 of 29

Q&A