@inproceedings{yan2021el-attention, author = {Yan, Yu and Chen, Jiusheng and Qi, Weizhen and Bhendawade, Nikhil and Gong, Yeyun and Duan, Nan and Zhang, Ruofei}, title = {EL-Attention: Memory Efficient Lossless Attention for Generation}, booktitle = {2021 International Conference on Machine Learning}, year = {2021}, month = {July}, abstract = {Transformer model with multi-head attention requires caching intermediate results for efficient inference in generation tasks. However, cache brings new memory-related costs and prevents leveraging larger batch size for faster speed. We propose memory-efficient lossless attention (called EL-attention) to address this issue. It avoids heavy operations for building multi-head keys and values, with no requirements of using cache. EL-attention constructs an ensemble of attention results by expanding query while keeping key and value shared. It produces the same result as multi-head attention with less GPU memory and faster inference speed. We conduct extensive experiments on Transformer, BART, and GPT-2 for summarization and question generation tasks. The results show EL-attention speeds up existing models by 1.6x to 5.3x without accuracy loss.}, url = {http://approjects.co.za/?big=en-us/research/publication/el-attention-memory-efficient-lossless-attention-for-generation/}, }