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

suppress eos tokken on start sampling #314

Merged
merged 3 commits into from
Feb 27, 2024
Merged

suppress eos tokken on start sampling #314

merged 3 commits into from
Feb 27, 2024

Conversation

mitya52
Copy link
Member

@mitya52 mitya52 commented Feb 23, 2024

No description provided.

@hazratisulton hazratisulton linked an issue Feb 23, 2024 that may be closed by this pull request
@@ -277,6 +277,7 @@ def infer(self, request: Dict[str, Any], upload_proxy: UploadProxy, upload_proxy
do_sample=temperature >= 0.05,
return_dict_in_generate=True,
output_scores=True,
begin_suppress_tokens=[scratchpad.eos_token],
Copy link
Member

Choose a reason for hiding this comment

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

Does this fix the problem?

Choose a reason for hiding this comment

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

I checked this fix with cases from #315 - it's working.

@olegklimov
Copy link
Contributor

This should be an API option, not always on

@mitya52 mitya52 merged commit a45af1e into dev Feb 27, 2024
2 checks passed
@mitya52 mitya52 deleted the begin-suppress branch March 14, 2024 15:11
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.

[VS Code] Multiline completion not working in some cases
5 participants