Skip to content

Commit a8fd7d6

Browse files
committed
Fix for changes in accessing token text
1 parent 6b4bebc commit a8fd7d6

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
@@ -4172,8 +4172,8 @@ static uint8_t llama_seqrep_check_word(struct llama_context * ctx, const llama_t
41724172
return 3;
41734173
}
41744174

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

0 commit comments

Comments
 (0)