-
Notifications
You must be signed in to change notification settings - Fork 198
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 TextCallbackStreamer when characters are eaten by regex #1302
fix TextCallbackStreamer when characters are eaten by regex #1302
Conversation
pavel-esir
commented
Dec 4, 2024
- In some cases adding the next token can shorten the text, e.g. when apostrophe removing regex had worked after adding new tokens. Need to hold on before flushing if apostrophe is the last symbol.
- ticket CVS-157216
# Also, in some cases adding the next token can shorten the text, | ||
# e.g. when apostrophe removing regex had worked after adding new tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Also, in some cases adding the next token can shorten the text, | |
# e.g. when apostrophe removing regex had worked after adding new tokens. | |
# E.g. when apostrophe removing regex had worked after adding new tokens. |
This statements are equivalent:
It is possible to have a shorter text after adding new token.
and
in some cases adding the next token can shorten the text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no much time left. Address https://github.com/openvinotoolkit/openvino.genai/pull/1302/files#r1870703054 when porting to master
15f6a90
…toolkit#1302) - In some cases adding the next token can shorten the text, e.g. when apostrophe removing regex had worked after adding new tokens. Need to hold on before flushing if apostrophe is the last symbol. - ticket CVS-157216
- ~#1302 (didn't port this PR because of the issue CVS-159227) - #1262 - #1336 - #1331 --------- Co-authored-by: Andrei Kochin <[email protected]> Co-authored-by: Vladimir Zlobin <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]>
- ~openvinotoolkit#1302 (didn't port this PR because of the issue CVS-159227) - openvinotoolkit#1262 - openvinotoolkit#1336 - openvinotoolkit#1331 --------- Co-authored-by: Andrei Kochin <[email protected]> Co-authored-by: Vladimir Zlobin <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]>
- ~openvinotoolkit/openvino.genai#1302 (didn't port this PR because of the issue CVS-159227) - openvinotoolkit/openvino.genai#1262 - openvinotoolkit/openvino.genai#1336 - openvinotoolkit/openvino.genai#1331 --------- Co-authored-by: Andrei Kochin <[email protected]> Co-authored-by: Vladimir Zlobin <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]>