Flux Attention: Context-Aware Hybrid Attention for Efficient LLMs Inference
Flux Attention dynamically optimizes attention computation at every layer of a large language model during long-context inference. It uses a Layer Router to decide between Full Attention (FA) and Sparse Attention (SA) based on the input context, overcoming quadratic complexity bottlenecks. This results in up to 2.8x speedups while maintaining high performance for retrieval and reasoning tasks.