Is a Gated Attention Unit Worse than a Transformer?
Is a GAU worse than a Transformer?GAU 比 Transformer 差吗
Every GAU result on the nanotb page compares the two models at equal steps or equal wall time, where they also differ in parameters and FLOPs. The question here is narrower: at the same training compute, is a GAU worse than a plain Transformer? We state it as a non-inferiority claim. The GAU's Paloma loss minus that of Qwen3, with its 95% interval, must stay below 0.01 nats, about twice the spread between two seeds of one config.
nanotb 页面上每个 GAU 结果都是在相同步数或相同训练时间下比较的,这时两个模型的参数量和 FLOPs 也不同。这里的问题更窄:训练算力相同时,GAU 是否比普通 Transformer 差?我们把它写成非劣性结论:GAU 的 Paloma 损失减去 Qwen3 的,连同 95% 区间,要低于 0.01 nats,约为同一配置两个种子之差的两倍。
At 130M on fineweb-edu, the multi-head GAU of the nanotb GAU track beat Qwen3 by 0.050 at equal steps, but it had 38% more non-embedding parameters and 1.75 times the FLOPs per token. Matching either one erases the gap. Qwen3 trained to the same FLOPs ends 0.0004 above the GAU, and a GAU shrunk to Qwen3's parameter count ends 0.003 above Qwen3, while two runs of one Qwen3 config differ by 0.008. The GAU still finishes the equal-FLOPs run 18% sooner, because its kernels reach a higher MFU.
在 fineweb-edu 上的 130M 规模,nanotb GAU 赛道的多头 GAU 在相同步数下比 Qwen3 低 0.050,但它的非 embedding 参数多 38%,每个 token 的 FLOPs 是 1.75 倍。只要对齐其中一项,差距就消失:训练到相同 FLOPs 的 Qwen3 只比 GAU 高 0.0004,缩到 Qwen3 参数量的 GAU 只比 Qwen3 高 0.003,而同一 Qwen3 配置跑两次就相差 0.008。相同 FLOPs 下 GAU 仍少用 18% 的时间,因为它的内核 MFU 更高。
The other two settings do not settle it yet. On nanotb agent traces with one training script, the GAU leads Qwen3 by 0.023 BPB on tool-call arguments, again with 2.2 times the trunk parameters; the parameter-matched runs are queued. On the slowrun tiny track the GAU trails the record by 0.03, inside a recipe that was tuned for the Transformer.
另外两种设置还不能下结论。在 nanotb 的 agent 轨迹上,用同一个训练脚本,GAU 在工具调用参数上比 Qwen3 低 0.023 BPB,但主干参数同样是 2.2 倍;参数对齐的 run 已在排队。在 slowrun tiny 赛道上,GAU 比纪录高 0.03,而那套配方是为 Transformer 调出来的。
One size is a point, not a trend. The figure will hold a ladder of four trunk sizes, about 8M to 100M, for both models. Each size takes its best learning rate from a sweep, the same optimizer, schedule, data and tokenizer, and three seeds at two of the sizes measure the noise. If the two curves stay within 0.01 nats at every size and share a slope, the claim holds beyond 130M.
一个规模只是一个点,不是趋势。下图将放两种模型在四个主干规模上的结果,约从 8M 到 100M。每个规模用学习率扫描中最好的一个,优化器、调度、数据和分词器都相同,并在其中两个规模上各跑三个种子来估计噪声。如果两条曲线在每个规模上都相差不到 0.01 nats,而且斜率相同,这个结论就不只在 130M 成立。
Acknowledgements致谢
The author is pleased to acknowledge that the work reported on in this post was substantially performed using the Princeton Research Computing resources at Princeton University. Princeton Research Computing is a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and Research Computing at Princeton University.
本文报告的工作主要使用普林斯顿大学 Princeton Research Computing 的计算资源完成。Princeton Research Computing 是由普林斯顿计算科学与工程研究所(PICSciE)和普林斯顿大学 Research Computing 等团队组成的联合体。
Experiment record实验记录
Citation
@misc{chai2026gau,
title = {Is a Gated Attention Unit Worse than a Transformer?},
author = {Chai, Wenhao},
year = {2026},
howpublished = {Blog post},
url = {https://wenhaochai.com/exps/gau.html}
}