Running Whisper + LLMs on an AMD NPU under Linux A developer successfully ran OpenAI's Whisper large-v3-turbo transcription model and an LLM on an AMD NPU under Linux, achieving a real-time factor of approximately 0.18 on an MSI Stealth A16 AI+ laptop with a Ryzen AI 9 365 processor. The setup used the mainline amdxdna kernel driver, XRT tools, and the FastFlowLM runtime, bypassing the typical Windows-centric Ryzen AI SDK and ONNX Runtime VitisAI path. The developer highlighted the need to set an unlimited memlock rlimit and noted the process took about 20 minutes once the correct stack was identified. TL;DR— On a MSI Stealth A16 AI+ Ryzen AI 9 365, XDNA2 NPU running Arch, I got OpenAI's whisper-large-v3-turbo transcribing on theNPU— not the CPU, not the GPU — atRTF ≈ 0.18 a 30 s clip in ~5.2 s for roughly a tenth of the energythe same job costs on the CPU, plus an LLM answering on the same NPU through an OpenAI-compatible API. The whole path is local and offline. This is the write-up of the driver stack, the one real gotcha memlock , and the runtime that made it a 20-minute job instead of a weekend. AMD's "Ryzen AI" NPU the XDNA / XDNA2 block in Phoenix / Hawk Point / Strix Point laptops is marketed almost entirely around Windows: the Ryzen AI SDK, the ONNX Runtime VitisAI execution provider, Lemonade, and the demos all assume you're on Windows with the official stack. On Linux the picture in early 2026 is better than most people think — the NPU driver has been in the mainline kernel as amdxdna since 6.14 — but the "load a real model and runHere's what actually worked, end to end. | Part | Detail | |---|---| | Laptop | MSI Stealth A16 AI+ A3HVGG | | APU | AMD Ryzen AI 9 365 Strix Point | | NPU | XDNA2, 8 columns, exposed as /dev/accel/accel0 | | NPU firmware | 1.1.2.64 | | Kernel | 7.1.9-arch1 amdxdna in-tree | | OS | Omarchy Arch Linux | AMD quotes the Strix Point NPU at up to 50 TOPS, INT8 https://www.amd.com/en/products/processors/laptop/ryzen/ai-300-series/amd-ryzen-ai-9-365.html . Three pieces have to be in place before any runtime can touch the NPU: amdxdna /dev/accel/accel0 . Check it's bound: bash $ ls /dev/accel/ accel0 $ dmesg | grep -i amdxdna xrt-plugin-amdxdna extra : bash $ sudo pacman -S xrt xrt-plugin-amdxdna $ xrt-smi examine ... XRT Version : 2.21.75 NPU Firmware Version : 1.1.2.64 Device s Present |BDF |Name | |----------------|--------------| | 0000:66:00.1 |RyzenAI-npu4 | You want a Device s Present line with a RyzenAI-npu name. If XRT is installed but the plugin isn't, xrt-smi runs but that table is empty. xrt-smi examine --report platform then shows Total Columns : 8 — the XDNA2 array this SoC exposes. xrt 2.21.75 , xrt-plugin-amdxdna same release , NPU firmware 1.1.2.64 , and flm validate reporting the amdxdna driver interface as The NPU runtime pins model weights into physical RAM, so the calling user needs an unlimited memlock rlimit . The default usually 8 MiB or 64 MiB is nowhere near enough and the failure mode is an unhelpful allocation error deep in the runtime. bash $ sudo tee -a /etc/security/limits.conf <<< "$USER soft memlock unlimited" $ sudo tee -a /etc/security/limits.conf <<< "$USER hard memlock unlimited" log out and back in You want to see this afterwards: bash $ ulimit -l unlimited The "official" Linux route is: build ONNX Runtime with the VitisAI EP, install the Ryzen AI SDK bits, quantize your model to the NPU's format, wrangle a Python venv full of onnxruntime-vitisai and Vitis tooling. It's a lot, and much of it is Windows-first. FastFlowLM flm skips all of that. It's a libwhisper npu.so in the package itself: bash $ ls /usr/share/flm/xclbins/ encoder attn encoder dequant encoder mm whisper head ... $ flm --version FLM v1.0.2 Because the kernels are bundled, there is no onnxruntime-vitisai / Ryzen AI SDK venv to build . Arch's stock python-onnxruntime-cpu only has CPUExecutionProvider anyway — irrelevant here. On Arch: sudo pacman -S fastflowlm .Validate the whole stack in one shot: bash $ flm validate Linux Kernel: 7.1.9-arch1-2 Linux NPU: /dev/accel/accel0 with 8 columns Linux NPU FW Version: 1.1.2.64 Linux amdxdna version: 0.8 Linux Memlock Limit: infinity All green = ready. If Memlock Limit says anything other than infinity , go back to the limits.conf step. Pull the model — whisper-v3:turbo is large-v3-turbo quantized for XDNA2: php $ flm pull whisper-v3:turbo ~650 MB: model.q4nx + tokenizers - ~/.config/flm/models/Whisper-V3-Turbo-NPU2/ Serve it. On FLM 1.0.2+ Whisper loads standalone — older docs claimed you had to co-load an LLM, but you don't: bash $ flm serve --asr 1 OpenAI-compatible server on :52625 Transcribe over the HTTP API anything ffmpeg can decode — wav/mp3/ogg/m4a/flac : bash $ curl http://127.0.0.1:52625/v1/audio/transcriptions \ -F "file=@audio.ogg" \ -F "model=whisper-v3" There's also a CLI path: flm run