Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始化问题 #10

Open
brotherchen opened this issue Oct 15, 2024 · 0 comments
Open

初始化问题 #10

brotherchen opened this issue Oct 15, 2024 · 0 comments

Comments

@brotherchen
Copy link

elif isinstance(module, nn.LayerNorm) or isinstance(module, RMSNorm):
module.bias.data.zero_()

class RMSNorm(nn.Module):
def init(self, hidden_size, eps=1e-5):
super().init()
self.weight = nn.Parameter(torch.ones(hidden_size))
self.eps = eps

文件中的RMSNorm类似乎并不包含bias这个参数,该行函数会导致使用transformers库加载模型时报错?请帮忙确认是代码的问题还是我的运行方式错误?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant