MultiHashFormer: 基于哈希的生成式语言模型
MultiHashFormer: Hash-based Generative Language Models
AI总结:
提出MultiHashFormer框架,通过多哈希签名表示令牌,实现参数高效的因果语言建模,在多个规模上优于标准Transformer。
摘要:
语言模型使用与词汇量线性增长的嵌入矩阵来表示令牌。为了限制参数占用,先前的工作在仅编码器模型中提出将多个令牌哈希到单个向量中。虽然这提供了参数效率,但多对一冲突阻止了其在因果语言模型中的使用。在本文中,我们提出了MultiHashFormer,一种允许基于哈希的自回归的新框架。每个令牌被表示为一个唯一的哈希签名,即由多个独立哈希函数生成的短序列离散哈希ID。哈希编码器将此签名压缩为单个潜在向量,供Transformer解码器处理。然后,哈希解码器生成下一个令牌的哈希签名,该签名再映射回文本。我们在1亿、10亿和30亿参数规模上评估了我们的方法,证明MultiHashFormer在多个基准测试中始终优于标准Transformer语言模型。此外,我们展示了我们的模型以恒定的参数占用处理多语言词汇扩展,无需任何修改。
英文摘要:
Language models (LMs) represent tokens using embedding matrices that scale linearly with the vocabulary size. To constrain the parameter footprint, prior work proposes hashing many tokens into a single vector within encoder-only models. While this offers parameter efficiency, many-to-one collisions prevent its use in causal LMs. In this paper, we propose MultiHashFormer, a new framework that allows hash-based autoregression. Each token is represented as a unique hash signature, a short sequence of discrete hash IDs, generated by multiple independent hash functions. A Hash Encoder compresses this signature into a single latent vector for processing by a Transformer decoder. Then, a Hash Decoder generates the hash signature of the next token, which is then mapped back to text. We evaluate our approach at the 100M, 1B and 3B parameter scales, demonstrating that MultiHashFormer consistently outperforms standard Transformer LMs across multiple benchmarks. Furthermore, we show that our model handles multilingual vocabulary expansion with a constant parameter footprint without any modifications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。