Skip to content

Conversation

@anishsoni29
Copy link

@anishsoni29 anishsoni29 commented Oct 9, 2023

…lass and created a 'LogitsProcessorList' containing both a custom logits processor and a 'MinLengthLogitsProcessor'.

What does this PR do?

  1. It adds a custom logits processor (CustomLogitsProcessor) to the generate method.
  2. Threshold for EOS Probability:
  3. In this case the LPL list, it includes the original suppress_tokens_logits_processor, the custom custom_logits_processor, and a MinLengthLogitsProcessor to ensure that the generated output has a minimum length of 1 token.

Fixes # (issue)
#26672

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

…lass and created a 'LogitsProcessorList' containing both a custom logits processor and a 'MinLengthLogitsProcessor'.
@anishsoni29
Copy link
Author

Committed this PR with the required changes

@LysandreJik
Copy link
Member

cc @ylacombe

@ylacombe
Copy link
Contributor

ylacombe commented Oct 9, 2023

Hi @anishsoni29, thanks for your help here! however I think @isaac-chung already started working on it yesterday, as you can see here. He even already proposed PR #26675.

It's really nice to see your keen motivation here, though! What would you think of contributing to other issues? We have a docstrings sprint running this month, if you need any ideas !

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@ylacombe
Copy link
Contributor

ylacombe commented Nov 9, 2023

#26675 merged!

@ylacombe ylacombe closed this Nov 9, 2023
@Cazforshort
Copy link

So how do I set min_eos_p in the actual code?

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