Skip to content

LLMs and VLAs on NPU

End-to-end inference of decoder-only LLMs, with text or image + text input, and vision-language-action (VLA) policies on the AMD NPU2 via MLIR-AIR, with bf16 and 4-bit (Q4NX, Q4_0) weights. Models with an FLM link reimplement AMD NPU LLM designs originally developed by the FastFlowLM team, using the higher-level abstractions of the MLIR-AIR dialect; the link points to the original FastFlowLM code. Coverage and performance below are refreshed nightly. Per-model details and source are in programming_examples/llms/.

Nightly LLM Benchmark (NPU2)

End-to-end LLM inference performance on NPU2. Each row names the hardware it was measured on: the benchmark runner's rows are refreshed nightly, rows from other machines are measured offline. TTFT is time to first token (prefill latency); Decode is steady-state generation throughput.

Hardware

  • Krackan Point: AMD Ryzen AI 5 PRO 340 / Ryzen AI 7 PRO 350, NPU2
  • Strix Halo: AMD Ryzen AI Max+ 395, NPU2

Verify (make verify): pass fail skipped.   — not measured.

Decode throughput vs context (tok/s)

Steady-state decode throughput at increasing KV-cache depth.

Model Hardware Weights 1k 2k 4k 8k 32k 64k 128k KLD GSM8K MMLU Verify
gemma-3-4b-it (FLM, HF) Krackan Point Q4NX — 21.03 — 15.49 7.46 — 2.38 0.0925 71 / 80 62 / 63
gemma-4-E2B-it (FLM, HF) Krackan Point Q4NX — 36.15 — 33.78 27.12 — 15.00 66 / 68 61 / 61
gemma-4-E4B-it (FLM, HF) Krackan Point Q4NX — 17.40 — 15.63 11.21 — 5.24 80 / 78 72 / 72
gpt-oss-20b (FLM, HF) Strix Halo Q4NX, MXFP4 experts 17.62 — 15.82 13.92 8.12 5.20 —
Granite-3.3-2B (HF) Krackan Point Affine Q4 — 31.90 — 19.76 7.90 — 2.32 0.0397 61 / 55 55 / 58
LFM2-1.2B (FLM, HF) Krackan Point Q4_0 — 64.87 — 47.85 23.33 — 7.66 0.0011 53 / 67 55 / 56
Llama-3.1-8B-Instruct (FLM, HF) Krackan Point Q4NX — 13.38 — 11.00 6.40 — 2.32 0.0137 80 / 81 68 / 69
Llama-3.2-1B (HF) Krackan Point bf16 — 8.52 — 4.52 1.13 — 0.22 0.0056 39 / 41 48 / 49
Llama-3.2-1B-Instruct (FLM, HF) Krackan Point Q4NX — 65.97 — 48.79 23.44 — 7.66 0.0107 37 / 41 48 / 49
Llama-3.2-3B (HF) Krackan Point bf16 — 3.10 — 1.76 0.26 — — 0.0031 75 / 76 65 / 65
Llama-3.2-3B-Instruct (FLM, HF) Krackan Point Q4NX — 26.63 — 17.65 7.56 — 2.30 0.0109 72 / 77 64 / 65
Mistral-7B-Instruct-v0.3 (HF) Strix Halo Affine Q4 — 11.17 — 8.88 4.87 — — 0.0115 46 / 51 58 / 61
OLMo2-1B (HF) Krackan Point Affine Q4 — 26.24 — — — — — 0.0152 56 / 63 42 / 42
OpenELM-1.1B (HF) Krackan Point Affine Q4 — 34.83 — — — — —
Phi-2 (HF) Krackan Point Affine Q4 — 6.79 — — — — — 0.0246 56 / 60 61 / 61
Phi-4-mini-instruct (FLM, HF) Krackan Point Q4NX — 22.36 — 15.02 6.54 — 2.01 0.0274 81 / 81 68 / 68
Qwen2.5-0.5B (HF) Krackan Point bf16 — 9.57 — 5.49 1.78 — 0.28 0.0030 35 / 41 49 / 48
Qwen2.5-1.5B (HF) Krackan Point bf16 — 5.46 — 3.58 0.80 — 0.17 0.0019 69 / 62 63 / 63
Qwen2.5-3B (HF) Krackan Point bf16 — 3.84 — 2.22 0.48 — 0.10 0.0108 68 / 56 67 / 69
Qwen2.5-3B-Instruct (FLM, HF) Krackan Point Q4_0 — 21.15 — 15.54 7.55 — 2.47 0.0262 59 / 56 69 / 69
Qwen2.5-7B-Instruct (FLM, HF) Krackan Point Q4NX — 12.81 — 10.21 5.64 — 2.02 0.0183 69 / 76 73 / 74
Qwen2.5-7B-Instruct (FLM, HF) Strix Halo Q4NX — 11.02 — 8.66 4.69 — 1.55 0.0183 69 / 76 73 / 74
Qwen3.5-0.8B (FLM, HF) Krackan Point Q4NX — 50.03 — 44.49 29.59 — — 30 / 54 49 / 50
Qwen3-0.6B (HF) Krackan Point bf16 — 5.38 — 2.83 0.52 — — 0.0121 42 / 44 44 / 42
Qwen3-1.7B (HF) Krackan Point bf16 — 4.43 — 2.58 0.50 — — 0.0120 63 / 67 59 / 59
Qwen3-4B (HF) Krackan Point bf16 — 2.56 — 1.29 0.24 — — 0.0043 78 / 75 72 / 73
Qwen3-4B (FLM, HF) Krackan Point Q4NX — 19.62 — 12.99 5.55 — 1.68 0.0306 80 / 75 72 / 73
Qwen3-8B (FLM, HF) Krackan Point Q4NX — 12.06 — 9.17 4.70 — 1.59 0.0189 87 / 86 77 / 76
Qwen3-8B (FLM, HF) Strix Halo Q4NX — 10.16 — 8.02 4.38 — 1.55 0.0189 87 / 86 77 / 76
SmolLM2-1.7B (HF) Krackan Point bf16 — 4.76 — 1.98 — — — 0.0061 42 / 42 51 / 51
SmolLM3-3B (HF) Krackan Point Affine Q4 — 26.05 — 16.91 7.10 — — 0.0236 70 / 71 60 / 63

— not swept at this context, or an expected failure.

Accuracy (the decode table's KLD, GSM8K and MMLU; the prefill table's KLD). The NPU is compared with the same model on the CPU (PyTorch): on wikitext-2 the way llama.cpp's llama-perplexity --kl-divergence does, and on benchmark questions. Measured offline; the NPU gives the same accuracy on every NPU2 machine. Hover over a number for its details.

  • KLD: KL divergence of the NPU's next-token distribution from the CPU's with the same weights (4-bit weights dequantized on the CPU); 0 means identical. It measures the NPU implementation alone.
  • GSM8K / MMLU: % correct, NPU / original bf16 checkpoint on the CPU, on the same questions (GSM8K 100, MMLU 570). For 4-bit models this includes the cost of the 4-bit weights.

Prefill latency vs prefill length (TTFT, ms)

Time to first token at increasing prefill length. A model with a fused prefill is timed on a prompt of exactly that many tokens, one build serving every length. A per-op prefill pads the prompt to the length its ELFs were built for, so each of its columns is a separate build and TTFT tracks that length rather than the number of real prompt tokens.

Model Hardware Weights 128 512 1k 2k 4k 8k 32k KLD Verify
d3-edge (FLM, HF) Krackan Point bf16 — 81 153 317 717 — —
d3-lite (FLM, HF) Krackan Point Q4NX — 150 288 594 1262 — —
gemma-3-4b-it (FLM, HF) Krackan Point Q4NX — 316 582 1155 2466 5246 25790 0.0255
gemma-4-E2B-it (FLM, HF) Krackan Point Q4NX — 304 564 1212 2654 6089 43015
gemma-4-E4B-it (FLM, HF) Krackan Point Q4NX — 480 891 1859 4039 8865 54349
gpt-oss-20b (FLM, HF) Strix Halo Q4NX, MXFP4 experts 726 980 — 2535 — — —
Granite-3.3-2B (HF) Krackan Point Affine Q4 — 286 567 1436 3899 — — 0.0048
LFM2-1.2B (FLM, HF) Krackan Point Q4_0 — 138 245 544 1243 3086 26058 0.0027
Llama-3.1-8B-Instruct (FLM, HF) Krackan Point Q4NX — 570 1169 2593 6288 17176 178068 0.0021
Llama-3.2-1B (HF) Krackan Point bf16 — 272 468 873 1787 — — 0.0052
Llama-3.2-1B-Instruct (FLM, HF) Krackan Point Q4NX — 121 237 586 1575 4687 55240 0.0035
Llama-3.2-3B (HF) Krackan Point bf16 — 648 1066 2188 4804 — — 0.0054
Llama-3.2-3B-Instruct (FLM, HF) Krackan Point Q4NX — 276 553 1276 3359 9769 110828 0.0024
Mistral-7B-Instruct-v0.3 (HF) Strix Halo Affine Q4 — 1442 2746 5436 16494 — — 0.0055
OLMo2-1B (HF) Krackan Point Affine Q4 — 156 283 619 — — — 0.0038
OpenELM-1.1B (HF) Krackan Point Affine Q4 — 198 398 980 — — —
Phi-2 (HF) Krackan Point Affine Q4 — 350 709 1689 — — — 0.0257
Phi-4-mini-instruct (FLM, HF) Krackan Point Q4NX — 324 636 1463 3834 11166 126625 0.0103
Qwen2.5-0.5B (HF) Krackan Point bf16 — 382 528 854 1511 — — 0.0071
Qwen2.5-1.5B (HF) Krackan Point bf16 — 639 1137 2152 4327 — — 0.0048
Qwen2.5-3B (HF) Krackan Point bf16 — 1136 2043 4004 8236 — — 0.0351
Qwen2.5-3B-Instruct (FLM, HF) Krackan Point Q4_0 — 289 540 1233 2986 7820 73963 0.0035
Qwen2.5-7B-Instruct (FLM, HF) Krackan Point Q4NX — 565 1096 2197 4961 12383 107506 0.0472
Qwen2.5-7B-Instruct (FLM, HF) Strix Halo Q4NX — 582 1046 2192 4970 12350 107296 0.0472
Qwen3.5-0.8B (FLM, HF) Krackan Point Q4NX — 177 325 647 1352 — —
Qwen3-0.6B (HF) Krackan Point bf16 — 383 684 1250 2632 — — 0.0130
Qwen3-1.7B (HF) Krackan Point bf16 — 510 922 1816 3711 — — 0.0170
Qwen3-4B (HF) Krackan Point bf16 — 1304 2406 4708 10119 — — 0.0161
Qwen3-4B (FLM, HF) Krackan Point Q4NX — 378 762 1841 5062 15371 184365 0.0033
Qwen3-8B (FLM, HF) Krackan Point Q4NX — 571 1187 2660 6570 18318 196089 0.0030
Qwen3-8B (FLM, HF) Strix Halo Q4NX — 570 1183 2658 6588 18258 195830 0.0030
SmolLM2-1.7B (HF) Krackan Point bf16 — 405 747 1468 3062 — — 0.0047
SmolLM3-3B (HF) Krackan Point Affine Q4 — 295 543 1225 2974 — — 0.0043

— not swept at this length, or an expected failure.

Image + text: time to first token vs image tokens (ms)

One image and the prompt "Describe this image.". Each budget column is the number of image tokens the image may take; the cell is the time to first token, which is the vision encoder plus the prefill. Decode is generation after the image, the range over the budgets.

ModelHardwareWeightsNumber of image tokensDecode (tok/s)MeasuredVerify
701402805601120
gemma-4-E2B-it (FLM, HF)Krackan PointQ4NX, bf16 vision2994677651604426534.5–35.72026-11-07
gemma-4-E4B-it (FLM, HF)Krackan PointQ4NX, bf16 vision3886029671838464317.3–18.42026-11-07

Speculative decoding

A draft model proposes a block of tokens and the target model verifies the block in one pass. Target only is the same target model decoding one token per pass. Both decode the same 20 prompts, 4 from each of gsm8k, math500, humaneval, mbpp, mt-bench, greedy, up to 2048 new tokens, prefill excluded. Prompts are 20–305 tokens. Throughput is each engine's total generated tokens divided by its total decode time over the requests in the row. The two engines use different matrix arithmetic (single-token GEMV vs batched verification), so their greedy outputs diverge and the generated token counts differ.

ModelHardwareDatasetTarget only (tok/s)Speculative (tok/s)SpeedupTokens / passAcceptanceVerify
Llama-3.1-8B-Instruct (HF)
draft: LLaMA3.1-8B-Instruct-DFlash-UltraChat, block 8
Krackan Pointgsm8k11.6027.232.35×4.180.45
math5009.6121.932.28×3.390.34
humaneval9.5731.103.25×4.960.57
mbpp9.6130.153.14×4.620.52
mt-bench9.6117.831.86×2.760.25
all 2010.0224.292.42×3.770.40
Qwen3-4B (HF)
draft: Qwen3-4B-DFlash-b16, block 8
Krackan Pointgsm8k17.9451.282.86×5.250.61
math50017.8556.653.17×6.070.73
humaneval17.9148.772.72×5.190.60
mbpp17.9849.612.76×5.080.59
mt-bench17.9420.191.13×2.080.16
all 2017.9142.892.39×4.490.50
Qwen3-4B (HF)
draft: Qwen3-4B-DFlash-b16, block 16
Krackan Pointgsm8k17.9452.502.93×7.140.41
math50017.7662.293.51×9.090.54
humaneval17.8648.332.71×6.910.40
mbpp17.8943.982.46×5.930.33
mt-bench17.8916.700.93×2.280.09
all 2017.8540.832.29×5.700.31
Qwen3-8B (HF)
draft: Qwen3-8B-DFlash-b16, block 8
Krackan Pointgsm8k11.4133.772.96×5.690.67
math50010.1833.763.32×5.890.70
humaneval9.5029.613.12×5.130.59
mbpp9.4227.142.88×4.520.51
mt-bench9.5513.341.40×2.260.18
all 209.9725.992.61×4.450.49
llama31_8b_dflash_b16Krackan Pointgsm8k12.0021.361.78×4.070.20
math5009.7218.111.86×3.480.17
humaneval9.4727.422.90×5.460.30
mbpp9.4024.822.64×4.720.25
mt-bench9.2914.081.52×2.710.11
all 2010.0119.931.99×3.850.19
qwen3_8b_dflash_b16Krackan Pointgsm8k11.3533.652.96×7.320.42
math5009.9737.823.79×8.600.51
humaneval9.2531.073.36×7.030.40
mbpp9.3827.142.89×5.850.33
mt-bench9.3610.881.16×2.380.09
all 209.7925.252.58×5.600.31

Vision-Language-Action policies

Not autoregressive: these emit one action chunk per observation rather than a token stream, so there is no decode throughput and no context to sweep. Action chunk is the latency to the model's first usable output. Prefix is the token count the backbone attends over.

Model Hardware Prefix Action chunk (ms) Measured Verify
smolvla_base (HF) Krackan Point 241 616.6 2026-11-07
smolvla_base, all stages on NPU (HF) Krackan Point 241 369.6 2026-11-07

📈 Performance history over time — per-nightly TTFT and decode throughput plotted per model.

Last updated 2026-11-07 · mlir-air 1912384 · mlir-aie 1631e1b · llvm-aie 22.0.0.2026102001+4f5df13d