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

Tie OPT weights #23

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Tie OPT weights #23

merged 2 commits into from
Sep 18, 2024

Conversation

philippguevorguian
Copy link
Collaborator

This PR ties the weights of input and output embeddings for the OPT model via a minimal implementation

@@ -364,8 +362,7 @@ def forward(self, tokens: torch.Tensor):
h = layer(h)

h = self.norm(h) if self.norm else h
output = self.output(h).float() if self.output else h
return output
return self.output(h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not cast the outputs to float?

@philippguevorguian philippguevorguian merged commit 379be76 into main Sep 18, 2024
0 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants