Skip to content

Apple Foundation Models architecture and public APIs

Apple Foundation Models architecture and public APIs

Apple introduced Apple Intelligence in June 2024, including writing tools and other user-facing features. Its published 2024 and 2025 model reports describe Apple Foundation Models: optimized on-device and server models. This article explains those documented generations and the public Foundation Models developer framework; it does not treat an old announcement as breaking 2026 news.

Sources: Apple foundation models June 2024; Apple model update June 2025

The engineering question is where to run inference and how to expose it safely to apps. Apple combines local models, task adaptation and PCC for selected Apple Intelligence workloads. These choices may change latency, privacy and server costs, but do not automatically replace every hosted LLM or guarantee a particular quality level.

Sources: Apple foundation models June 2024; Apple model update June 2025

The Dual-Engine Architecture: On-Device vs. Server

The cited research describes an on-device model and a larger server model within a broader family, not an exhaustive two-model product catalog.

Sources: Apple foundation models June 2024; Apple model update June 2025

  • On-device: the 2024/2025 reports describe an approximately 3-billion-parameter language model optimized for supported Apple silicon devices. Availability depends on device eligibility, OS, language, region, model readiness and Apple Intelligence settings, not simply membership in the A- or M-series.

    Sources: Apple model update June 2025; Apple WWDC 2025 Meet the Foundation Models framework

  • AFM-Server: A larger, cloud-based foundation model designed to run on Apple Silicon servers (using Private Cloud Compute) to handle highly complex reasoning tasks while maintaining strict user privacy.

These are transformer-based models with generation-specific training and inference optimizations. The 2025 on-device design shares KV caches; its server model uses a parallel-track mixture-of-experts design. Distillation, quantization and adaptation are techniques to evaluate in context, not a single fixed recipe for all AFM versions.

Sources: Apple model update June 2025

How Apple Squeezed a 3B Parameter Model into Your Pocket

Three billion FP16 weights alone occupy about 6 GB in decimal units. Inference also needs activations, caches and runtime memory. Apple silicon uses unified memory rather than a separate mandatory 6 GB VRAM allocation. Resource pressure depends on the workload; immediate OS failure or app crashes cannot be inferred from the weight count alone.

Sources: Apple foundation models June 2024

To solve this, Apple's engineers employed several cutting-edge optimization techniques:

1. Palettization and Low-Bit Quantization

Apple’s 2024 report describes low-bit palettization with mixed 2-bit and 4-bit configurations, averaging 3.7 bits per weight in one reported setup. Its 2025 model instead emphasizes 2-bit quantization-aware training. Palettization is not an Apple-only mathematical invention; accuracy claims apply to the reported evaluations, not every task.

Sources: Apple foundation models June 2024; Apple model update June 2025

Compressed weight size is not total resident memory: tables, embeddings, caches, adapters and runtime overhead also matter. A sub 1.5 GB weight estimate is therefore not a guarantee that an app’s complete model workload fits under 1.5 GB or leaves abundant memory free.

Sources: Apple foundation models June 2024

2. Low-Rank Adaptation (LoRA) Adapters

Task adapters can specialize a pretrained base without storing a complete fine-tuned copy for every task, including summarization or writing. Keeping base weights fixed during adapter training does not imply that every application permanently holds an entire frozen model in RAM.

Sources: Apple foundation models June 2024

LoRA represents task-specific updates with low-rank matrices. Adapters can be loaded for the needed task, reducing duplication relative to full model copies. The original 100 MB adapter size and exact summarization-to-tone swap are conceptual examples, not verified AFM runtime specifications; adapter sizes and deployment interfaces vary.

Sources: Apple foundation models June 2024

Here is a conceptual look at how this architecture behaves at runtime:

Conceptual data flow (not a measured memory layout):
Supported device → system base model + selected adaptation → inference
Base weights, adapter size, caches and compute placement depend on version.

Sources: Apple foundation models June 2024; Apple model update June 2025

The Private Cloud Compute (PCC) Frontier

Apple Intelligence can use PCC for selected requests needing server-side models. That architecture is distinct from the public on-device Foundation Models framework: a third-party session is not a general-purpose PCC endpoint or a promise of automatic cloud fallback.

Sources: Apple PCC security architecture; Apple WWDC 2025 Meet the Foundation Models framework

PCC uses custom Apple silicon and a hardened system designed not to retain personal request data after processing. Attestation and transparency mechanisms constrain which software a device will trust. This does not mean the whole server has no persistent software storage, that every component is open source, or that trust and vulnerabilities disappear; it is a specific, inspectable security design.

Sources: Apple PCC security architecture

Getting Your Hands Dirty: Coding with Apple's On-Device Models

For Apple’s system on-device language model, use the Foundation Models framework on supported OS versions and devices, and check SystemLanguageModel availability at runtime. Core ML is a separate route for compatible models you supply; Translation and Natural Language are not generic AFM weight-loading APIs.

Sources: Apple WWDC 2025 Meet the Foundation Models framework; Apple WWDC 2025 Meet the Foundation Models framework

The original OptimizedAFM_3B.mlmodelc, Tokenizer and MappedFeatureProvider were undefined placeholders, not downloadable AFM assets or a complete generation loop. OpenELM is a separate model family. The illustrative Swift code below uses the public framework instead; a custom Core ML model would require real weights, tokenizer, input/output schema and iterative decoding matched to that model.

Sources: Apple WWDC 2025 Meet the Foundation Models framework

import FoundationModels

@available(iOS 26.0, macOS 26.0, *)
func generateReply(to prompt: String) async throws -> String? {
    guard case .available = SystemLanguageModel.default.availability else {
        return nil // The caller should present a useful non-AI fallback.
    }
    let session = LanguageModelSession()
    let response = try await session.respond(to: prompt)
    return response.content
}

Sources: Apple WWDC 2025 Meet the Foundation Models framework; Apple WWDC 2025 Meet the Foundation Models framework

Core ML’s computeUnits = .all permits eligible CPU, GPU and Neural Engine execution; it does not force every operation onto the ANE or guarantee zero copies. Foundation Models manages its own inference. Unified memory can reduce transfer overhead, but actual latency and memory behavior must be measured for the model, device and OS.

Sources: Apple WWDC 2022 Optimize your Core ML usage; Apple WWDC 2025 Meet the Foundation Models framework

Why This Matters for Software Architects

If you are architecting modern software systems, Apple's investment in foundation models points to three major trends you cannot afford to ignore:

1. Lower per-request server cost, not zero total cost

Moving suitable text generation or summarization onto a supported device can avoid a hosted-model request charge. A 100,000-user, 50-query/day scenario illustrates volume, not a measured bill. Development, device energy, evaluation, distribution, support and any fallback services still cost resources. Do not assume the framework exposes every semantic-search or embedding capability.

Sources: Apple WWDC 2025 Meet the Foundation Models framework

2. True Offline Capability

Once the supported model is available on the device, local generation can operate without network access. Downloads, eligibility, language support and app tools may still depend on network services. Provide a useful unavailable state; offline execution does not itself prove higher retention or reliability.

Sources: Apple WWDC 2025 Meet the Foundation Models framework; Apple WWDC 2025 Meet the Foundation Models framework

3. Privacy-First UX as a Competitive Advantage

On-device processing can reduce disclosure of sensitive inputs to a server. It does not automatically satisfy healthcare, legal, financial or residency rules. Review what the app stores, logs and sends through tools, the intended use and applicable requirements. PCC’s design is not an out-of-the-box compliance certificate for third-party apps.

Sources: Apple PCC security architecture; Apple WWDC 2025 Meet the Foundation Models framework

Wrapping Up

Apple’s documented models show how hardware-aware architecture, low-bit weights and adapters can make selected AI tasks practical on devices. They do not establish that every task can leave the datacenter, nor that local inference is always cheaper, greener or more accurate.

Sources: Apple foundation models June 2024; Apple model update June 2025

Treat local AI as a capability to evaluate alongside cloud services: check availability, bounded context, supported tasks, quality and privacy, then design a clear fallback. It is a system resource, but not interchangeable with a deterministic file-system or camera API.

Sources: Apple WWDC 2025 Meet the Foundation Models framework; Apple WWDC 2025 Meet the Foundation Models framework

Are you evaluating on-device AI or moving a suitable cloud workload locally? Share the task, supported devices and measured trade-offs in the comments. The archived source mentioned sysseder forums but supplied no verified forum URL, so no forum destination is invented here.

Sources: Apple WWDC 2025 Meet the Foundation Models framework

Happy coding!
— Alex

Primary references

Post a Comment

Previous Post Next Post