Skip to content

Conversation

maxreciprocate
Copy link
Collaborator

@maxreciprocate maxreciprocate commented Dec 9, 2022

Fix of #130, this PR

  • limits generation's size to max_new_tokens
  • truncates prompts to seq_length - max_new_tokens
  • enables separate logging of prompts and generations

PPO
ILQL

@jon-tow jon-tow self-requested a review December 9, 2022 22:40
Copy link
Collaborator

@jon-tow jon-tow left a comment

Choose a reason for hiding this comment

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

Tested locally and looks great! I left a few comments and questions 🙏

Copy link
Collaborator

@jon-tow jon-tow left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for clearing up my questions.

Note: Awaiting logs before merging.

@LouisCastricato
Copy link
Contributor

When are we merging

old_values - self.cliprange_value,
old_values + self.cliprange_value,
)
n = mask.sum()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure but shouldn't n be vector valued where each component is the size of the ith generation? (Before endoftext)

Copy link
Collaborator Author

@maxreciprocate maxreciprocate Dec 14, 2022

Choose a reason for hiding this comment

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

it is used only in reductions to scalars so no

Copy link
Collaborator

@jon-tow jon-tow left a comment

Choose a reason for hiding this comment

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

I left one tiny nit if you could take a look!

@maxreciprocate maxreciprocate merged commit dc0e060 into main Dec 15, 2022
@maxreciprocate maxreciprocate deleted the fix-context-overflow branch December 15, 2022 23:00
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.

4 participants