Back to results
US 2026/0093992 A1Published application
Fast long-context for transformer attention mechanism
AssigneeRoyal Bank of Canada
InventorsYongchang HAO, Mengyao ZHAI, Hossein HAJIMIRSADEGHI, Sepid HOSSEINI, Frederick TUNG
Life of this patent
Estimating the term…
Abstract
A fast long-context attention mechanism can be used with any trained transformer model. The best context ranges of tokens for the attention mechanism can be dynamically selected from segments formed from the tokens.
Claims13
A method for use in determining context keys for an attention mechanism of a transformer model, the method comprising:
- generating a plurality of segments, each segment combining a plurality of respective token key mappings generated by mapping the respective token keys using a random feature matrix Ω∈n×d;
- generating a token query mapping by mapping the token query using the random feature matrix Ω;
- calculating attention scores between the token query mapping and each of the plurality of segments;
- and
- returning the token keys of m segments with the highest attention scores.
2 more elements
Dependencies are inferred from the claim text.