diff --git a/src/llama.cpp b/src/llama.cpp index f91ac777969d9..59b76a6d80cdf 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -21144,7 +21144,7 @@ int32_t llama_token_to_piece(const struct llama_model * model, llama_token token size--; } if (length < (int32_t)size) { - return (int32_t) -size; + return -(int32_t) size; } memcpy(buf, token, size); return (int32_t) size;