Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,12 +16,12 @@ if not os.path.exists(MODEL_PATH):
|
|
16 |
f.write(chunk)
|
17 |
print("Model downloaded.")
|
18 |
|
19 |
-
# Load the model
|
20 |
llm = Llama(
|
21 |
model_path=MODEL_PATH,
|
22 |
-
n_ctx=
|
23 |
-
n_threads=
|
24 |
-
n_gpu_layers=
|
25 |
chat_format="chatml"
|
26 |
)
|
27 |
|
@@ -40,4 +40,4 @@ def chat_interface(message, history):
|
|
40 |
history.append((message, reply))
|
41 |
return reply, history
|
42 |
|
43 |
-
gr.ChatInterface(fn=chat_interface, title="
|
|
|
16 |
f.write(chunk)
|
17 |
print("Model downloaded.")
|
18 |
|
19 |
+
# Load the model with adjustments for CPU
|
20 |
llm = Llama(
|
21 |
model_path=MODEL_PATH,
|
22 |
+
n_ctx=4096, # Reduced context window size
|
23 |
+
n_threads=2, # Reduced threads for CPU use
|
24 |
+
n_gpu_layers=0, # Set to 0 since we're using CPU
|
25 |
chat_format="chatml"
|
26 |
)
|
27 |
|
|
|
40 |
history.append((message, reply))
|
41 |
return reply, history
|
42 |
|
43 |
+
gr.ChatInterface(fn=chat_interface, title="Ministral 3B Chat").launch()
|