Cognibiz

Apple Neural Engine M4 / A18: how on-device AI worksapple.com

AI technologies, organized by technology area.

M4 iPad Pro, introduced by Apple in 2024. The Neural Engine is integrated into the chip.Inset: An integrated neural engine performs on-device processing.Credit and source

The sketch explained

Neural Engine: processing data on the device

On the left, the device supplies data. On the right, the chip combines several compute engines: CPU, GPU and Neural Engine. The Neural Engine handles compatible neural-network operations.

On a small screen, scroll the diagram horizontally to read its labels.

Neural Engine: processing data on the deviceDevice data · Neural Engine · System chip · Local result · CPU · GPUDevice dataSystem chipCPUGPUNeural EngineLocal result
Device data
An image or other data can be processed on the device.
Neural Engine
This specialized engine runs the operations assigned to it.
System chip
CPU, GPU and Neural Engine have complementary roles.
Local result
The result returns to the application; this path illustrates on-device processing.
CPU
The general-purpose processor runs application logic, among other tasks.
GPU
The graphics processor can execute parallel computing operations.
Functional diagram, not an M4 or A18 silicon floorplan. Core ML can distribute operations across available engines; an entire model does not necessarily run on the Neural Engine.Technical documentation
Updated

UNDERSTANDING THE SYSTEM

Apple Neural Engine M4 / A18: how on-device AI works

The Neural Engine accelerates selected model operations within a system combining a CPU, GPU and memory. Its benefit depends on the converted graph, data types, input sizes and software. This dossier separates the M4 and A18 announcements, explains how to evaluate a complete application, and sets out the conditions for genuinely local processing.

02 / CHAPTER

Two chips, different contexts and separate claims

The Neural Engine is a specialized block integrated into a system on a chip, rather than a separate graphics card. M4, announced on 7 May 2024 with iPad Pro, and A18, announced on 9 September 2024 with iPhone 16 and 16 Plus, belong to different device families. This dossier covers those historical products. It does not present them as the latest available generations or automatically extend base M4 specifications to Pro or Max variants, or A18 specifications to A18 Pro.

Apple specifies a 16-core Neural Engine for both chips. For M4, it advertises up to 38 trillion operations per second, or 38 TOPS. For A18, the selected launch announcement says machine learning models run up to twice as fast as on A16 Bionic. It does not provide a directly comparable A18 TOPS figure. An identical core count establishes neither identical microarchitecture nor identical latency.

TOPS is a stated arithmetic throughput under supplier-defined conditions, not a number of answers per second for any arbitrary model. Numerical type, operation counting, memory access, non-accelerated work and sustained execution all matter. Without a common protocol, comparing that figure with another supplier’s TOPS does not rank application performance.

Two chips, different contexts and separate claims
Reference pointM4 at launchA18 at launch
Device in announcementiPad Pro, May 2024iPhone 16 and 16 Plus, September 2024
Neural Engine16 cores; up to 38 TOPS advertised16 cores; no TOPS figure adopted here
Published comparisonAdvertised peak Neural Engine throughputML models up to 2× faster than on A16 Bionic
What this does not measureEnd-to-end application latency, quality and battery lifeA universal gain for every model or a direct comparison with M4

References for this chapter[1][2]

03 / CHAPTER

The Neural Engine works alongside the CPU and GPU

An application first transforms data into model inputs, runs a graph of operations, and interprets the outputs. The CPU can handle control and transformations, the GPU provides another parallel compute path, and the Neural Engine can execute compatible subgraphs. Core ML provides a high-level interface and distributes work according to the model, permitted compute units and system. Having a Neural Engine in the device therefore does not mean every AI feature uses it exclusively.

Automatic placement is an execution decision. Permitting ALL lets Core ML choose among CPU, GPU and Neural Engine. CPU_AND_NE permits the CPU and Neural Engine while excluding the GPU. This second option does not force every operation onto the Neural Engine and is not a “Neural Engine only” mode. A compatible operation may still run elsewhere if the selected plan calls for it. Permission, support and actual placement are three different concepts.

Unified memory avoids assuming that each engine necessarily has its own separate graphics memory. It does not remove memory accesses, temporary allocations, layout transformations or coordination costs between engines. A fragmented partition can erase a local speed-up. The useful target is the entire path that responds to the user, including work outside the model.

One graph can use several compute engines

Functional diagram of a hypothetical placement, without measurements or a physical wiring map. Lower links represent access to shared memory; upper arrows represent computation dependencies. Nodes represent operations, not cores.

CPU: control and general operations
The boxed nodes represent an initial subgraph. Preparation, control and operations not assigned to another engine may remain on the CPU.
Neural Engine: a compatible subgraph
The central group represents a portion that may be accelerated. Execution depends on the graph, numerical type and Core ML’s placement decision.
GPU: another permitted path
The last group illustrates another possible assignment when the GPU is permitted. Shared memory does not guarantee the absence of copies or synchronization.

References for this chapter[3][5][6]

04 / CHAPTER

Converting a model does not guarantee its placement

Core ML Tools prepares and converts models into the Core ML format; the Core ML framework loads and runs them inside an application. A successful conversion establishes that an artifact could be produced for the selected target. It does not guarantee that every operation is supported by the Neural Engine, every input shape is efficient, or predictions retain the original model’s quality. Tool versions and the minimum operating system target belong in the deliverable’s definition.

Tensor shapes, such as batch, channels, height and width for an image, influence possible optimizations. Fixed shapes or a finite set of shapes may give the compiler opportunities that highly flexible dimensions make difficult. The documentation offers EnumeratedShapes and bounded ranges. This choice should reflect the product: a photo application can normalize image sizes, while a language model must explicitly handle allowed sequence lengths and the cost of long inputs.

The Xcode performance report distinguishes supported operations from the compute units actually chosen. The tools presented in 2024 add hints about incompatibilities, estimated relative costs and MLComputePlan. An estimated relative cost helps locate a bottleneck; it is not an independent timing of each operation. A remedy may involve changing a type, operation or shape, then checking quality and placement again on the intended devices.

References for this chapter[5][7][3]

05 / CHAPTER

Memory and compression determine which model fits

A useful first budget counts the weights. For a hypothetical model with one billion parameters, raw size is parameters × bits per weight / 8. In decimal units, that gives 2 GB at 16 bits, 1 GB at 8 bits and 0.5 GB at 4 bits. These are teaching calculations, not the size of an Apple model, an iPhone memory capacity or a promise that the model will load on M4 or A18.

Peak runtime memory also includes activations, buffers, model state, compression metadata, possible conversions and application resources. For autoregressive generation with an attention cache, state grows particularly with context length and concurrent requests. Memory is shared with the operating system: subtracting weight size from an advertised capacity does not produce a reliable application budget. Measure the peak during the most demanding workflow.

Quantization reduces numerical precision; palettization represents weights as indices into a value table; pruning exploits a representation containing zeros. Storage savings do not automatically become latency savings. Format, granularity, decompression, hardware and operating system version matter. Apple’s 2024 presentation illustrates that trade-off with compression variants; its demonstration results do not guarantee results for another application.

Weights alone: a minimum budget, not peak memory

Bar lengths are proportional to 2, 1 and 0.5 GB for one billion hypothetical weights. No bar represents a device measurement. Additional allocations are not quantified.

  1. 16 bits: 2 GB

    Raw reference at two bytes per weight. The chart excludes activations and generation state.

  2. 8 bits: 1 GB

    Half the 16-bit raw size. Format and metadata can change actual size and quality.

  3. 4 bits: 0.5 GB

    One quarter of the raw reference. This establishes neither native 4-bit computation for every operator nor a fourfold speed-up.

Memory and compression determine which model fits
Assumption: one billion weightsCalculated raw sizeExcluded items
16 bits per weight2 GBActivations, state, buffers, operating system
8 bits per weight1 GBScales, metadata and other allocations
4 bits per weight0.5 GBPossible lookup tables, decompression and other allocations

References for this chapter[8][4]

06 / CHAPTER

Why tensor layout can change practical performance

Two mathematically equivalent graphs can use different buffers and engines. Transposing or rearranging a tensor is not always just a metadata change: it may require a copy. A Transformer’s attention computation can also produce large intermediate tensors. Optimization can therefore pay off through avoided transfers and improved data reuse, beyond the arithmetic operation count.

Apple’s June 2022 study of Transformers on the ANE provides a verifiable historical example. It examines a four-dimensional, channels-first layout, splitting attention tensors and reducing reshapes. Its (B, C, 1, S) shape describes batch, channels and sequence. That study predates M4 and A18: its buffer constraints and iPhone 13 results are not presented as specifications or measurements for these two chips.

The transferable lesson is a method: inspect the produced graph, test a controlled rewrite, verify equivalent outputs, and measure on the target. Long context can change both memory use and latency; increasing batch size may improve reuse while worsening the delay for an individual request. Copying an old tensor recipe without profiling may shift the problem rather than solve it.

References for this chapter[9][7][4]

07 / CHAPTER

Concrete uses and a checkable conversion example

At M4’s launch, Apple cited isolating a subject in 4K video in Final Cut Pro and real-time music notation in StaffPad. These are supplier examples for the iPad Pro of that period. They illustrate uses of a hardware and software pipeline; they do not establish that every stage runs on the Neural Engine or that a third-party model will behave the same way. For a professional prototype, image segmentation or local classification often provides a more controllable scope than a general assistant promise.

The code below builds a tiny convolution with deterministic weights, without downloading or training a model, then produces an ML program. Every expected output is 3 × 0.25 + 0.5 = 1.25, with shape (1, 2, 4, 4). The numerical check detects a basic conversion failure. It validates neither a business task, Neural Engine usage nor performance. ALL leaves automatic placement unrestricted.

Core ML Tools Python prediction requires a compatible macOS environment. This code was not executed here and no dependency was installed. Versions should be pinned in the test project. For a real application, replace the toy with an authorized model, its actual preprocessing and a representative reference dataset, with quality metrics established before optimization.

import numpy as np
import torch
import coremltools as ct

layer = torch.nn.Conv2d(3, 2, kernel_size=1).eval()
with torch.no_grad():
    layer.weight.fill_(0.25)
    layer.bias.fill_(0.5)
x = torch.ones(1, 3, 4, 4)
traced = torch.jit.trace(layer, x)
model = ct.convert(
    traced,
    inputs=[ct.TensorType(name="input", shape=tuple(x.shape))],
    convert_to="mlprogram",
    minimum_deployment_target=ct.target.iOS18,
    compute_precision=ct.precision.FLOAT16,
    compute_units=ct.ComputeUnit.ALL,
)
model.save("ToyConv.mlpackage")
result = model.predict({"input": x.numpy()})
y = next(iter(result.values()))
assert y.shape == (1, 2, 4, 4)
np.testing.assert_allclose(y, 1.25, rtol=1e-3, atol=1e-3)
Documentary Core ML Tools API example: deterministic convolution, iOS 18 minimum target and all compute units permitted. Prediction would run on the host Mac, not remotely on an A18 iPhone.

References for this chapter[1][5][6]

08 / CHAPTER

Measure the full experience on the target device

Start with a device and operating system matrix, separating M4 from A18 configurations. Fix the model, hashes, compilation options, input shapes, numerical format and test dataset. Record compilation, initial loading, first prediction and warmed-up predictions separately. The speed of a prediction call alone does not represent capture → preparation → model → display latency.

Compare CPU_ONLY, CPU_AND_GPU, CPU_AND_NE and ALL where those modes are available in the selected environment. Keep the data and quality criteria identical, inspect placement, then measure latency distributions and peak memory. Document temperature, power supply, battery state, concurrent tasks and duration. A short cold run cannot establish behavior during continuous processing under thermal constraints.

For a camera stream, also count dropped frames and impact on the interface. For a generative model, separate time to first output, subsequent throughput, context length and generated length. Evaluate business-relevant errors, especially after compression and on difficult cases. Xcode reports and Instruments help isolate bottlenecks; their internal estimates and an end-to-end measurement must remain identified as different observations.

Functional acceptance
Set minimum quality and failure cases before looking for the fastest mode.
Sustained-load acceptance
Maintain latency, memory use and responsiveness in the real workflow; do not extrapolate from TOPS.
Traceability
Archive the model, versions, settings, test data and reports so the decision can be reproduced.

References for this chapter[10][3][6]

09 / CHAPTER

Local processing is a property of the data workflow

A locally executed model can process inputs without sending them to a server for inference. That benefit depends on the whole application: acquisition, logs, telemetry, backups, synchronization and any third-party services must be examined. The Neural Engine does not create a privacy policy by itself or guarantee that no data leaves the device. A model may be downloaded beforehand while its subsequent predictions still run locally.

Apple Intelligence and a third-party application using Core ML are distinct scopes. Apple’s June 2024 announcement describes a combination of on-device processing and Private Cloud Compute for more complex requests. Computation on those servers remains remote processing, even with specific architectural protections. Do not label all Apple Intelligence as offline or automatically attribute its security architecture to a third-party app.

A concrete protocol documents permitted data flows, prepares required resources, tests the workflow without a network, and inspects network output and logs in the test environment. Offline operation in one case does not establish the absence of all transmission in every case. Retention, access and deletion requirements belong in product design independently of the choice of CPU, GPU or Neural Engine.

References for this chapter[12][3][9]

10 / CHAPTER

Choose for the product, model and device fleet

The Neural Engine is a relevant option when a product targets compatible Apple devices, a model can be prepared for Core ML, and goals favor local processing, low latency or controlled energy use. The investment involves the graph, data and testing as much as hardware. A fleet combining phones and Macs needs distinct profiles; sharing a processor brand is not a performance contract.

Apple documents a separate GPU path for training models. Neural Engine availability must not be turned into a promise of general-purpose training on that accelerator. For inference requiring unsupported operations or different control, compare appropriate GPU and CPU paths. A server architecture may be needed for models too large for the device, but changes connectivity, cost and privacy trade-offs. No option is superior for every model.

A defensible decision specifies a target device, versioned model, minimum quality, measured memory budget, sustained latency and documented data workflow. Repeat testing after changes to the graph, format, operating system or fleet. This dossier provides no M4/A18 benchmark, no inferred A18 TOPS figure and no universal guarantee of acceleration or privacy.

References for this chapter[11][3][8][12]

ORIGINAL DOCUMENT

Catalog record

1. Foundations: hardware, silicon and accelerators

Apple apple.com Neural Engine (M4 series / A18) — Innovation: 8, Adoption: 10

8/10Innovation
10/10Adoption

Editorial source: Taxonomie des Technologies d'Intelligence Artificielle · § 5387. Addresses restored with dots; innovation and adoption scores remain those of the document.

VERIFY AND EXPLORE

References

Primary Apple sources and Core ML documentation accessed on 4 November 2026. The 2024 announcements and 2022 ANE study are dated explicitly; no M4 or A18 hardware experiment was run for this dossier.

  1. 01
    M4 announcement, 7 May 2024

    Source for launch, 16 cores, advertised 38 TOPS and Final Cut Pro/StaffPad examples; not an independent measurement.

    www.apple.com ·
  2. 02
    iPhone 16 and A18 announcement, 9 September 2024

    Source for 16 cores and the advertised up to 2× ML gain over A16 Bionic; no A18 TOPS figure is inferred.

    www.apple.com ·
  3. 03
    Deploy models with Core ML — WWDC24

    CPU/GPU/Neural Engine dispatch, reports, support and estimated costs; distinguishes estimates from measurements.

    developer.apple.com ·
  4. 04
    Prepare models for Apple silicon — WWDC24

    Compression, state and Transformer optimization in the software context presented in 2024.

    developer.apple.com ·
  5. 05
    Core ML Tools: loading and conversion

    Artifacts, deployment target and definitions of the four compute-unit sets.

    apple.github.io ·
  6. 06
    Core ML Tools: prediction

    Prediction comparison, compute-unit selection and macOS requirement for Python prediction.

    apple.github.io ·
  7. 07
    Core ML Tools: flexible input shapes

    Fixed, enumerated or bounded shapes; permitted dimensions affect optimization opportunities.

    apple.github.io ·
  8. 08
    Core ML Tools: optimization overview

    Size, latency, energy and quality trade-offs after compression.

    apple.github.io ·
  9. 09
    Transformers on the Apple Neural Engine — 2022 study

    Earlier example of layouts and memory traffic; its constraints and results are not M4/A18 specifications.

    machinelearning.apple.com ·
  10. 10
    Optimize Core ML usage — WWDC22

    Compilation/loading/prediction distinction and the difference between support and actual placement.

    developer.apple.com ·
  11. 11
    Train models on Apple GPUs — WWDC24

    GPU training path, separate from Neural Engine inference described in this dossier.

    developer.apple.com ·
  12. 12
    Apple Intelligence announcement, 10 June 2024

    Announced architecture combining on-device processing and Private Cloud Compute; no current availability is inferred.

    www.apple.com ·

Catalog provenance

Taxonomie des Technologies d'Intelligence Artificielle · Google Docs

Source document consulted on . § 5387.

Websites cited in the record

A website’s inclusion in the catalog does not verify the versions, projections or results mentioned in the document.

FROM KNOWLEDGE TO PROJECT

Apply this knowledge to your context.

Scope, architecture, roadmap and notes: keep your decisions in the dedicated space.

Open dedicated space