arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.08347cs.CLcs.LG
收藏

张量化Engram:在N-gram嵌入中共享潜在变量对大型语言模型有益

Tensorizing Engram: Sharing Latents Across N-Gram Embeddings is Beneficial in LLMs

University of California, Berkeley(加州大学伯克利分校);University of Cambridge(剑桥大学);University of Toronto(多伦多大学)

Wuyang Zhou, Yuxuan Gu, Giorgos Iacovides, Yuning Qiu, Qibin Zhao, Danilo Mandic

AI总结:

提出张量化Engram(TN-gram),通过CP分解共享因子压缩n-gram嵌入,减少参数并避免哈希冲突,在多个任务上匹配或超越现有方法。

摘要:

现代语言模型使用离散的token级嵌入表示文本,这迫使重复的多token模式必须在Transformer层中隐式学习。过度token化的Transformer和Engram都试图通过显式引入多token(n-gram)记忆来解决这一限制。然而,它们为每个n-gram阶数使用单独的哈希表,这引入了哈希冲突并阻止嵌套的n-gram共享底层潜在结构。为了解决这些问题,我们提出了张量化Engram(TN-gram),一种紧凑的记忆模块,通过Canonical Polyadic(CP)形式中的共享因子表示张量化的n-gram嵌入。TN-gram学习共享的token-位置因子以及阶数吸收向量,以编码不同n-gram阶数的嵌入。综合实验表明,TN-gram在需要更少参数的情况下,匹配甚至超越了Engram风格的n-gram模块。

英文摘要:

Modern language models represent text using discrete token-level embeddings, which forces recurring multi-token patterns to be learned implicitly across Transformer layers. Both Over-tokenized Transformers and Engram attempt to address this limitation by explicitly incorporating multi-token (n-gram) memories. However, they rely on separate hash tables for each n-gram order, which introduces hash collisions and prevents nested n-grams from sharing the underlying latent structures. To address these issues, we propose Tensorized Engram (TN-gram), a compact memory module that represents tensorized n-gram embeddings through shared factors in the Canonical Polyadic (CP) form. TN-gram learns shared token-position factors together with order-absorption vectors to encode the embeddings of different n-gram order. Comprehensive experiments demonstrate that TN-gram matches or even outperforms Engram-style n-gram modules while requiring much fewer parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑