added weighing the tokens before generation

This commit is contained in:
Saifeddine ALOUI 2024-09-17 01:24:19 +02:00
parent b73497c1af
commit 676c80f825

View File

@ -582,7 +582,8 @@ class AIPersonality:
ASCIIColors.red(" *-*-*-*-*-*-*-*")
ASCIIColors.yellow(prompt)
ASCIIColors.red(" *-*-*-*-*-*-*-*")
ASCIIColors.red(f"Weight : {len(self.model.tokenize(prompt))} tokens")
ASCIIColors.red(" *-*-*-*-*-*-*-*")
def fast_gen_with_images(self, prompt: str, images:list, max_generation_size: int=None, placeholders: dict = {}, sacrifice: list = ["previous_discussion"], debug: bool = False, callback=None, show_progress=False) -> str: