mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-29 06:54:59 +00:00
chore(scripts): allow to specify quants (#5430)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
1d1d5627f0
commit
8dcab2f9c7
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue