Merge branch 'shuguang/main' of https://github.com/katanemo/arch into shuguang/main

This commit is contained in:
cotran 2024-12-09 14:44:17 -08:00
commit 95740ca051
4 changed files with 110 additions and 16 deletions

View file

@ -278,6 +278,9 @@ class HallucinationStateHandler:
f"Hallucination: token '{self.tokens[-1]}' is uncertain."
)
# [TODO] - Review: remove the following code
print(f"[Hallucination] - Hallucination detected: {self.error_message}")
def _count_consecutive_token(self, token=MaskToken.PARAMETER_VALUE) -> int:
"""
Counts the number of consecutive occurrences of a given token in the mask.