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

Fix a slicing issue when conv.stop_str is not found in model output. #2169

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

azshue
Copy link
Contributor

@azshue azshue commented Aug 7, 2023

Why are these changes needed?

To fix a slicing op that may unexpectedly discard the last character of a model's output.
When conv.stop_str is not found in the output, output.find(conv.stop_str) will return -1. Then the slicing op output = output[:-1] will discard the last character of the output, which I assume is not intended.

Related issue number (if applicable)

Checks

  • I've run format.sh to lint the changes in this PR.
  • I've included any doc changes needed.
  • I've made sure the relevant tests are passing (if applicable).

@merrymercy merrymercy merged commit f0927de into lm-sys:main Aug 8, 2023
1 check passed
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.

None yet

2 participants