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 TextCallbackStreamer when characters are eaten by regex #1302

Merged

Conversation

pavel-esir
Copy link
Contributor

  • 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

@pavel-esir pavel-esir added bug Something isn't working Code Freeze labels Dec 4, 2024
@pavel-esir pavel-esir added this to the 2024.6 milestone Dec 4, 2024
src/cpp/src/text_callback_streamer.cpp Outdated Show resolved Hide resolved
src/cpp/src/text_callback_streamer.cpp Outdated Show resolved Hide resolved
@ilya-lavrenov ilya-lavrenov added the port to master PR needs to be ported to master from release branch label Dec 4, 2024
@github-actions github-actions bot added the category: samples GenAI samples label Dec 4, 2024
@pavel-esir pavel-esir requested a review from Wovchena December 4, 2024 19:25
@github-actions github-actions bot added the category: LLM LLM pipeline (stateful, static) label Dec 4, 2024
Comment on lines +100 to +101
# Also, in some cases adding the next token can shorten the text,
# e.g. when apostrophe removing regex had worked after adding new tokens.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# 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

Copy link
Collaborator

@Wovchena Wovchena left a 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

@Wovchena Wovchena added this pull request to the merge queue Dec 5, 2024
Merged via the queue into openvinotoolkit:releases/2024/5 with commit 15f6a90 Dec 5, 2024
52 checks passed
@pavel-esir pavel-esir deleted the fix_streamer_apostrophe branch December 5, 2024 08:30
pavel-esir pushed a commit to pavel-esir/openvino.genai that referenced this pull request Dec 10, 2024
…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
@pavel-esir pavel-esir removed the port to master PR needs to be ported to master from release branch label Dec 10, 2024
pavel-esir added a commit to pavel-esir/openvino.genai that referenced this pull request Dec 11, 2024
@ilya-lavrenov ilya-lavrenov added the port to master PR needs to be ported to master from release branch label Dec 11, 2024
ilya-lavrenov added a commit that referenced this pull request Dec 11, 2024
- ~#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]>
sungeunk pushed a commit to sungeunk/openvino.genai that referenced this pull request Dec 16, 2024
- ~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]>
ScottZhang812 pushed a commit to ScottZhang812/_openvino.genai that referenced this pull request Dec 23, 2024
- ~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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working category: LLM LLM pipeline (stateful, static) category: samples GenAI samples Code Freeze no-match-files port to master PR needs to be ported to master from release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants