Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,6 @@ std::string string_from(const struct llama_context * ctx, const std::vector<llam

auto detokenized = common_token_to_piece(ctx, token);

detokenized.erase(
std::remove_if(
detokenized.begin(),
detokenized.end(),
[](const unsigned char c) { return !std::isprint(c); }),
detokenized.end());

buf << "'" << detokenized << "'"
<< ":" << std::to_string(token);
}
Expand All @@ -589,13 +582,6 @@ std::string string_from(const struct llama_context * ctx, const struct llama_bat

auto detokenized = common_token_to_piece(ctx, batch.token[i]);

detokenized.erase(
std::remove_if(
detokenized.begin(),
detokenized.end(),
[](const unsigned char c) { return !std::isprint(c); }),
detokenized.end());

buf << "\n" << std::to_string(i)
<< ", token '" << detokenized << "'"
<< ", pos " << std::to_string(batch.pos[i])
Expand Down
Loading