From 8dcab2f9c79ea0a1280be1ee02611e9576adcc4c Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 22 May 2025 11:53:30 +0200 Subject: [PATCH] chore(scripts): allow to specify quants (#5430) Signed-off-by: Ettore Di Giacinto --- scripts/model_gallery_info.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/model_gallery_info.py b/scripts/model_gallery_info.py index ee258037..19726947 100644 --- a/scripts/model_gallery_info.py +++ b/scripts/model_gallery_info.py @@ -31,6 +31,7 @@ templated_yaml = """ client = OpenAI() model = os.environ.get("OPENAI_MODEL", "hermes-2-theta-llama-3-8b") +quantization = os.environ.get("QUANTIZATION", "Q4_K_M") def summarize(text: str) -> str: @@ -69,12 +70,12 @@ if __name__ == "__main__": if "readme" in file.lower(): readmeFile = file print(f"Found README file: {readmeFile}") - if "q4_k_m" in file.lower(): + if quantization.lower() in file.lower(): file_path = file if file_path is None: - print("No file with Q4_K_M found, using the first file in the list.") + print(f"No file with {quantization} found, using the first file in the list.") exit(1)