Chorus:共享 N-gram 嵌入与逐层适配
研究论文 · 2026/11/19
Chorus 提出一种共享 n-gram 嵌入表的方法,整个网络共用一组 n-gram 嵌入表,每层通过基于当前隐藏状态计算的缩放因子和各自的投影层来适配。在表格参数为 1.2B 时,Chorus 的文本预测质量优于使用 9.6B 参数的 FactorEngram 和 DeepSeek 的 Engram,且表格尺寸缩小 87%。在 20M 到 9.6B 参数的各种设置下,Chorus 均优于 Engram、TN-gram 和 FactorEngram。此外,Chorus 与内存高效优化器 Ember 配合良好,相比 AdamW 节省 99.2% 的表格优化器内存且不降低训练性能。
Chorus 通过共享 n-gram 嵌入表并实现层间适配,在显著减小表格尺寸的同时提升文本预测质量,并大幅降低优化器内存,为 n-gram 嵌入表的进一步扩展提供了有效途径。
Language models can gain capacity at little computational cost from n-gram embedding tables: large tables of learned vectors for short sequences of consecutive tokens, which are looked up and added to the model's input or to its intermediate layers. Recent designs commonly use a separate n-gram embedding table for each layer, which makes the tables costly in memory and prevents layers from sharing what they learn. Sharing a single table, however, gives every layer the same embedding and leaves no room for layer-wise preferences, and it performs poorly in practice. We propose Chorus, in which one set of n-gram embedding tables serves the whole network and every layer reads it in its own way. Each layer maps the refined embedding through its own projection layer, after rescaling its components by factors computed from its current hidden state. Chorus matches the quality of existing n-gram methods with 87% smaller tables: with 1.2B table parameters it predicts text better than FactorEngram and DeepSeek's Engram do with 9.6B. It outperforms Engram, TN-gram and FactorEngram in every setting where we compared them, across table sizes from 20M to 9.6B parameters. We also show that the recently proposed memory-efficient optimizer Ember works well with Chorus, saving 99.2% of table-optimizer memory compared with AdamW without degrading training performance. These results enable further scaling of n-gram embedding tables along the table-size axis by reducing memory use and allowing shared knowledge to be reused across layers.