2.9×
the X2 Elite's GPU speed at reading the prompt, on the M5 with Gemma 3 1B. On the CPU, the X2 Elite leads by 1.9×
Hardware, 27 July 2026
Apple M5 against Snapdragon X2 Elite.
A MacBook Air against a Qualcomm reference board on AI work: CPU, GPU and NPU, inference and training, with the same llama.cpp release and byte-identical weights.
Written by
What the tests measure
- llama.cpp
- An open-source program that runs language models on a CPU or a GPU. On the GPU it works through Metal, Apple's way into its GPU, on the M5, and through OpenCL, an open standard, on the X2's Adreno GPU.
- Prefill and decode
- Prefill reads the prompt, many tokens (small pieces of text) at once, so the chip's arithmetic sets its speed. Decode writes the reply one token at a time and reads the whole model from memory for each, so memory speed caps it. The two machines read memory at almost the same rate, which helps keep their decode gaps smaller than their prefill gaps.
- Q4_0 and Q4_K_M
- Quantized formats: ways of storing a model's numbers, its weights, in about 4 bits, smaller and faster at some cost in accuracy. Every llama.cpp speed here uses Q4_0, the one format fairly optimised on all four engines (both CPUs, Metal and OpenCL), except where it is compared with Q4_K_M, the format people more often ship.
- NPU
- A processor built for AI work: Apple's Neural Engine and Qualcomm's Hexagon. Each was given the same matrix maths, the core of a model, in 16-bit (fp16) and 8-bit (int8) numbers, measured in TFLOP/s: trillions of calculations a second.
- PyTorch
- The most used library for training models. Its speed here is the same TFLOP/s, on a small piece of a model learning from data.
- Perplexity
- How surprised a model is by real text; lower is better. It measures what a format costs in accuracy.
What we found
The M5 wins every llama.cpp GPU test
The M5's GPU, through Metal, ran prefill 2.1× to 3.1× as fast as the X2 Elite's GPU through OpenCL, and decode 1.4× to 1.9× as fast.
The X2 Elite wins every llama.cpp CPU test
Its Oryon cores, at their best of 8 to 18 threads, beat the M5's 10 cores: 1.9× to 3.2× on prefill, but only 1.1× to 1.4× on decode.
The NPUs nearly tie in 16-bit numbers
In fp16, Hexagon did 15.2 TFLOP/s and the Neural Engine 14.1. The int8 results are not like for like: each chip ran a different 8-bit scheme, so they do not rank the chips.
Training on the X2 looks held back by software
PyTorch trained one transformer block at 0.11 to 0.12 TFLOP/s on the X2's CPU at 4, 12 or 18 threads, against 1.25 on the M5's. A raw matrix multiply was as flat, which points to PyTorch's Windows on Arm build, not the chip.
Q4_0's speed costs some accuracy
Q4_0 ran up to 2.5× as fast as Q4_K_M on the CPU, but its perplexity was about 17% higher than Q4_K_M's on both machines.
With a desk fan on it, the Air lost some decode and stayed faster
Over a 10-minute loop it kept 98.8% of its peak prefill and 89.4% of its peak decode; the cooled X2 board kept 99.1% and 98.2%. In tok/s the Air stayed ahead: 496 against 305 on prefill, 19.5 against 17.8 on decode.
The results
The GPU goes to the M5, the CPU to the X2 Elite
On the GPU
Gemma 3 1B prefill, 512 tokens
M5 5,604, X2 1,921
2.9×Gemma 3 1B prefill, 2,048 tokens
M5 5,293, X2 1,712
3.1×Gemma 3 1B decode
M5 143.8, X2 74.5
1.9×Qwen3 8B prefill, 512 tokens
M5 642.6, X2 306.1
2.1×Qwen3 8B prefill, 2,048 tokens
M5 561.7, X2 254.4
2.2×Qwen3 8B decode
M5 25.6, X2 18.2
1.4×
On the CPU
Gemma 3 1B prefill, 512 tokens
M5 889.2, X2 1,689
1.9×Gemma 3 1B decode
M5 116.3, X2 127.9
1.1×Qwen3 8B prefill, 512 tokens
M5 85.3, X2 270.7
3.2×Qwen3 8B decode
M5 17.2, X2 23.4
1.4×
Bar length is on a log scale that starts at 1× on the centre line, so 2× sits halfway to 4×. Each row's second line is tokens per second, with each machine's best thread count on the CPU. On the X2 the CPU decodes faster than its own GPU: 127.9 against 74.5 tok/s on Gemma 3 1B, 23.4 against 18.2 tok/s on Qwen3 8B.
Each NPU's matrix speed, in 16-bit and 8-bit numbers
Apple M5, Neural EngineX2 Elite, Hexagon
fp16
TFLOP/s, the same test on both
M5 14.1X2 15.2int8
TFLOP/s, a different scheme on each chip
M5 15.6X2 8.6
In int8 the Neural Engine stored the weights in 8 bits, while Hexagon added steps that convert to and from 8 bits around the maths, which cost it more than they saved at this size. Both are counted as the same work, in TFLOP/s.
The M5 also runs a language model on its NPU: Anemll, an open-source project that compiles models for the Neural Engine, gives 2,616 tok/s prefill and 47 tok/s decode on Llama 3.2 1B. For Hexagon we found no generative runtime that installs without a Qualcomm developer account or a build from source; Qualcomm's own Genie was not tried.
The M5 trained about 11× faster on its CPU, and the X2's GPU could not train
One transformer block, the unit a language model repeats, learning from batches of 8 × 512 tokens in 32-bit numbers (fp32).
Apple M5X2 Elite
CPU
TFLOP/s
M5 1.25X2 0.11 to 0.12, at 4, 12 or 18 threadsGPU
TFLOP/s
M5 2.30, MPSX2: no PyTorch backend for Adreno
MPS is PyTorch's way into Apple's GPU. Nor could the X2's GPU train through ggml, the library under llama.cpp: its OpenCL backend lacks a needed function, memset_tensor, while the same program trains on the CPU.
Switching to Q4_K_M costs 6% to 60% of the speed
Gemma 3 1B moved from Q4_0 to Q4_K_M. A longer bar is a bigger loss, and the two machines lose in different places.
Apple M5X2 Elite
CPU prefill
M5 −43%X2 −60%CPU decode
M5 −39%X2 −15%GPU prefill
M5 −17%X2 −6%GPU decode
M5 −38%X2 −12%
Gemma 3 1B's perplexity in each format, on each GPU
Gemma 3 1B scored with llama.cpp's perplexity tool on a byte-identical wikitext-2 corpus, 40 chunks, on each GPU.
Swipe the table sideways for more columns.
| Gemma 3 1B | Apple M5 | Snapdragon X2 Elite | Difference |
|---|---|---|---|
| Q4_0 | 34.4694 ± 1.30 | 34.6233 ± 1.31 | 0.45% |
| Q4_K_M | 29.5493 ± 1.08 | 29.5508 ± 1.08 | 0.005% |
| Added by Q4_0 | +16.7% | +17.2% |
The ± is the tool's own error estimate. The report puts the Q4_0 gap down to small differences between the Metal and OpenCL code for that format, not an error.
Over ten minutes the Air kept its prefill speed and lost some decode
The fanless Air had a desk fan pointed at it; the X2 board is actively cooled. The scale starts at 85%.
Apple M5X2 Elite
Prefill kept over 10 minutes
Apple M5 98.8%, X2 Elite 99.1%
Decode kept over 10 minutes
Apple M5 89.4%, X2 Elite 98.2%
Qwen3 8B Q4_0 on the GPU: a 512-token prompt and a 128-token reply per pass (66 passes on the M5, 24 on the X2). Retention is the steady rate as a share of the peak. The steady rates sit below the first chart's, which came from a cool machine.
Every numberThe llama.cpp, NPU and training results as tablesShowHide
Swipe the table sideways for more columns.
| Test | Apple M5, tok/s | Snapdragon X2 Elite, tok/s | Winner |
|---|---|---|---|
| Gemma 3 1B, GPU prefill, 512 tokens | 5,604 | 1,921 | M5 2.9× |
| Gemma 3 1B, GPU prefill, 2,048 tokens | 5,293 | 1,712 | M5 3.1× |
| Gemma 3 1B, GPU decode | 143.8 | 74.5 | M5 1.9× |
| Qwen3 8B, GPU prefill, 512 tokens | 642.6 | 306.1 | M5 2.1× |
| Qwen3 8B, GPU prefill, 2,048 tokens | 561.7 | 254.4 | M5 2.2× |
| Qwen3 8B, GPU decode | 25.6 | 18.2 | M5 1.4× |
| Gemma 3 1B, CPU prefill, 512 tokens | 889.2 (10 threads) | 1,689 (12 threads) | X2 1.9× |
| Gemma 3 1B, CPU decode | 116.3 (6 threads) | 127.9 (8 threads) | X2 1.1× |
| Qwen3 8B, CPU prefill, 512 tokens | 85.3 (10 threads) | 270.7 (18 threads) | X2 3.2× |
| Qwen3 8B, CPU decode | 17.2 (6 threads) | 23.4 (12 threads) | X2 1.4× |
Swipe the table sideways for more columns.
| Precision | Apple M5, Neural Engine | Snapdragon X2 Elite, Hexagon |
|---|---|---|
| fp16 | 14.1 TFLOP/s | 15.2 TFLOP/s |
| int8 | 15.6 TFLOP/s (8-bit weights) | 8.6 TFLOP/s (converts to and from 8 bits) |
Swipe the table sideways for more columns.
| PyTorch, fp32 | Apple M5 | Snapdragon X2 Elite |
|---|---|---|
| CPU, transformer block | 1.25 TFLOP/s (10 threads) | 0.11 to 0.12 TFLOP/s (4, 12 or 18 threads) |
| CPU, 4,096 × 4,096 matrix multiply | 2.1 TFLOP/s | 0.12 to 0.13 TFLOP/s |
| GPU, transformer block | 2.30 TFLOP/s (MPS) | No PyTorch backend for Adreno |
How we ran it
- Apple M5
- MacBook Air (Mac17,3), 4 performance and 6 efficiency cores, 10-core GPU, 16-core Neural Engine, 24 GB at about 153 GB/s, macOS 26.5.2. An external fan was pointed at it during runs.
- Snapdragon X2 Elite
- X2E88100 on a Qualcomm reference board reached over Qualcomm Device Cloud: 18-core Oryon Gen 3 at 4.03 GHz, Adreno X2-90 GPU, Hexagon HTP v81 NPU, 32 GB at about 152 GB/s, Windows 11 ARM64.
- LLM
- llama.cpp b10152, the official prebuilt release on each OS. The M5 has one macOS build, with Metal: its GPU runs put every layer on the GPU, and its CPU runs put none there (-ngl 0), with Apple's Accelerate BLAS also loaded. The X2 used the OpenCL build for its Adreno GPU and the CPU build for its CPU. GGUF files SHA-256 verified identical and the same arguments: prompts of 512 and 2,048 tokens on the GPU and 512 on the CPU, replies of 128 tokens, 5 runs each after a discarded first run. Thread sweeps instead of one fixed count, so neither core layout is favoured: 4, 6, 8 and 10 threads on the M5, 4, 8, 12 and 18 on the X2.
- NPU
- One PyTorch model, 16 chained 2,048 × 2,048 matrix multiplications (GEMMs) at batch 1,024, 137 GFLOP a run, exported to Core ML for the Neural Engine and to ONNX Runtime's QNN provider for Hexagon, with identical weights, and checked against PyTorch's answer on every run.
- Training
- PyTorch 2.8.0 and an identical script: one transformer block 1,024 wide with 16 attention heads, forward and backward passes with the AdamW optimizer, in fp32, at 4 and 10 threads on the M5 and 4, 12 and 18 on the X2.
- Sustained
- The same 10-minute loop on both. It ran after the rest of the tests, one run per pass, so both machines started warm.
Limits
- 18 cores against 10
- This compares two products, not two core designs.
- Cooling
- The sustained figures do not show how the Air slows with no fan.
- The M5's CPU runs
- The M5's CPU numbers come from its Metal build, not from a CPU-only build. The logs do not record whether Metal or BLAS took part of the work, so read them as what that build does with the GPU switched off, not as a pure-CPU measurement.
- Close calls
- Each llama.cpp number is the mean of 5 runs. The closest call is Gemma 3 1B CPU decode: the X2 leads by 11.6 tok/s (1.1×), 1.9 times the M5's run-to-run spread (standard deviation) of 6.0 tok/s; the X2's spread was 0.55. The lead is small but larger than that noise.
- No efficiency claims
- There is no equal-quality power measurement on Windows.
- The NPU lane
- It is a controlled test of matrix maths, not a comparison of a language model running on each NPU.
- One board
- No retail X2 laptop was tested. With less cooling than this board, one may slow more under sustained load.
Read the methodology before quoting these numbers.