From fd80ddf703373f523bda4e62d24564fa8930f670 Mon Sep 17 00:00:00 2001 From: Mug <2797716+SagsMug@users.noreply.github.com> Date: Sat, 6 May 2023 22:22:28 +0200 Subject: [PATCH] Fix a bug with wrong type --- examples/low_level_api/low_level_api_chat_cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/low_level_api/low_level_api_chat_cpp.py b/examples/low_level_api/low_level_api_chat_cpp.py index 9a9bc01..272b454 100644 --- a/examples/low_level_api/low_level_api_chat_cpp.py +++ b/examples/low_level_api/low_level_api_chat_cpp.py @@ -330,7 +330,7 @@ n_keep = {self.params.n_keep} # Apply params.logit_bias map for key, value in self.params.logit_bias.items(): - logits[key] += llama_cpp.c_float(value) + logits[key] += value _arr = (llama_cpp.llama_token_data * n_vocab)(*[ llama_cpp.llama_token_data(token_id, logits[token_id], 0.0)