Sebastian Raschka· @rasbt · X·· 16 天前AI 评分13
AI 导读
Sebastian Raschka 针对 Gemma 模型的架构讨论做出技术澄清,指出对方截取的代码实际上属于注意力缩放而非嵌入缩放。他表示此前使用的可比尺度表述不够准确,改用数量级更为恰当,且该概念与方差直接相关;在嵌入缩放的情况下操作会增加方差而非减小方差。同时,他附上了此前关于将 Gemma 移植到 LitGPT 时梳理架构细节的推文链接(https://t.co/9x2xXZ5wyb)。
正文
Couldn't find it anymore either, only my Gemma tweet from 2 years ago or so (https://t.co/9x2xXZ5wyb). But anyways, thanks for the feedback. And "comparable scales" was not a good way to put it. Probably should have said "magnitude" instead (but yeah, it's directly connected to variance).
Note the screenshot you are showing there is from the attention scaling, not the embedding scaling. In the embedding case it would increase not reduce the variance.
Google's Gemma has been the topic of the week for both LLM researchers and users. My colleagues and I just ported the code to LitGPT, and we discovered some interesting surprises and model architecture details along the way: 1) Gemma uses a really large vocabulary and consequently embedding weight matrices. 2) Like OLMo and GPT-2, Gemma also uses weight tying. 3) It even uses GeLU (in the form of GeGLU), similar to GPT-2, unlike Llama 2 and other LLMs. 4) Interestingly, Gemma normalizes the embeddings by the square root of the hidden layer dimension. 5) The RMSNorm layers are in the usual location, different from what was hinted at in the technical paper. 6) However, the RMSNorm implementation comes with the unit offset that wasn't mentioned in the technical paper.在 X 查看被引用的帖子
来源:Sebastian Raschka · x.com