Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
# Determine the number of CPU cores available
|
6 |
num_cores = os.cpu_count()
|
7 |
# Use 75% of available cores, but at least 4
|
8 |
-
threads = max(
|
9 |
|
10 |
llm = Llama(model_path="model.gguf", n_ctx=3072, n_threads=threads, chat_format="chatml")
|
11 |
|
|
|
5 |
# Determine the number of CPU cores available
|
6 |
num_cores = os.cpu_count()
|
7 |
# Use 75% of available cores, but at least 4
|
8 |
+
threads = max(4, int(num_cores * 0.75))
|
9 |
|
10 |
llm = Llama(model_path="model.gguf", n_ctx=3072, n_threads=threads, chat_format="chatml")
|
11 |
|