arXiv:2605.09751cs.CL2026-05

用固定二进制编码替代可训练词嵌入,性能相当且节省6700万参数。

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

  • 用16位固定二进制码表示词元,无需可训练嵌入表。
  • 在65,536词表下,困惑度降至2.36,与标准模型接近。
  • 适合追求轻量化、参数高效的语言模型研究者。

可训练的输入嵌入矩阵是现代语言模型的标准组件。我们探究其是否真有必要。对于大小为V的词表,精确表示词元仅需K=⌈log₂V⌉位。我们将传统的V×d_model可训练嵌入矩阵替换为固定最小二进制词元编码和零参数升维至模型宽度。主实验中V=65,536,故K=16,词元以固定的16维二进制码重复填充至d_model=1024。还评估了完全无表变体:词元码由词元ID即时生成,并通过F₂ᴷ上的可逆仿射变换随机重编码。在约170亿词元上训练的32层解码器模型,经三组独立种子验证,固定编码模型在保留率上表现与标准可学习输入基线相当,同时减少6710万可训练参数。实验中固定编码模型平均验证困惑度为2.36,低于基线2.44,但差距在种子间波动范围(4.8%)内,因此结论为可训练输入表非必需,而非显著优越。无表仿射重编码变体在稍短训练下仍达2.39。结果表明,在此设定下,可训练输入嵌入表并非有用语言建模所必需。输出投影仍为标准可训练形式。

原文摘要 · Abstract (English)

Trainable input embedding tables are a standard component of modern language models. We ask whether they are actually necessary at the input interface. For a vocabulary of size $V$, exact token identity requires only $K=\lceil \log_2 V\rceil$ bits. We replace the usual trainable $V\times d_{\text{model}}$ input embedding matrix with fixed minimal binary token codes and a zero-parameter lift to model width. In our main setting, $V=65{,}536$, so $K=16$, and tokens are represented by fixed 16-dimensional binary codes tiled to $d_{\text{model}}=1024$. We also evaluate a fully table-free variant in which codes are generated from token IDs on the fly and randomly recoded by an invertible affine transform over $\mathbb{F}_2^K$. Across matched 32-layer decoder-only models trained on approximately 17B tokens and evaluated over three independent training seeds, fixed minimal codes achieve comparable held-out validation perplexity to a standard learned-input baseline while removing 67.1M trainable input parameters. The fixed-code runs have a lower mean validation perplexity in our experiments, 2.36 versus 2.44, but the observed gap is within the measured seed-to-seed variation of 4.8\%; we therefore interpret the result as evidence that the trainable input table is not necessary, rather than as a statistically resolved superiority claim. The table-free affine-recoded variant remains close at 2.39 despite a slightly shorter training run. These results show that, in this regime, a trainable input embedding table is not necessary for useful language modeling. The output projection remains standard and trainable.

语言模型嵌入优化参数压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。