Skip to content

Commit 8dcab2f

Browse files
authored
chore(scripts): allow to specify quants (#5430)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 1d1d562 commit 8dcab2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/model_gallery_info.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
client = OpenAI()
3232

3333
model = os.environ.get("OPENAI_MODEL", "hermes-2-theta-llama-3-8b")
34+
quantization = os.environ.get("QUANTIZATION", "Q4_K_M")
3435

3536

3637
def summarize(text: str) -> str:
@@ -69,12 +70,12 @@ def format_description(description):
6970
if "readme" in file.lower():
7071
readmeFile = file
7172
print(f"Found README file: {readmeFile}")
72-
if "q4_k_m" in file.lower():
73+
if quantization.lower() in file.lower():
7374
file_path = file
7475

7576

7677
if file_path is None:
77-
print("No file with Q4_K_M found, using the first file in the list.")
78+
print(f"No file with {quantization} found, using the first file in the list.")
7879
exit(1)
7980

8081

0 commit comments

Comments
 (0)