From b91b77687434eed523836e6f558767bf19b28029 Mon Sep 17 00:00:00 2001 From: cotran Date: Fri, 22 Nov 2024 11:24:27 -0800 Subject: [PATCH] fix bug --- model_server/app/commons/constants.py | 1 + model_server/app/function_calling/hallucination_handler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/model_server/app/commons/constants.py b/model_server/app/commons/constants.py index 977d7b9c..65bc7c25 100644 --- a/model_server/app/commons/constants.py +++ b/model_server/app/commons/constants.py @@ -19,6 +19,7 @@ arch_function_generation_params = { "top_k": 50, "max_tokens": 512, "stop_token_ids": [151645], + "top_logprobs": 10, } arch_guard_model_type = { diff --git a/model_server/app/function_calling/hallucination_handler.py b/model_server/app/function_calling/hallucination_handler.py index 92fd1326..eb4a56d1 100644 --- a/model_server/app/function_calling/hallucination_handler.py +++ b/model_server/app/function_calling/hallucination_handler.py @@ -161,7 +161,7 @@ class HallucinationStateHandler: self.mask.append("v") if ( len(self.mask) > 1 - and self.mask[-2] == "v" + and self.mask[-2] != "v" and not check_parameter_property( self.function_properties[self.function_name], self.parameter_name[-1],