We introduce a new tool, Express, for converting a non-causal attention approximation into a causal approximation with matching approximation guarantees. When combined with the state-of-the-art Thinformer approximation, Express improves upon the best known causal attention guarantees, delivering $\log^{3/2}(n)/s$ approximation error with only $O(s)$ memory and $O(s^2 \log^2(n))$ compression overhead for a sequence of length $n$. We pair these developments with an efficient I/O-aware Triton implementation, demonstrate substantial speedups over FlashAttention 2, and use Express to overcome four resource bottlenecks in the language modeling pipeline: long-context prefill, KV cache compression, long-form memory-constrained decoding, and long-form compute-constrained decoding.
On the Thinking-Language Modeling Gap in Large Language Models
Hong Kong Baptist University(香港 Baptist 大学);MBZUAI Carnegie Mellon University(MBZUAI 美国卡内基梅隆大学);The University of Sydney(悉尼大学);The Chinese University of Hong Kong(香港中文大学)
Language Modeling with Sparse Product of Sememe Experts
Tsinghua University(清华大学);Tencent(腾讯)
大多数语言建模方法依赖于大规模数据来统计学习单词的顺序模式。在本文中,我们认为,词是原子的语言单位,但不一定是原子的语义单位。受知网的启发,我们使用人类语言中最小的语义单位--义位来表示隐含在词背后的语义,并以此来进行语言建模,我们称之为义位驱动的语言模型(Sememe-Driven Language Model,SDLM)。更具体地说,为了预测下一个单词,SDLM首先估计给定文本上下文的义素分布。然后,它把每个义素看作一个独立的语义专家,这些专家共同识别最可能的义项和对应的词。通过这种方式,SDLM使语言模型能够超越词级操作,实现细粒度的语义级操作,并为我们提供了更强大的工具来微调语言模型,提高语言模型的可解释性和鲁棒性。语言建模和标题生成的下游应用实验表明,SDLM具有显著的效果.实验中使用的源代码和数据可以在https://www.example.com上访问。github.com/thunlp/SDLM-pytorch
L$^2$M: Mutual Information Scaling Law for Long-Context Language Modeling
NSF AI Institute for Artificial Intelligence and Fundamental Interactions(NSF人工智能与基础相互作用研究院);Massachusetts Institute of Technology(麻省理工学院);Polytechnic University of Catalonia(加泰罗尼亚理工大学);Harvard University(哈佛大学);University of California, Los Angeles(加州大学洛杉矶分校)