Computational Intensity: The FLOPs Bottleneck

On-device LLM inference also faces a significant bottleneck from the sheer volume of floating-point operations (FLOPs), particularly large matrix multiplications within transformer layers, which can overwhelm the sustained processing capabilities of mobile NPUs or GPUs.

The top 3

  1. Top 3 Techniques to Reduce LLM Inference FLOPs: Quantization (e.g., INT8, INT4) reduces precision and data movement, pruning removes less important weights, and structured sparsity (e.g., N:M patterns) reduces computation and memory bandwidth requirements, all vital for optimizing LLM inference efficiency.
  2. Core Operations Driving LLM Computational Intensity: Matrix multiplications in the Feed-Forward Network (FFN) and Query-Key-Value (QKV) computations within the attention mechanism are the most FLOP-intensive operations, consuming approximately 66% and 25% of FLOPs per layer, respectively.
  3. Compute vs. Memory: The Real Bottleneck for On-Device LLMs: LLM inference, especially the token generation (decode) phase, is often memory-bound rather than compute-bound; performance is limited by memory bandwidth – how quickly model parameters and KV cache data can be moved.

Sources

Open the full topic