diff --git a/src/ragger/generator.py b/src/ragger/generator.py index e81abb2a..281610c4 100644 --- a/src/ragger/generator.py +++ b/src/ragger/generator.py @@ -4,6 +4,7 @@ import logging import os import subprocess +import sys import typing from time import sleep @@ -205,7 +206,11 @@ def __init__(self, config: DictConfig) -> None: "Please ensure that a compatible GPU is available and try again." ) + # Load the tokenizer without printing any logs + sys.stderr = open(os.devnull, "w") self.tokenizer = AutoTokenizer.from_pretrained(config.generator.model) + sys.stderr = sys.__stderr__ + config.generator.server = "0.0.0.0" self.server_process = self.start_inference_server() else: