NITRO: LLM Inference on Intel Laptop NPUs
Anthony Fei, Mohamed S. Abdelfattah
TL;DR
The paper tackles the challenge of running autoregressive LLMs on Intel laptop NPUs by extending the OpenVINO ecosystem with NITRO, a Python-based framework that converts modified, tensor-based Llama-like models into statically shaped OpenVINO IR chunks. It rewrites transformer components, extends KV-Caches, and stitches multiple IR chunks into an end-to-end inference pipeline capable of text generation and chat, benchmarking performance on a Meteor Lake-equipped laptop. Key findings show that while the NPU can outperform CPU for mid-size models and offers energy-efficient tradeoffs, GPUs generally maintain superior raw speed, and quantization provides limited or negative benefits on the NPU due to architectural constraints and runtime issues. The work identifies meaningful bottlenecks (rotary embeddings, attention masks outside IR) and points to future hardware upgrades (Lunar Lake) and software optimizations (speculative decoding) to enhance local NPU-based LLM deployment and energy efficiency.
Abstract
Large Language Models (LLMs) have become essential tools in natural language processing, finding large usage in chatbots such as ChatGPT and Gemini, and are a central area of research. A particular area of interest includes designing hardware specialized for these AI applications, with one such example being the neural processing unit (NPU). In 2023, Intel released the Intel Core Ultra processor with codename Meteor Lake, featuring a CPU, GPU, and NPU system-on-chip. However, official software support for the NPU through Intel's OpenVINO framework is limited to static model inference. The dynamic nature of autoregressive token generation in LLMs is therefore not supported out of the box. To address this shortcoming, we present NITRO (NPU Inference for Transformers Optimization), a Python-based framework built on top of OpenVINO to support text and chat generation on NPUs. In this paper, we discuss in detail the key modifications made to the transformer architecture to enable inference, some performance benchmarks, and future steps towards improving the package. The code repository for NITRO can be found here: https://github.com/abdelfattah-lab/nitro.
