Multi-Head Attention (MHA) is a key component of Transformer. In MHA, attention heads work independently, causing problems such as low-rank bottleneck of attention score matrices and head redundancy. We propose Dynamically Composable Multi-Head Attention (DCMHA), a parameter and computation efficient attention architecture that tackles the shortcomings of MHA and increases the expressive power of the model by dynamically composing attention heads. At the core of DCMHA is a $\it{Compose}$ function that transforms the attention score and weight matrices in an input-dependent way. DCMHA can be used as a drop-in replacement of MHA in any transformer architecture to obtain the corresponding DCFormer. DCFormer significantly outperforms Transformer on different architectures and model scales in language modeling, matching the performance of models with ~1.7x-2.0x compute. For example, DCPythia-6.9B outperforms open source Pythia-12B on both pretraining perplexity and downstream task evaluation. The code and models are available at https://github.com/Caiyun-AI/DCFormer.
Sorbonne Université, LPSM Paris, France(索邦大学,巴黎LPSM分校,法国);EPFL, Institute of Mathematics Lausanne, Switzerland(苏黎世联邦理工学院,数学研究所,瑞士);Laboratoire de Mathématiques d’Orsay Université Paris Saclay(奥赛数学实验室,巴黎萨克雷大学);Institut Universitaire de France(法国国家科学研究中心)
HeadInfer: Memory-Efficient LLM Inference by Head-wise Offloading
University of Wisconsin-Madison(威斯康星大学麦迪逊分校);Microsoft(微软公司);Rutgers University(罗格斯大学);California Institute of Technology(加州理工学院);Carnegie Mellon University(卡内基梅隆大学)
Scaling Reasoning Hop Exposes Weaknesses: Demystifying and Improving Hop Generalization in Large Language Models
University of Science and Technology of China(中国科学技术大学);City University of Hong Kong(香港城市大学);Zhejiang University(浙江大学);City University of Hong Kong, Shenzhen Research Institute(香港城市大学深圳研究院)
Annealing Double-Head: An Architecture for Online Calibration of Deep Neural Networks
University of California, Santa Cruz(加州大学圣克鲁兹分校);Institute of Theoretical Physics, Chinese Academy of Sciences(中国科学院理论物理研究所);National University of Singapore(新加坡国立大学)
SADI: Spatial-Aware Dynamic Intervention for Mitigating Hallucinations in LVLMs
Qilu University of Technology (Shandong Academy of Sciences)(齐鲁工业大学(山东省科学院));China Telecom Digital Intelligence Technology Co, Ltd(中国电信数字智能技术有限公司);Shenyang Aerospace University(沈阳航空航天大学);Qilu Institute of Technology(齐鲁理工学院)
NeuroTrails: Training with Dynamic Sparse Heads as the Key to Effective Ensembling
Eindhoven University of Technology(埃因霍温理工大学);University of Luxembourg(卢森堡大学);University of Twente(代尔夫特理工大学);IKEA Netherlands(宜家荷兰);Google DeepMind(谷歌DeepMind);University of Oxford(牛津大学);University of Surrey(萨里大学)
A Multi-Head Ensemble Multi-Task Learning Approach for Dynamical Computation Offloading
Northwestern Polytechnical University(西北工业大学);Xidian University(西安电子科技大学);University of New South Wales(新南威尔士大学);Nanyang Technological University(南洋理工大学)