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

updated train for computing per token loss #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamimos
Copy link
Owner

had to explicitly calculate loss for this

had to explicitly calculate loss for this
@melembroucarlitos
Copy link
Collaborator

I'm confused. Why are we calculating loss per token if we're not logging the value?

@adamimos
Copy link
Owner Author

The main thing I was thinking is that this was the more general thing, that would work for cases where we did or did not want to log by token. I was going to implement the logging by token in a different pull request.

A secondary issue was that the way transformerlens deals with loss is to not compute it on the final token since there's no data for what that prediction should be. So I at least wanted to manually do cross-entropy loss for the logits in order to get that (but this is a seperate issue for the per token thing).

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