Skip to content

Commit e52cf05

Browse files
committed
Fix for changes in accessing token text
1 parent e199bfe commit e52cf05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4171,8 +4171,8 @@ static uint8_t llama_seqrep_check_word(struct llama_context * ctx, const llama_t
41714171
return 3;
41724172
}
41734173

4174-
const std::string token_str = llama_token_to_text(ctx, token);
4175-
auto decoded = decode_utf8(token_str.c_str(), llama_partial_utf8{ 0, 0 });
4174+
const char * token_str = llama_token_get_text(ctx, token);
4175+
auto decoded = decode_utf8(token_str, llama_partial_utf8{ 0, 0 });
41764176
const std::vector<uint32_t> & token_cps = decoded.first;
41774177
const size_t token_cps_len = token_cps.size();
41784178

0 commit comments

Comments
 (0)