Update model_loader.py
Browse files- model_loader.py +6 -10
model_loader.py
CHANGED
|
@@ -2,17 +2,13 @@ import os
|
|
| 2 |
from huggingface_hub import hf_hub_download
|
| 3 |
from llama_cpp import Llama
|
| 4 |
|
| 5 |
-
# Quantized GGUF Model tracking paths
|
| 6 |
-
REPO_ID = "
|
| 7 |
-
MODEL_FILENAME = "
|
| 8 |
|
| 9 |
-
print("[SYSTEM] Fetching
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
print(f"[SYSTEM] Model secured safely at: {model_path}")
|
| 13 |
-
except Exception as download_err:
|
| 14 |
-
print(f"[CRITICAL DOWNLOAD ERROR] Failed to fetch target file: {download_err}")
|
| 15 |
-
raise download_err
|
| 16 |
|
| 17 |
def get_local_llm_instance():
|
| 18 |
"""
|
|
|
|
| 2 |
from huggingface_hub import hf_hub_download
|
| 3 |
from llama_cpp import Llama
|
| 4 |
|
| 5 |
+
# Quantized GGUF Model tracking paths
|
| 6 |
+
REPO_ID = "Qwen/Qwen2.5-0.5B-Instruct-GGUF"
|
| 7 |
+
MODEL_FILENAME = "qwen2.5-0.5b-instruct-q4_k_m.gguf"
|
| 8 |
|
| 9 |
+
print("[SYSTEM] Fetching quantized model files from HuggingFace Hub cluster...")
|
| 10 |
+
model_path = hf_hub_download(repo_id=REPO_ID, filename=MODEL_FILENAME)
|
| 11 |
+
print(f"[SYSTEM] Model secured safely at: {model_path}")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
def get_local_llm_instance():
|
| 14 |
"""
|