Noah DeAngelis has developed an experimental routing-based attention mechanism for GPT models, implemented in a PyTorch project named RoutingGPT. The approach uses a learned linear layer to select a subset of tokens as keys and values while keeping all tokens as queries.

  • With a default 25% routing ratio, the complexity reduces from T × T for dense attention to T × 0.25T.
  • The goal is to reduce attention computation and enable longer context lengths on low-end hardware.
  • The project is released under the Apache 2.0 license and is currently experimental without rigorous benchmarking.