Method and apparatus for length-aware local tiling in a sparse attention module in a transformer
AssigneeBeijing Transtreams Technology Co. Ltd.
InventorsZhendong Wang, Yongxiong Ren, Yang Liu, Lingzhi Liu
Life of this patent
Estimating the term…
Loading patent…
AssigneeBeijing Transtreams Technology Co. Ltd.
InventorsZhendong Wang, Yongxiong Ren, Yang Liu, Lingzhi Liu
Estimating the term…
A method and an apparatus for length-aware local tiling in a sparse attention module in a transformer in heterogeneous devices are provided. The method includes that a heterogeneous device including one or more GPUs: divides a transformed sparsity mask into a plurality of first tiles and obtaining one or more effective first tiles from the plurality of first tiles, where each effective first tile includes at least one non-zero element; loads the one or more effective first tiles into a shared memory in the one or more GPUs and loads a plurality of elements in a first matrix corresponding to the one or more effective first tiles into the shared memory; and performs multiplication by a first sampled dense-dense matrix multiplication (SDDMM) kernel in the sparse attention module in the transformer by fetching the one or more effective first tiles and the plurality of elements from the shared memory.
A method for length-aware local tiling in a sparse attention module in a transformer in heterogeneous devices, comprising:
An apparatus for length-aware local tiling in a sparse attention module in a transformer in heterogeneous devices, comprising:
A non-transitory computer readable storage medium, comprising instructions stored therein, wherein, upon execution of the instructions by one or more processors, the instructions cause the one or more processors to perform acts comprising:
Dependencies are inferred from the claim text.