diff --git a/story/story.py b/story/story.py index aa26f9f..c8a5045 100644 --- a/story/story.py +++ b/story/story.py @@ -57,7 +57,7 @@ def new(self, context: str = ''): def get_max_history(self): max_tokens = self.gen.model.config.max_position_embeddings if hasattr(self.gen.model.config, 'sliding_window'): - max_tokens = min(self.gen.model.config.sliding_window * 2, max_tokens) + max_tokens = min(self.gen.model.config.sliding_window * 1.5, max_tokens) return max_tokens - self.gen_length def clean_input(self, action=''):