MOHAMMED-N commited on
Commit
f61ef97
·
verified ·
1 Parent(s): dadd14f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -59,12 +59,12 @@ def build_vectorstore():
59
  # --- 3) تحميل النموذج ---
60
  def load_llm():
61
  """
62
- Downloads the Q4_K_M GGUF model from mobeidat's Hugging Face repository 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="mobeidat/c4ai-command-r7b-arabic-02-2025-Q4_K_M-GGUF",
67
- filename="c4ai-command-r7b-arabic-02-2025-q4_k_m.gguf",
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 depending on your needs
77
- n_batch=512, # or even 256 depending on your hardware
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