Conditionally Routed Attention, an implementation of the CoLT5 architecture for efficient long-context transformers. Current version 0.11.1, rapid release cadence.
pip install colt5-attentionNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize CoLT5 attention with routed queries/key-values and run forward pass.
Explicitly set `num_routed_queries=128` if you need the old behavior.
Convert boolean mask to float: `attn_mask = 0.0 * keep_mask + (-1e9) * (~keep_mask)`
Call `x = x.contiguous()` before passing to attention.