Prefill Throughput: Constrained vs. Padded Dynamic Shapes

Constrained dynamic shapes significantly outperform traditional padding methods for dynamic LLM inputs, with reported prefill throughput improvements up to 23x. Padding often leads to wasted computation and memory, whereas constrained shapes allow compilers to adapt more efficiently to varying input lengths.

Sources

Open the full topic