Large-Scale Deployment of On-Device and Server Foundation Models for Consumer AI Features

apple · Tech · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Consumer-scale foundation model deployment across devices and cloud

Apple needed to deliver generative AI features across its software platforms while preserving privacy, speed, power efficiency, structured developer integration, multilingual support, multimodal capability, and safety. The core challenge was choosing when to run a compact model on-device and when to use a scalable server model, then optimizing both for production latency, memory, quality, and responsible deployment.

Constraints:

Architecture

Apple deploys a complementary model family: an approximately 3B-parameter on-device foundation model optimized for Apple silicon and a server-based parallel-track mixture-of-experts model for Private Cloud Compute. The on-device model uses block-level KV cache sharing, quantization-aware training, 2-bit decoder weights, 4-bit embeddings, 8-bit KV cache, and adapter recovery. The server model uses PT-MoE track parallelism, ASTC compression, and dedicated decompression support. The training pipeline combines licensed, public, Applebot-crawled, filtered, multilingual, code/math, image-text, synthetic caption, SFT, tool-use, and RLHF data. The Foundation Models framework exposes the on-device model to Swift developers through guided generation, constrained decoding, speculative decoding, tool calling, and adapter training, with safety guardrails and feedback loops across users and developers.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  features["Apple Intelligence features"] --> device["On-device foundation model"]
  features --> server["Server foundation model"]
  server --> pcc["Private Cloud Compute"]
  data["Training data pipeline"] --> device
  data --> server
  data --> vision["Vision encoder stack"]
  vision --> device
  vision --> server
  sft["SFT and RLHF pipeline"] --> device
  sft --> server
  compression["Compression pipeline"] --> device
  compression --> server
  framework["Foundation Models framework"] --> device
  framework --> guided["Guided generation runtime"]
  framework --> tools["Tool calling runtime"]
  guided --> apps["Developer apps"]
  tools --> apps
  safety["Responsible AI and safety system"] --> features
  safety --> data
  eval["Evaluation system"] --> safety
  feedback["Feedback channels"] --> eval
  features --> feedback
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Apple Intelligence features User-facing software features that consume foundation-model capabilities across Apple platforms. On-device foundation model, Server foundation model, Responsible AI and safety system, Feedback channels
On-device foundation model Approximately 3B-parameter compact model optimized for Apple silicon, low latency, and privacy-preserving local inference. Apple Intelligence features, Foundation Models framework, Compression pipeline, Vision encoder stack
Server foundation model Parallel-track mixture-of-experts model designed for scalable, higher-accuracy Private Cloud Compute inference. Apple Intelligence features, Private Cloud Compute, Compression pipeline, Vision encoder stack
Private Cloud Compute Privacy-oriented server environment for complex Apple Intelligence tasks. Server foundation model
Training data pipeline Licensed, public, open-source, Applebot-crawled, filtered, multilingual, code, math, and multimodal data preparation pipeline. On-device foundation model, Server foundation model, Vision encoder stack, Responsible AI and safety system
Vision encoder stack ViT-g and ViTDet-L based visual encoders, adapters, image-text alignment, and multimodal continued pretraining. Training data pipeline, On-device foundation model, Server foundation model
SFT and RLHF pipeline Post-training with human demonstrations, synthetic data, process-supervised tool-use trajectories, multilingual data, and reward-variance prompt selection. On-device foundation model, Server foundation model, Evaluation system
Compression pipeline QAT, ASTC, embedding quantization, KV-cache quantization, and adapter recovery for deployment efficiency. On-device foundation model, Server foundation model, Apple Intelligence features
Foundation Models framework Swift developer framework exposing the on-device model with guided generation, tool calling, and adapter support. On-device foundation model, Guided generation runtime, Tool calling runtime, Developer apps
Guided generation runtime Swift macro, response-format injection, constrained decoding, speculative decoding, and type-safe output construction. Foundation Models framework, Developer apps
Tool calling runtime Framework mechanism for developer-provided tools and parallel or serial tool-call graphs. Foundation Models framework, Developer apps
Evaluation system Human, auto, locale-specific, image, feature-specific, safety, and red-team evaluation layers. SFT and RLHF pipeline, Responsible AI and safety system, Feedback channels
Responsible AI and safety system Privacy, bias, safety taxonomy, guardrails, legal/cultural review, and feature-specific mitigations. Apple Intelligence features, Training data pipeline, Evaluation system
Feedback channels User ratings/comments, developer Feedback Assistant, evaluation data, and metrics for continuous improvement. Apple Intelligence features, Evaluation system
Developer apps Third-party apps using the on-device Foundation Models framework. Foundation Models framework, Guided generation runtime, Tool calling runtime

Data flow

Data is sourced from licensed, public, open-source, and Applebot-crawled content, filtered for quality, safety, legal compliance, PII, and unsafe material. Text and multimodal data train on-device and server models through staged pretraining, visual encoder alignment, continued pretraining, SFT, tool-use annotation, multilingual expansion, and RLHF. At deployment time, Apple Intelligence routes appropriate work to the compact on-device model or the server model on Private Cloud Compute. Developers use the Foundation Models framework to define Swift output types, have the framework inject the response format, and rely on OS-level constrained and speculative decoding to produce type-conformant outputs. User, developer, evaluation, and safety signals feed continuous improvement.

4 supporting quotes
“Our latest foundation models are optimized to run efficiently on Apple silicon, and include a compact, approximately 3-billion-parameter model”article, stated
“alongside a mixture-of-experts server-based model with a novel architecture tailored for [Private Cloud Compute]”article, stated
“Pre-training was conducted in multiple stages, where the first and most compute-intensive stage targeted the text modality only.”article, stated
“the framework injects the response format into the prompt, and the model is able to understand and adhere to it”article, stated

Why this architecture

Apple splits on-device and server inference because local execution provides privacy and low-latency resource efficiency, while a server MoE model provides higher accuracy and scalability for more complex tasks. Vertical integration with Apple silicon, Swift, the OS daemon, guided generation, and Private Cloud Compute lets Apple optimize the whole stack from model architecture through developer APIs and safety guardrails.

4 supporting quotes
“The on-device model is optimized for efficiency and tailored for Apple silicon, enabling low-latency inference with minimal resource usage”article, stated
“while the server model is designed to deliver high accuracy and scalability for more complex tasks.”article, stated
“This works because of vertical integration with the model, the operating system, and the Swift programming language.”article, stated
“We protect our users’ privacy with powerful on-device processing and groundbreaking infrastructure like Private Cloud Compute.”article, stated

Models used: Apple on-device foundation language model · Apple server foundation model · parallel-track mixture-of-experts · Private Cloud Compute · ViT-g · ViTDet-L · CLIP models · OCR tools · in-house grounding model · in-house image captioning model · teacher model · GPT-4o as a judge · Qwen-2.5-3B · Qwen-3-4B · Gemma-3-4B · Llama-4-Scout · Qwen-3-235B · InternVL-2.5-4B · Qwen-2.5-VL

Scale

Alternatives considered (roads not taken)

Use only cloud/server inference for all Apple Intelligence features

Rejected because: Apple emphasizes local privacy, low latency, minimal resource usage, and the on-device Foundation Models framework.

“The on-device model is optimized for efficiency and tailored for Apple silicon, enabling low-latency inference with minimal resource usage”article, stated
“gives app developers direct access to the on-device foundation language model at the core of Apple Intelligence.”article, stated

Use only on-device inference for every task

Rejected because: The server model is kept for higher accuracy and scalable handling of more complex tasks.

“the server model is designed to deliver high accuracy and scalability for more complex tasks.”article, stated

Train a large dense teacher model from scratch for on-device distillation

Rejected because: Apple sparse-upcycled a MoE teacher from a pretrained 3B model to cut teacher training cost.

“instead of employing a large dense model as the teacher and pre-training it from scratch, we sparse-upcycled a 64-expert, every-2-layer mixture-of-experts”article, stated
“This reduced the cost of training the teacher model by 90%.”article, stated

Rely mainly on heuristic web-data filtering

Rejected because: Apple reduced overly aggressive heuristics and added model-based filtering signals to retain more informative content.

“reducing our reliance on overly aggressive heuristic rules and incorporating more model-based filtering techniques.”article, stated
“we were able to retain more informative content, resulting in a larger and higher-quality pre-training dataset.”article, stated

Use unconstrained text generation for developer outputs

Rejected because: The Foundation Models framework uses guided generation and constrained decoding to conform to Swift-defined output types.

“an OS daemon employs highly optimized, complementary implementations of constrained decoding and speculative decoding to boost inference speed”article, stated
“strong guarantees that the model’s output conforms to the expected format.”article, stated

Patterns

model-routing (deployment)

Apple uses complementary on-device and server foundation models for different privacy, efficiency, accuracy, and complexity requirements.

“Together, they form a complementary suite of solutions adaptable to diverse applications.”article, stated
“the server model is designed to deliver high accuracy and scalability for more complex tasks.”article, stated

privacy-preserving-processing (privacy)

Training excludes private user data, deployment uses on-device processing and Private Cloud Compute, and responsible AI principles include privacy protection.

“We do not use our users’ private personal data or user interactions when training our foundation models.”article, stated
“We protect our users’ privacy with powerful on-device processing and groundbreaking infrastructure like Private Cloud Compute.”article, stated

model-distillation (training)

The on-device model is trained with a distillation loss using a sparse-upcycled MoE teacher to reduce teacher-training cost.

“We trained the on-device model using a distillation loss”article, stated
“This reduced the cost of training the teacher model by 90%.”article, stated

latency-optimization (serving)

Apple uses KV-cache sharing, PT-MoE track parallelism, quantization, ASTC compression, constrained decoding, and speculative decoding to reduce latency and overhead.

“reducing the KV cache memory usage by 37.5% and significantly improving the time-to-first-token.”article, stated
“track-level parallelism enabled by track independence, this design significantly reduced synchronization overhead”article, stated

structured-output-contract (developer-framework)

Guided generation maps Swift types to a response format and uses constrained decoding so model outputs conform to developer-defined types.

“Swift compiler macros, which translate developer-defined types into a standardized output format specification.”article, stated
“strong guarantees that the model’s output conforms to the expected format.”article, stated

tool-use-orchestration (developer-framework)

The Foundation Models framework lets developers provide tools and automatically handles serial and parallel tool-call graphs.

“Tool calling offers developers the power to customize the ~3B model’s abilities by creating tools”article, stated
“the framework automatically and optimally handles the potentially complex call graphs of parallel and serial tool calls.”article, stated

eval-driven-development (evaluation)

Apple uses human graders, auto benchmarks, locale-specific evals, image evaluations, feature-specific adapter evaluations, safety datasets, and red teaming.

“We conducted quality evaluations of our on-device and server-based models offline using human graders.”article, stated
“For foundation models, we combined internal and external human evaluation with auto-grading”article, stated

safety-policy-enforcement (responsible-ai)

Apple uses responsible AI principles, safety taxonomies, built-in guardrails, legal/cultural review, feature-specific safety datasets, and locale-specific red teaming.

“Our safety taxonomy helps us identify sensitive content that should be handled with care.”article, stated
“The framework enforces a base level of safety with built-in safety guardrails to mitigate harmful model input and output.”article, stated

Tradeoffs

Where to run foundation model inference

Chose Hybrid on-device plus Private Cloud Compute server models over A single universal deployment target.

Rationale: On-device inference handles privacy and efficiency; server inference handles high-accuracy, scalable complex tasks.

“The on-device model is optimized for efficiency and tailored for Apple silicon, enabling low-latency inference with minimal resource usage”article, stated
“the server model is designed to deliver high accuracy and scalability for more complex tasks.”article, stated

How to build the on-device teacher cheaply

Chose Sparse-upcycle a 64-expert MoE from a pretrained 3B model over Pretrain a large dense teacher from scratch.

Rationale: Sparse-upcycling reduced teacher-training cost by 90% while supporting distillation for the compact model.

“we sparse-upcycled a 64-expert, every-2-layer mixture-of-experts (MoE) from a pre-trained ~3B model”article, stated
“This reduced the cost of training the teacher model by 90%.”article, stated

How to expose model outputs to developers

Chose Swift guided generation with constrained decoding over Free-form text outputs that developers parse manually.

Rationale: The vertical integration creates Swift-type outputs with format guarantees and simpler developer code.

“developers work directly with rich Swift data structures by adding a @Generable macro annotation to Swift structs or enums.”article, stated
“letting app developers write much simpler code, backed by the Swift type system.”article, stated

How to compress models for production

Chose Aggressive quantization and ASTC compression with recovery adapters over Keeping uncompressed weights for maximum raw quality.

Rationale: Compression enables practical deployment with only slight quality regressions or occasional minor improvements.

3 supporting quotes
“We compressed the on-device model to 2 bits per weight (bpw) using Quantization-Aware-Training”article, stated
“The server model was compressed using a block-based texture compression method known as Adaptive Scalable Texture Compression (ASTC)”article, stated
“With these techniques, we observe some slight quality regressions and even minor improvements”article, stated

How to evaluate multilingual expansion

Chose Locale-specific native-speaker and human evaluation over Simple translation-based evaluation.

Rationale: Apple evaluates whether responses sound native and use appropriate local terms, not just whether they are translated.

“we expanded our evaluation task set to be locale-specific.”article, stated
“Graders could flag the model’s response for a number of issues, including unlocalized terms or unnatural phrases.”article, stated

Gotchas (what bit them)

On-device models must reduce memory and token latency without losing too much quality.

Root cause: Mobile deployment faces KV-cache, power, and resource constraints.

Resolution: Use block-level KV cache sharing, quantization-aware training, embedding/KV-cache quantization, and adapter recovery.

“reducing the KV cache memory usage by 37.5% and significantly improving the time-to-first-token.”article, stated
“With these techniques, we observe some slight quality regressions and even minor improvements”article, stated

Server model parallelism can waste latency on synchronization.

Root cause: Traditional tensor parallelism synchronizes more frequently across layers.

Resolution: Use PT-MoE track blocks that process independently and synchronize only at input/output boundaries.

“synchronization applied only at the input and output boundaries of each track block.”article, stated
“we reduce the synchronization overhead from 2L (tensor parallelism) to L/D (track parallelism).”article, stated

Web-scale training data needs more than heuristic filtering.

Root cause: Web data is noisy, and overly aggressive rules remove informative content.

Resolution: Add model-informed filtering signals, high-fidelity HTML extraction, dynamic rendering, legal/safety filters, and quality checks.

“Given the noisy nature of the web, Applebot employs advanced crawling strategies to prioritize high-quality and diverse content.”article, stated
“By introducing model-informed signals, we were able to retain more informative content”article, stated

Multimodal and multilingual expansion can damage existing text capability if adaptation is not controlled.

Root cause: New visual, long-context, code, math, and multilingual training stages change the model distribution.

Resolution: Use staged continued pretraining and explicitly train multimodal adaptation without damaging text capabilities.

“We then incorporated visual understanding through multimodal adaptation without damaging the text capabilities of the models.”article, stated

Locale support is not just translation accuracy.

Root cause: Responses must be native-sounding and culturally appropriate for each locale.

Resolution: Use native-speaker prompts, locale-specific evaluation categories, legal/cultural experts, regional datasets, and locale red teaming.

“Human graders assessed the model’s ability to produce a response that was native-sounding to a user in that locale.”article, stated
“engaged with internal and external legal, language, and cultural experts”article, stated

Adapters are powerful but create version-management overhead.

Root cause: Adapters are tied to the base model version.

Resolution: Reserve adapter training for advanced use cases after exploring the base model, and retrain adapters for each new base model version.

“adapters must be retrained with each new version of the base model”article, stated
“deploying one should be considered for advanced use cases after thoroughly exploring the capabilities of the base model.”article, stated

Evaluation

Apple evaluates on-device and server models with human graders, standard language/reasoning categories, locale-specific human evaluation, GPT-4o-as-judge auto evals, side-by-side comparisons with external models, image-understanding evals, feature-specific adapter evals, targeted safety datasets, internal/external human evaluation, auto-grading, human red teaming, and user/developer feedback.

Metrics: human preference rates · standard language and reasoning capability categories · tool-use evaluation · locale-specific native-sounding quality · GPT-4o judge alignment with human evals · image-question evaluation categories · feature-specific extraction accuracy · safety high-risk content datasets · culture-specific risk and bias evaluations · thumbs up/down user feedback · developer Feedback Assistant reports

4 supporting quotes
“We conducted quality evaluations of our on-device and server-based models offline using human graders.”article, stated
“we used the Instruction Following eval (IFEval) and Alpaca Evals with GPT-4o as a judge.”article, stated
“an evaluation set of Image-Question pairs was used to assess Image Understanding capabilities.”article, stated
“For individual features, we designed datasets that focus on user-facing risks to specifically identify unwanted or unintended outcomes”article, stated

Outcomes

The deployment combines 15-language support, a 3B on-device model, a server MoE model, hundreds of billions of crawled pages, 14T server pretraining text tokens, over 10B image-text pairs, 175M interleaved documents, 550M images, 5B generated caption pairs, 65K-token long-context training, and cross-device developer access via the Foundation Models framework.

6 supporting quotes
“gives app developers direct access to the on-device foundation language model at the core of Apple Intelligence.”article, stated
“reducing the KV cache memory usage by 37.5% and significantly improving the time-to-first-token.”article, stated
“For example, if D = 4, PT reduces 87.5% of the synchronization overhead.”article, stated
“This reduced the cost of training the teacher model by 90%.”article, stated
“we trained the sparse server model from scratch on 14T text tokens.”article, stated
“Feedback from users and developers, along with evaluation data and other metrics, helps us continuously improve Apple Intelligence features and models.”article, stated