O(N) Linear Complexity Transformer - 125x faster than standard attention using cumulative sum trick. Pure PyTorch implementation.
raspberry-pi machine-learning deep-learning pytorch transformer edge-ai linear-attention efficient-ml o-n-complexity
-
Updated
Dec 29, 2025 - Python