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

Could your please give a detailed explanation for the "rank classification"? #33

Open
A11en0 opened this issue Nov 11, 2023 · 1 comment

Comments

@A11en0
Copy link

A11en0 commented Nov 11, 2023

Hi, thanks for your excellent job. I've read the paper the reviewed the code. I've encounter some issues as outlined following:

  1. I'd appreciate a detailed explanation of how the "rank classification" is implemented. Could you please provide clarification on the code found at this link?

  2. I'm curious about how the "rank classification" process influences the final results. Is it feasible to employ a direct generation approach, such as generating the label words and matching them against the true answer, as an alternative method?

@dptam
Copy link
Collaborator

dptam commented Nov 21, 2023

  1. The code listed is for training, where we do not use rank classification. Instead, we use the unlikelihood loss that tries to increase the loss for the incorrect labels (i.e. minimizing their probability). This is why there is a negative sign for cross_entropy on line 86 and we mask out the loss for the correct label on line 90.
  2. It is possible to use a direct generation approach and match them against the true answer. Rank classification increases the accuracy of the model since the model only has to choose the correct choice from the list of choice, rather than having to generate the correct choice from the space of all possible outputs.

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

2 participants