arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.09751cs.CL
收藏

无可训练输入嵌入表的语言模型:从固定最小二进制令牌代码中学习

Language Models Without a Trainable Input Embedding Table: Learning from Fixed Minimal Binary Token Codes

Andrey Bochkov(安德里·博赫科夫)

A. Bochkov

AI总结:

本文探讨了现代语言模型中可训练输入嵌入表的必要性,通过固定最小二进制令牌代码和无参数提升方法,在不使用可训练嵌入表的情况下实现了与传统方法相当的验证集困惑度,证明了其非必要性。

摘要:

可训练输入嵌入表是现代语言模型的标准组件。我们探讨了在输入接口上是否真的需要它们。对于词汇量为V的词汇表,精确的令牌身份仅需要K=⌈log₂V⌉位。我们用固定最小二进制令牌代码和零参数提升替代传统的可训练V×d_model输入嵌入矩阵。在我们的主要设置中,V=65536,因此K=16,令牌用固定16维二进制代码填充到d_model=1024。我们还评估了一个完全无表变体,其中代码在运行时从令牌ID生成,并通过可逆的仿射变换在F₂^K上随机重新编码。在匹配的32层解码器-only模型上,训练约17B个令牌,并在三个独立的训练种子上评估,固定最小代码在验证集困惑度上与传统学习输入基线相当,同时移除了67.1M个可训练输入参数。固定代码运行在实验中具有更低的平均验证集困惑度,2.36对2.44,但观察到的差距在测量的种子到种子变化4.8%内;因此,我们将结果解释为可训练输入表不必要的证据,而不是统计上确定的优越性声明。无表仿射重新编码变体保持在2.39,尽管训练运行稍短。这些结果表明,在这种情况下,可训练输入嵌入表对于有用的语言建模并不必要。输出投影仍保持标准且可训练。

英文摘要:

We study whether a decoder-only language model requires an independently trainable input vector for every token. For a vocabulary of size $V$, an injective fixed-length binary identifier requires $K=\lceil\log_2 V\rceil$ bits. We replace the usual trainable $V\times d_{\mathrm{model}}$ input table with fixed minimal binary token codes and a parameter-free tiled lift to model width. With $V=65{,}536$ and $d_{\mathrm{model}}=1024$, this supplies each token as a fixed 16-bit code and removes 67.1M trainable parameters, approximately 12.5% of the untied learned-input baseline. We also study a table-free implementation with one fixed invertible affine recoding over $\mathbb{F}_2^{16}$. Across three training seeds, 32-layer models trained on approximately 16-17B tokens obtain mean held-out perplexities of 2.44 for the learned-input baseline, 2.36 for canonical binary codes, and 2.39 for affine-recoded codes. These descriptive results do not establish statistical superiority or equivalence. Standardized evaluation of released base checkpoints with the LM Evaluation Harness adds commonsense, knowledge, and language-modeling benchmarks. The three paper checkpoints show broadly similar, task-dependent performance, while external SmolLM2 reference models are substantially stronger on many tasks. Our conclusion is therefore limited to the studied regime: a free trainable token-indexed input table is not required to learn nontrivial language modeling. The Transformer still learns continuous representations, and the output vocabulary projection remains standard and trainable.

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

↑