sitammeur commited on
Commit
2678864
·
verified ·
1 Parent(s): b9d04ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -19,9 +19,6 @@ from exception import CustomExceptionHandling
19
 
20
 
21
  # Download gguf model files
22
- llm = None
23
- llm_model = None
24
-
25
  hf_hub_download(
26
  repo_id="bartowski/SmolLM2-135M-Instruct-GGUF",
27
  filename="SmolLM2-135M-Instruct-Q6_K.gguf",
@@ -33,11 +30,15 @@ hf_hub_download(
33
  local_dir="./models",
34
  )
35
 
 
36
  # Set the title and description
37
  title = "SmolLM🤗 Llama.cpp"
38
  description = """SmolLM2, a family of three small language models, performs well in instruction following and reasoning. The largest model significantly improves over its predecessor through advanced training techniques."""
39
 
40
 
 
 
 
41
  def respond(
42
  message: str,
43
  history: List[Tuple[str, str]],
@@ -79,8 +80,8 @@ def respond(
79
  n_gpu_layers=0,
80
  n_batch=8,
81
  n_ctx=2048,
82
- n_threads=2,
83
- n_threads_batch=2,
84
  )
85
  llm_model = model
86
  provider = LlamaCppPythonProvider(llm)
 
19
 
20
 
21
  # Download gguf model files
 
 
 
22
  hf_hub_download(
23
  repo_id="bartowski/SmolLM2-135M-Instruct-GGUF",
24
  filename="SmolLM2-135M-Instruct-Q6_K.gguf",
 
30
  local_dir="./models",
31
  )
32
 
33
+
34
  # Set the title and description
35
  title = "SmolLM🤗 Llama.cpp"
36
  description = """SmolLM2, a family of three small language models, performs well in instruction following and reasoning. The largest model significantly improves over its predecessor through advanced training techniques."""
37
 
38
 
39
+ llm = None
40
+ llm_model = None
41
+
42
  def respond(
43
  message: str,
44
  history: List[Tuple[str, str]],
 
80
  n_gpu_layers=0,
81
  n_batch=8,
82
  n_ctx=2048,
83
+ n_threads=8,
84
+ n_threads_batch=8,
85
  )
86
  llm_model = model
87
  provider = LlamaCppPythonProvider(llm)