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

Use GenAI text streamer implementation #3030

Merged
merged 3 commits into from
Feb 10, 2025
Merged

Use GenAI text streamer implementation #3030

merged 3 commits into from
Feb 10, 2025

Conversation

mzegla
Copy link
Collaborator

@mzegla mzegla commented Feb 5, 2025

Switching text streamer to GenAI implementation. For now we adapt a copy since it's not in GenAI interface now.

This will likely be useful for streaming enablement in pipelines other than ContinuousBatchingPipeline.

printLen = 0;
return chunk;
int64_t print_until = m_decoded_lengths[m_decoded_lengths.size() - delay_n_tokens];
if (print_until != -1 && print_until > static_cast<int64_t>(m_printed_len)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GenAI implementation does not have this static cast. We have an error when building without it.

printLen = lastSpacePos + 1;
SPDLOG_LOGGER_TRACE(llm_calculator_logger, "Generated tokens: {}", tokenCache);
return chunk;
constexpr char replacement[] = "\xef\xbf\xbd"; // MSVC with /utf-8 fails to compile <UNK> directly with newline in string literal error.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this comment, GenAI contains special character instead of <UNK>. I had to replace it, so our pipeline passes.

@mzegla mzegla merged commit 3c59bbf into main Feb 10, 2025
12 checks 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.

3 participants