Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -59,12 +59,12 @@ def build_vectorstore():
|
|
59 |
# --- 3) تحميل النموذج ---
|
60 |
def load_llm():
|
61 |
"""
|
62 |
-
Downloads
|
63 |
"""
|
64 |
# 1) Download the GGUF model from Hugging Face
|
65 |
model_file = hf_hub_download(
|
66 |
-
repo_id="
|
67 |
-
filename="c4ai-command-r7b-arabic-02-2025-
|
68 |
local_dir="./models",
|
69 |
local_dir_use_symlinks=False
|
70 |
)
|
@@ -73,8 +73,8 @@ def load_llm():
|
|
73 |
llm = LlamaCpp(
|
74 |
model_path=model_file,
|
75 |
flash_attn=False,
|
76 |
-
n_ctx=2048, # or 4096
|
77 |
-
n_batch=512, # or even 256
|
78 |
chat_format='chatml'
|
79 |
)
|
80 |
|
|
|
59 |
# --- 3) تحميل النموذج ---
|
60 |
def load_llm():
|
61 |
"""
|
62 |
+
Downloads a Q4_K_M GGUF model and loads it via llama-cpp.
|
63 |
"""
|
64 |
# 1) Download the GGUF model from Hugging Face
|
65 |
model_file = hf_hub_download(
|
66 |
+
repo_id="DevQuasar/CohereForAI.c4ai-command-r7b-arabic-02-2025-GGUF",
|
67 |
+
filename="CohereForAI.c4ai-command-r7b-arabic-02-2025-Q4_K_M.gguf",
|
68 |
local_dir="./models",
|
69 |
local_dir_use_symlinks=False
|
70 |
)
|
|
|
73 |
llm = LlamaCpp(
|
74 |
model_path=model_file,
|
75 |
flash_attn=False,
|
76 |
+
n_ctx=2048, # or 4096
|
77 |
+
n_batch=512, # or even 256
|
78 |
chat_format='chatml'
|
79 |
)
|
80 |
|