Paper
21 July 2023 Optimized parallel causal product for linear transformer
Siqi Liu
Author Affiliations +
Proceedings Volume 12717, 3rd International Conference on Artificial Intelligence, Automation, and High-Performance Computing (AIAHPC 2023); 127172K (2023) https://doi.org/10.1117/12.2684707
Event: 3rd International Conference on Artificial Intelligence, Automation, and High-Performance Computing (AIAHPC 2023), 2023, Wuhan, China
Abstract
The transformer has revolutionized Natural Language Processing and its exceptional performance has extended its application to computer vision. However, as more complex tasks arise, the demand for models to process longer sequences has increased. To address this, efficient transformers with reduced time and memory complexities have been developed. Linear transformer is an outstanding one of them with linear time complexity with input length. Causal product is the core computation of causal linear attention in linear transformer, which are commonly used to perform autoregressive tasks. However, in order to preserve the linearity, the causal products of queries are computed sequentially in Linear Transformer. We propose an innovative CUDA kernel function which allows for parallel computation of the query attention instead of sequential. Furthermore, we optimized the GPU computations of linear attention in Linear Transformer by double pipeline that decreases the time of data transmission. Our experiments demonstrate that our method achieves a 9x speedup compared to the original causal product function when implemented on a CPU.
© (2023) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Siqi Liu "Optimized parallel causal product for linear transformer", Proc. SPIE 12717, 3rd International Conference on Artificial Intelligence, Automation, and High-Performance Computing (AIAHPC 2023), 127172K (21 July 2023); https://doi.org/10.1117/12.2684707
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Transformers

Data transmission

Matrices

Visual process modeling

Process modeling

Computer vision technology

Education and training

Back to Top